Contract Field Extractor Skill
Use this skill to extract configured fields from contract text that is already available in the conversation or supplied by another system. This skill does not read files, parse PDF/DOCX bytes, OCR images, or inspect uploads directly.
Scope
Use this skill for:
- Extracting contract parties, contract name, contract number, amount, currency, signing date, effective date, expiry date, term, payment terms, renewal terms, breach clauses, jurisdiction, contacts, and other configured fields.
- Producing JSON, Markdown, or CSV-ready structured contract extraction results.
- Preparing contract ledger rows for later database insertion or manual review.
- Returning confidence, evidence, source location, status, and notes for every configured field.
Do not use this skill to:
- Parse uploaded files directly.
- OCR scanned contracts or screenshots.
- Provide final legal advice, enforceability conclusions, or legal risk certification.
- Invent missing contract content.
- Write database records directly without a separate database handoff and confirmation.
Workflow
- Confirm contract text is available. It must be pasted text, prior chat context, or parsed contract content supplied by another system.
- Confirm the configured field list is available. Do not invent a field list for a production extraction request.
- If the user asks to use a built-in field template, read
field-templates.md and use the exact template schema.
- If contract text or field configuration is missing, call
request_user_input.
- Read
field-schema-contract.md before interpreting field configuration.
- Read
extraction-rules.md before extracting values.
- Extract every configured field, including required fields. Missing required fields must still appear in the output.
- When no contract value exists and no explicit default is configured, return
value: "未提取到" and extraction_status: "missing".
- When no contract value exists but the field has an explicit configured default and the rules allow using it, return that default with
extraction_status: "defaulted".
- Read
confidence-rules.md and assign confidence for every field.
- Read
output-format.md and return the structured result in the requested format. Default to JSON in the answer when no export is requested.
- If the user asks to export, save, download, or generate a contract ledger file, read
contract-ledger-export.md and call generate_file.
- If the user asks to write results to a database, read
database-handoff.md; prepare a reviewed mapping and ask for confirmation before routing to any database skill.
Clarification Workflow
Call request_user_input instead of writing a plain clarification when missing information blocks reliable extraction.
Ask when:
- No contract text or parsed contract content is available.
- No field list is available and the user did not choose a built-in field template.
- Field definitions are missing required details such as
key, label, or type.
- The user asks to export but the output format is ambiguous and cannot be inferred.
- The user asks to write to a database but database/table/field mapping is unclear.
Example request_user_input payload:
{
"message": "I can extract contract fields, but need the contract text and field configuration first.",
"questions": [
{
"id": "contract_text",
"question": "Please provide the parsed contract text or confirm which available contract text should be used."
},
{
"id": "field_list",
"question": "Please provide the field list, or choose a field template.",
"options": [
{ "label": "basic contract info" },
{ "label": "parties and contacts" },
{ "label": "amount and payment" },
{ "label": "term and performance" },
{ "label": "risk and clauses" }
]
}
]
}
After calling request_user_input, stop the turn and wait for the user's answer.
References
Read the relevant references before producing final output:
| Task |
Read reference |
| Use a built-in field template |
field-templates.md |
| Interpret configured field list and field metadata |
field-schema-contract.md |
| Extract values without inventing content |
extraction-rules.md |
| Assign confidence and status |
confidence-rules.md |
| Format structured result |
output-format.md |
| Export JSON, CSV, Markdown, or ledger file |
contract-ledger-export.md |
| Prepare database handoff mapping |
database-handoff.md |
Output Contract
Each configured field must produce one result object:
field_key
field_label
value
normalized_value
value_type
extraction_status
confidence
evidence
source_location
notes
When no value is explicitly present in the contract and no explicit default is configured, return:
value: 未提取到
normalized_value: empty string
extraction_status: missing
confidence: 0
evidence: empty string
When no value is explicitly present in the contract but an explicit default is configured and allowed, return:
value: the configured default value
normalized_value: normalized configured default when applicable
extraction_status: defaulted
confidence: 0 unless the default rule says otherwise
evidence: empty string
notes: explain that the value came from configuration, not contract text
Constraints
- Do not parse uploaded files directly. Rely on contract text already supplied by the platform or another system.
- Do not fabricate fields, values, dates, amounts, parties, clauses, or legal conclusions.
- Do not omit a configured field just because it is missing in the contract.
- Do not fill missing required fields with guesses. Use
未提取到 when there is no contract value and no explicit default.
- Do not output a value without evidence unless the field used an explicit default value.
- Do not treat a default value as extracted contract text. Use
extraction_status: "defaulted".
- Do not write to a database directly from this skill.
- For legal, financial, and compliance use, state that extracted results should be reviewed before use.
1---2name: contract-field-extractor3description: Extract structured contract fields from existing contract text or already parsed contract content according to a configured field list. Use when the user asks for 合同字段抽取, 合同信息抽取, 合同关键信息提取, 合同台账, contract field extraction, contract metadata extraction, contract ledger data, or extracting parties, amount, dates, term, payment terms, renewal terms, breach clauses, or other configured contract fields. This skill does not parse uploaded files directly; it works only after contract text is available from another system or parser.4---56# Contract Field Extractor Skill78Use this skill to extract configured fields from contract text that is already available in the conversation or supplied by another system. This skill does not read files, parse PDF/DOCX bytes, OCR images, or inspect uploads directly.910## Scope1112Use this skill for:1314- Extracting contract parties, contract name, contract number, amount, currency, signing date, effective date, expiry date, term, payment terms, renewal terms, breach clauses, jurisdiction, contacts, and other configured fields.15- Producing JSON, Markdown, or CSV-ready structured contract extraction results.16- Preparing contract ledger rows for later database insertion or manual review.17- Returning confidence, evidence, source location, status, and notes for every configured field.1819Do not use this skill to:2021- Parse uploaded files directly.22- OCR scanned contracts or screenshots.23- Provide final legal advice, enforceability conclusions, or legal risk certification.24- Invent missing contract content.25- Write database records directly without a separate database handoff and confirmation.2627## Workflow28291. Confirm contract text is available. It must be pasted text, prior chat context, or parsed contract content supplied by another system.302. Confirm the configured field list is available. Do not invent a field list for a production extraction request.313. If the user asks to use a built-in field template, read `field-templates.md` and use the exact template schema.324. If contract text or field configuration is missing, call `request_user_input`.335. Read `field-schema-contract.md` before interpreting field configuration.346. Read `extraction-rules.md` before extracting values.357. Extract every configured field, including required fields. Missing required fields must still appear in the output.368. When no contract value exists and no explicit default is configured, return `value: "未提取到"` and `extraction_status: "missing"`.379. When no contract value exists but the field has an explicit configured default and the rules allow using it, return that default with `extraction_status: "defaulted"`.3810. Read `confidence-rules.md` and assign confidence for every field.3911. Read `output-format.md` and return the structured result in the requested format. Default to JSON in the answer when no export is requested.4012. If the user asks to export, save, download, or generate a contract ledger file, read `contract-ledger-export.md` and call `generate_file`.4113. If the user asks to write results to a database, read `database-handoff.md`; prepare a reviewed mapping and ask for confirmation before routing to any database skill.4243## Clarification Workflow4445Call `request_user_input` instead of writing a plain clarification when missing information blocks reliable extraction.4647Ask when:4849- No contract text or parsed contract content is available.50- No field list is available and the user did not choose a built-in field template.51- Field definitions are missing required details such as `key`, `label`, or `type`.52- The user asks to export but the output format is ambiguous and cannot be inferred.53- The user asks to write to a database but database/table/field mapping is unclear.5455Example `request_user_input` payload:5657```json58{59 "message": "I can extract contract fields, but need the contract text and field configuration first.",60 "questions": [61 {62 "id": "contract_text",63 "question": "Please provide the parsed contract text or confirm which available contract text should be used."64 },65 {66 "id": "field_list",67 "question": "Please provide the field list, or choose a field template.",68 "options": [69 { "label": "basic contract info" },70 { "label": "parties and contacts" },71 { "label": "amount and payment" },72 { "label": "term and performance" },73 { "label": "risk and clauses" }74 ]75 }76 ]77}78```7980After calling `request_user_input`, stop the turn and wait for the user's answer.8182## References8384Read the relevant references before producing final output:8586| Task | Read reference |87| --- | --- |88| Use a built-in field template | `field-templates.md` |89| Interpret configured field list and field metadata | `field-schema-contract.md` |90| Extract values without inventing content | `extraction-rules.md` |91| Assign confidence and status | `confidence-rules.md` |92| Format structured result | `output-format.md` |93| Export JSON, CSV, Markdown, or ledger file | `contract-ledger-export.md` |94| Prepare database handoff mapping | `database-handoff.md` |9596## Output Contract9798Each configured field must produce one result object:99100- `field_key`101- `field_label`102- `value`103- `normalized_value`104- `value_type`105- `extraction_status`106- `confidence`107- `evidence`108- `source_location`109- `notes`110111When no value is explicitly present in the contract and no explicit default is configured, return:112113- `value`: `未提取到`114- `normalized_value`: empty string115- `extraction_status`: `missing`116- `confidence`: `0`117- `evidence`: empty string118119When no value is explicitly present in the contract but an explicit default is configured and allowed, return:120121- `value`: the configured default value122- `normalized_value`: normalized configured default when applicable123- `extraction_status`: `defaulted`124- `confidence`: `0` unless the default rule says otherwise125- `evidence`: empty string126- `notes`: explain that the value came from configuration, not contract text127128## Constraints129130- Do not parse uploaded files directly. Rely on contract text already supplied by the platform or another system.131- Do not fabricate fields, values, dates, amounts, parties, clauses, or legal conclusions.132- Do not omit a configured field just because it is missing in the contract.133- Do not fill missing required fields with guesses. Use `未提取到` when there is no contract value and no explicit default.134- Do not output a value without evidence unless the field used an explicit default value.135- Do not treat a default value as extracted contract text. Use `extraction_status: "defaulted"`.136- Do not write to a database directly from this skill.137- For legal, financial, and compliance use, state that extracted results should be reviewed before use.