Loading...
Loading...
Compare original and translation side by side
AskUserQuestion- Parties: Names of all parties to the agreement
- Effective Date: When the agreement becomes effective
- Term: Duration of the agreement
- Governing Law: Jurisdiction for disputesAskUserQuestion- 协议方:协议所有参与方的名称
- 生效日期:协议生效的时间
- 期限:协议的持续时长
- 管辖法律:争议管辖的司法区域GlobGlob(pattern: "**/*.pdf", path: "<folder>")
Glob(pattern: "**/*.docx", path: "<folder>")GlobGlob(pattern: "**/*.pdf", path: "<folder>")
Glob(pattern: "**/*.docx", path: "<folder>")Task(
prompt: "<agent_prompt>",
subagent_type: "general-purpose",
run_in_background: true
)You are processing documents for a tabular review.
DOCUMENTS TO PROCESS:
<list of document paths>
COLUMNS TO EXTRACT:
<column definitions>
For each document:
1. Read the document using the pdf skill (for .pdf) or docx skill (for .docx)
2. Extract the requested information for each column
3. Note the page number (PDF) or section (DOCX) where you found the information
4. Include a brief quote (30-50 chars) showing the source text
Return your results as JSON:
{
"results": [
{
"document": "<filename>",
"path": "<absolute_path>",
"extractions": [
{
"column": "<column_name>",
"value": "<extracted_value>",
"page": <page_number>,
"quote": "<brief_context_quote>"
}
]
}
]
}
If you cannot find information for a column, set value to "Not found" and explain in the quote field.Task(
prompt: "<agent_prompt>",
subagent_type: "general-purpose",
run_in_background: true
)You are processing documents for a tabular review.
DOCUMENTS TO PROCESS:
<list of document paths>
COLUMNS TO EXTRACT:
<column definitions>
For each document:
1. Read the document using the pdf skill (for .pdf) or docx skill (for .docx)
2. Extract the requested information for each column
3. Note the page number (PDF) or section (DOCX) where you found the information
4. Include a brief quote (30-50 chars) showing the source text
Return your results as JSON:
{
"results": [
{
"document": "<filename>",
"path": "<absolute_path>",
"extractions": [
{
"column": "<column_name>",
"value": "<extracted_value>",
"page": <page_number>,
"quote": "<brief_context_quote>"
}
]
}
]
}
If you cannot find information for a column, set value to "Not found" and explain in the quote field.TaskOutput(task_id: "<agent_id>", block: true)TaskOutput(task_id: "<agent_id>", block: true)Create an Excel workbook at <output_path>:
SHEET 1: "Document Review"
- Header row: Document | <Column1> | <Column2> | ...
- Data rows: One row per document
For each extraction cell:
- Cell value: The extracted text
- Cell hyperlink: file://<document_path>#page=<N> (for PDFs)
- Cell comment: "Page <N>: '<quote>'"
SHEET 2: "Summary"
- Total documents: <count>
- Documents processed: <count>
- Extraction date: <today>Create an Excel workbook at <output_path>:
SHEET 1: "Document Review"
- Header row: Document | <Column1> | <Column2> | ...
- Data rows: One row per document
For each extraction cell:
- Cell value: The extracted text
- Cell hyperlink: file://<document_path>#page=<N> (for PDFs)
- Cell comment: "Page <N>: '<quote>'"
SHEET 2: "Summary"
- Total documents: <count>
- Documents processed: <count>
- Extraction date: <today>{
"document": "Contract_ABC.pdf",
"path": "/path/to/Contract_ABC.pdf",
"extractions": [
{
"column": "Parties",
"value": "Acme Corp and Beta Inc",
"page": 1,
"quote": "entered into between Acme Corp and Beta Inc"
},
{
"column": "Effective Date",
"value": "January 15, 2025",
"page": 1,
"quote": "effective as of January 15, 2025"
}
]
}{
"document": "Contract_ABC.pdf",
"path": "/path/to/Contract_ABC.pdf",
"extractions": [
{
"column": "Parties",
"value": "Acme Corp and Beta Inc",
"page": 1,
"quote": "entered into between Acme Corp and Beta Inc"
},
{
"column": "Effective Date",
"value": "January 15, 2025",
"page": 1,
"quote": "effective as of January 15, 2025"
}
]
}file:///path/to/Contract_ABC.pdf#page=1Page 1: "entered into between Acme Corp and Beta Inc"file:///path/to/Contract_ABC.pdf#page=1Page 1: "entered into between Acme Corp and Beta Inc"| Scenario | Action |
|---|---|
| Document unreadable | Log error, mark row as failed, continue |
| Column not found | Set value to "Not found", explain in comment |
| Agent timeout | Collect partial results, note incomplete |
| Missing skill | Prompt user to install required skill |
| 场景 | 操作 |
|---|---|
| 文档无法读取 | 记录错误,标记该行处理失败,继续执行 |
| 未找到对应列 | 将值设为"Not found",在批注中说明原因 |
| Agent超时 | 收集部分结果,标记未完成 |
| 缺少所需技能 | 提示用户安装所需技能 |
User: I want to do a tabular review of my contracts
Claude: [Uses AskUserQuestion]
- What folder contains your documents?
- What should I name the output Excel file?
- What columns do you want to extract?
User: ~/Contracts, review.xlsx, Parties/Date/Term/Governing Law
Claude: [Discovers 15 documents via Glob]
Claude: [Launches 5 background agents, 3 docs each]
Claude: [Collects results via TaskOutput]
Claude: [Creates review.xlsx via xlsx skill]
Output: review.xlsx with 15 rows, 4 columns, hyperlinks and citationsUser: I want to do a tabular review of my contracts
Claude: [Uses AskUserQuestion]
- What folder contains your documents?
- What should I name the output Excel file?
- What columns do you want to extract?
User: ~/Contracts, review.xlsx, Parties/Date/Term/Governing Law
Claude: [Discovers 15 documents via Glob]
Claude: [Launches 5 background agents, 3 docs each]
Claude: [Collects results via TaskOutput]
Claude: [Creates review.xlsx via xlsx skill]
Output: review.xlsx with 15 rows, 4 columns, hyperlinks and citations