reading-receipt

Original🇨🇳 Chinese
Translated

Reads images of receipts, payment receipts, and Furusato Nozei donation receipts and returns structured data. It can be called from other skills or directly by users.

21installs
Added on

NPX Install

npx skill4agent add kazukinagata/shinkoku reading-receipt

SKILL.md Content (Chinese)

View Translation Comparison →

Receipt, Payment Receipt, Furusato Nozei Donation Receipt Image Reading

This skill reads images of receipts, payment receipts, and Furusato Nozei donation receipts and returns them as structured data.

Image Reading Methods

Recommended: Dual Verification (Parallel Two Contexts)

To improve accuracy, read the same image in two independent contexts in parallel and collate the results.
  1. Execute two independent readings: In an environment 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 amount) from both reading results.
  3. If results match: Adopt the result as-is. 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
  • Offer three options: Adopt A / Adopt B / Manual Input

Fallback (When Sub-Agents Are Not Supported)

In environments where sub-agents are not available, 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 always 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 int (integer in yen). Remove commas and the "yen" character
  • Return dates in YYYY-MM-DD format
  • Convert Japanese eras to Western calendar (Reiwa 7 → 2025, Reiwa 6 → 2024, Heisei 31 → 2019)
  • For unreadable fields, use UNKNOWN (string) or 0 (amount)
  • If multiple files are provided, process all in order and return the combined results

Output Format

For Receipts/Payment Receipts

Read the image and return it in the following format:
---RECEIPT_DATA---
date: YYYY-MM-DD
vendor: Store name
total_amount: Amount (int)
tax_included: true/false
items:
  - name: Item name
    amount: Amount (int)
    quantity: Quantity (int)
---END---

For Furusato Nozei Donation Receipts

Read the image and return it in the following format:
---FURUSATO_RECEIPT_DATA---
municipality_name: Municipality name (city, town, village)
prefecture: Prefecture name
amount: Donation amount (int)
date: YYYY-MM-DD
receipt_number: Receipt certificate number (UNKNOWN if not stated)
---END---

Extraction Points

Receipts/Payment Receipts

  • Prioritize extracting the total amount (tax-included)
  • Confirm whether tax is included or excluded (look for "tax-included" or "tax-excluded" notations)
  • Extract items to the extent readable (leave items empty if unknown)
  • Extract the store name from the logo or name at the top of the receipt
  • Use the transaction date on the receipt (not the issue date) as the date

Furusato Nozei Donation Receipts

  • Confirm the title "Donation Receipt"
  • Extract the official name of the municipality (e.g., "XX City", "XX Town", "XX Village")
  • The prefecture name is often stated before the municipality name
  • Extract the donation amount from the "Amount" or "Donation Amount" field
  • Use the donation receipt date as the date
  • Extract the receipt certificate number from notations like "No. XX"

Processing Multiple Files

When multiple file paths are specified, or when a file list is obtained using a Glob pattern:
  1. Obtain the file list using the Glob tool (if a pattern is specified)
  2. Read each file in sequence using the Read tool
  3. Return the combined results of all files (state the file name before each result)
## file1.jpg
---RECEIPT_DATA---
...
---END---

## file2.jpg
---RECEIPT_DATA---
...
---END---