reading-deduction-cert

Original🇨🇳 Chinese
Translated

Reads images of deduction certificates (life insurance premiums, earthquake insurance premiums, etc.) and returns structured data. It can be called from other skills or directly by users.

2installs
Added on

NPX Install

npx skill4agent add kazukinagata/shinkoku reading-deduction-cert

SKILL.md Content (Chinese)

View Translation Comparison →

Deduction Certificate Image Reading

A skill that reads images of deduction certificates (life insurance premium deduction certificates, earthquake insurance premium deduction certificates, social insurance premium deduction certificates, etc.) and returns them as structured data.

Image Reading Methods

Recommended: Dual Verification (Parallel 2 Contexts)

To improve accuracy, read the same image in parallel using two independent contexts and collate the results.
  1. Execute two independent readings: In environments where sub-agents are available, launch two sub-agents in parallel to read the image independently. Pass the following "Basic Rules" and "Output Format" as prompts to each sub-agent, and specify the image file path.
  2. Result collation: Compare key fields (such as amounts) from both reading results.
  3. If results match: Adopt the result directly. Report "Results matched in two independent readings."
  4. If results do not match: Present the original image path and both results to the user, and ask them to select the correct one:
    • Clearly indicate fields with discrepancies
    • Provide three options: Adopt A / Adopt B / Manual input

Fallback (When Sub-Agents Are Not Supported)

In environments where sub-agents are unavailable, follow these steps to read the image:
  1. Read the image file directly using the Read Tool
  2. Extract data according to the "Basic Rules" and "Output Format" below
  3. Present the extraction results to the user and must request visual confirmation
⚠ Since dual verification is not available, be sure to request visual confirmation from the user.

Basic Rules

  • Read image files using the Read Tool (Claude Vision automatically recognizes images)
  • Always return amounts as integers (in yen, without commas or the "yen" character)
  • Return dates in YYYY-MM-DD format
  • Convert Japanese calendar years to Western calendar years (Reiwa 7 → 2025, Reiwa 6 → 2024, Heisei 31 → 2019)
  • For unreadable fields, use UNKNOWN (string) or 0 (amount)

Target Documents

  • Life insurance premium deduction certificate
  • Earthquake insurance premium deduction certificate
  • Social insurance premium (national pension insurance premium) deduction certificate
  • Small business mutual aid payment certificate (including iDeCo)

Output Format

Return as a JSON object. Amounts must be integers (in yen).

Life Insurance Premium Deduction Certificate

json
{
  "certificate_type": "life_insurance",
  "policy_type": "new system or old system",
  "category": "general or long-term care medical or individual pension",
  "company_name": "insurance company name",
  "policy_number": "policy number",
  "annual_premium": 120000,
  "dividend": 0
}

Earthquake Insurance Premium Deduction Certificate

json
{
  "certificate_type": "earthquake_insurance",
  "company_name": "insurance company name",
  "policy_number": "policy number",
  "annual_premium": 50000,
  "is_old_long_term": false
}

Social Insurance Premium Deduction Certificate

json
{
  "certificate_type": "social_insurance",
  "insurance_type": "national_pension",
  "annual_premium": 200000,
  "period": "target period"
}

Small Business Mutual Aid Payment Certificate

json
{
  "certificate_type": "small_business_mutual_aid",
  "sub_type": "ideco or small_business or disability",
  "annual_contribution": 276000
}

Extraction Points

  • First determine the document type (life insurance premium/earthquake insurance premium/social insurance premium/small business mutual aid, etc.)
  • For life insurance premium deductions, confirm the distinction between new and old systems, and classify into three categories (general/long-term care medical/individual pension)
  • For earthquake insurance premium deductions, confirm whether it is old long-term non-life insurance
  • If "certified amount" and "declared amount" differ for amounts, use the "declared amount"
  • Extract insurance company name and policy number for verification purposes