بنقرة واحدة
extractor
Downloads and extracts structured data from tax documents.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Downloads and extracts structured data from tax documents.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Use this skill when working with the Anthropic Skills API for document creation (pptx, xlsx, docx, pdf) via code execution containers.
Use this skill for all Box operations — uploading, downloading, searching, and managing files and folders in Box. Uses the Box CLI (@box/cli) via Bash commands with a developer token.
Use this skill when working with the Box API, Box Content Cloud, or Box Node SDK (v10/v4). This includes file/folder operations, authentication (OAuth 2.0, JWT, Client Credentials, Developer Token), uploads, downloads, metadata, collaborations, and any Box platform integration tasks. Trigger when the user mentions Box, Box API, Box SDK, or box-node-sdk.
Manages Box sharing permissions, Box Sign requests, and task assignments.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Discovers and classifies tax documents in Box using the Box CLI.
استنادا إلى تصنيف SOC المهني
| name | extractor |
| description | Downloads and extracts structured data from tax documents. |
Extract structured field data from tax documents stored in Box using the Box AI Extract API.
ai:extract (freeform) or ai:extract-structured (typed fields) via the Box CLI. Prefer ai:extract-structured when you know the document type and fields ahead of time, as it returns typed key-value pairs. Fall back to ai:extract for unknown document types or exploratory extraction.ai:extract-structuredUSAGE
$ box ai:extract-structured --items <value>... [-t <value>] [--json | --csv]
[--fields <value>...] [--metadata-template <value>] [--ai-agent <value>]
KEY FLAGS
--items=<value>... (required) Comma-separated key=value pairs: id=FILE_ID,type=file
--fields=<value>... Repeatable. Each flag is one field to extract (see format below).
--metadata-template=<value> Alternative to --fields. Comma-separated: type=metadata_template,scope=enterprise,template_key=KEY
--json Output formatted JSON
-t, --token=<value> Auth token
--ai-agent=<value> JSON string to override the default AI agent config
--fields value format (single comma-separated string per field):
key=KEY,type=TYPE,description=DESC,prompt=PROMPT,displayName=LABEL,options=OPT1;OPT2
Supported attributes: key (required), type, description, prompt, displayName, options (semicolon-separated for enum/multiSelect).
Supported types: string, float, date, enum, multiSelect.
CRITICAL --fields parsing bug — no reserved words anywhere in values. The CLI parser scans the entire --fields string for reserved attribute names (key, type, description, prompt, displayName, options) using substring matching. If ANY attribute value contains one of these words — even as a substring — parsing breaks with Invalid key '...'. This applies to ALL attributes, not just key.
Examples that FAIL:
key=description,... — value description is a reserved namekey=item_description,... — value contains description as substringprompt=What is the description?,... — value contains descriptionprompt=What is the prompt?,... — value contains promptdescription=Full type of document,... — value contains typeExamples that WORK:
key=notes,... — no reserved wordskey=desc,... — desc is not a reserved nameprompt=What is this item?,... — no reserved wordsdescription=Person hobby,... — no reserved words (from official --help example)Avoid commas inside attribute values. The comma is the delimiter between attributes. If a value needs a comma, rephrase to avoid it (e.g. "Wages tips and other compensation" instead of "Wages, tips, and other compensation").
Every attribute MUST have =value. Omitting =value (e.g. description,type=string) causes the same parsing error.
ai:extractUSAGE
$ box ai:extract --prompt <value> --items <value>... [-t <value>] [--json | --csv]
[--ai-agent <value>]
KEY FLAGS
--prompt=<value> (required) Freeform prompt — plain text, field list, or stringified JSON
--items=<value>... (required) Comma-separated key=value pairs: id=FILE_ID,type=file
--json Output formatted JSON
-t, --token=<value> Auth token
ai:extract-structured)Use when you know the exact fields and their types. Each --fields flag specifies one field. You can repeat --fields for each field you want to extract.
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=employer_name,type=string,displayName=Employer Name,prompt=What is the employer name?" \
--fields "key=wages_box1,type=float,displayName=Wages Box 1,prompt=What is the amount in Box 1?" \
--fields "key=federal_tax_withheld_box2,type=float,displayName=Federal Tax Withheld,prompt=What is the federal income tax withheld in Box 2?" \
--token $BOX_DEVELOPER_TOKEN --json
The response is a flat JSON object with the extracted values keyed by the key names.
ai:extract)Use when you want a natural-language prompt or don't know the exact fields. The prompt can be plain text, a list of field names, or a stringified JSON structure.
npx @box/cli ai:extract \
--items="id=FILE_ID,type=file" \
--prompt "vendor, invoice_number, total, date, document_type" \
--token $BOX_DEVELOPER_TOKEN --json
The response contains an answer field with a JSON string of extracted key-value pairs.
If a Box metadata template already exists for the document type, use --metadata-template instead of --fields:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--metadata-template="type=metadata_template,scope=enterprise,template_key=TEMPLATE_KEY" \
--token $BOX_DEVELOPER_TOKEN --json
Use these field definitions with ai:extract-structured for each document type. Pass each field as a separate --fields flag. Each value below is the exact string to pass after --fields.
W-2:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=employer_name,type=string,displayName=Employer Name,prompt=What is the employer name?" \
--fields "key=employer_ein,type=string,displayName=Employer EIN,prompt=What is the employer EIN?" \
--fields "key=wages_box1,type=float,displayName=Wages (Box 1),prompt=What is the amount in Box 1 Wages tips and other compensation?" \
--fields "key=federal_tax_withheld_box2,type=float,displayName=Federal Tax Withheld (Box 2),prompt=What is the federal income tax withheld in Box 2?" \
--fields "key=ss_wages_box3,type=float,displayName=SS Wages (Box 3),prompt=What is the Social Security wages in Box 3?" \
--fields "key=ss_tax_box4,type=float,displayName=SS Tax (Box 4),prompt=What is the Social Security tax withheld in Box 4?" \
--fields "key=medicare_wages_box5,type=float,displayName=Medicare Wages (Box 5),prompt=What is the Medicare wages in Box 5?" \
--fields "key=medicare_tax_box6,type=float,displayName=Medicare Tax (Box 6),prompt=What is the Medicare tax withheld in Box 6?" \
--fields "key=state,type=string,displayName=State,prompt=What is the state?" \
--fields "key=state_wages,type=float,displayName=State Wages,prompt=What are the state wages?" \
--fields "key=state_tax,type=float,displayName=State Tax,prompt=What is the state income tax?" \
--fields "key=401k_box12,type=float,displayName=401k (Box 12),prompt=What is the 401k contribution in Box 12?" \
--token $BOX_DEVELOPER_TOKEN --json
1099-NEC:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=payer_name,type=string,displayName=Payer Name,prompt=What is the payer name?" \
--fields "key=payer_tin,type=string,displayName=Payer TIN,prompt=What is the payer TIN?" \
--fields "key=nonemployee_compensation_box1,type=float,displayName=Nonemployee Compensation (Box 1),prompt=What is the nonemployee compensation in Box 1?" \
--fields "key=federal_tax_withheld_box4,type=float,displayName=Federal Tax Withheld (Box 4),prompt=What is the federal income tax withheld in Box 4?" \
--token $BOX_DEVELOPER_TOKEN --json
1099-INT:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=payer_name,type=string,displayName=Payer Name,prompt=What is the payer name?" \
--fields "key=interest_income_box1,type=float,displayName=Interest Income (Box 1),prompt=What is the interest income in Box 1?" \
--fields "key=early_withdrawal_penalty_box2,type=float,displayName=Early Withdrawal Penalty (Box 2),prompt=What is the early withdrawal penalty in Box 2?" \
--fields "key=federal_tax_withheld_box4,type=float,displayName=Federal Tax Withheld (Box 4),prompt=What is the federal income tax withheld in Box 4?" \
--token $BOX_DEVELOPER_TOKEN --json
1099-DIV:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=payer_name,type=string,displayName=Payer Name,prompt=What is the payer name?" \
--fields "key=ordinary_dividends_box1a,type=float,displayName=Ordinary Dividends (Box 1a),prompt=What are the ordinary dividends in Box 1a?" \
--fields "key=qualified_dividends_box1b,type=float,displayName=Qualified Dividends (Box 1b),prompt=What are the qualified dividends in Box 1b?" \
--fields "key=capital_gain_box2a,type=float,displayName=Capital Gain (Box 2a),prompt=What is the total capital gain distribution in Box 2a?" \
--fields "key=federal_tax_withheld_box4,type=float,displayName=Federal Tax Withheld (Box 4),prompt=What is the federal income tax withheld in Box 4?" \
--token $BOX_DEVELOPER_TOKEN --json
Receipt/Invoice:
npx @box/cli ai:extract-structured \
--items="id=FILE_ID,type=file" \
--fields "key=vendor,type=string,displayName=Vendor,prompt=What is the vendor or merchant name?" \
--fields "key=date,type=date,displayName=Date,prompt=What is the invoice or receipt date?" \
--fields "key=amount,type=float,displayName=Total Amount,prompt=What is the total amount?" \
--fields "key=category,type=string,displayName=Category,prompt=What category does this expense belong to?" \
--fields "key=notes,type=string,displayName=Notes,prompt=Briefly summarize what was purchased or invoiced" \
--token $BOX_DEVELOPER_TOKEN --json
Unknown document type — use freeform extraction:
npx @box/cli ai:extract \
--items="id=FILE_ID,type=file" \
--prompt "Extract all key financial data: document type, names, dates, amounts, account numbers, tax IDs, and any other relevant fields" \
--token $BOX_DEVELOPER_TOKEN --json
If Box AI extraction fails (API error, unsupported format, empty response, etc.), do NOT fall back to downloading the file and parsing it locally with Python. Instead:
Do NOT write Python scripts, use pdfplumber, or attempt any local text extraction. The Box AI Extract API is the only extraction method.
For EACH document you process, output its file reference as a JSON code fence FIRST, then show the extracted data below it. NEVER group all files into one JSON array. NEVER list files as text without a JSON code fence.
Pattern to follow for EVERY file:
Extracted data from the W-2:
```json
[{ "fileId": "111", "fileName": "W2_Acme.pdf", "type": "W-2", "boxPath": "Tax Docs/02_Income" }]
```
| Field | Value |
|---|---|
| Employer | Acme Robotics |
| Wages (Box 1) | $85,000 |
Next, the 1099-INT:
```json
[{ "fileId": "222", "fileName": "1099INT_Bluebird.pdf", "type": "1099-INT", "boxPath": "Tax Docs/02_Income" }]
```
| Field | Value |
|---|---|
| Payer | Bluebird Bank |
| Interest Income | $1,250 |
Each JSON code fence becomes a clickable file card in the UI.
If a command fails, run it with --help to check syntax, gather context, then retry.