reading-receipt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseレシート・領収書・ふるさと納税受領証明書 画像読み取り
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
推奨: デュアル検証(並列2コンテキスト)
Recommended: Dual Verification (Parallel Two Contexts)
精度を高めるため、同じ画像を2つの独立したコンテキストで並列に読み取り、結果を照合する。
-
2つの独立した読み取りを実行する: サブエージェントが使える環境では、2つのサブエージェントを並列で起動し、それぞれ独立に画像を読み取る。 各サブエージェントには以下の「基本ルール」と「出力フォーマット」をプロンプトとして渡し、画像ファイルパスを指定する。
-
結果照合: 両方の読み取り結果から主要フィールド(金額等)を比較する。
-
一致の場合: そのまま採用。「2つの独立した読み取りで結果が一致しました」と報告する。
-
不一致の場合: ユーザーに元画像パスと両方の結果を提示し、正しい方を選択してもらう:
- 差異のあるフィールドを明示する
- A を採用 / B を採用 / 手動入力 の3択を提示する
To improve accuracy, read the same image in two independent contexts in parallel and collate the results.
-
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.
-
Result Collation: Compare key fields (such as amount) from both reading results.
-
If results match: Adopt the result as-is. Report "Results matched in two independent readings."
-
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)
サブエージェントが利用できない環境では、以下の手順で読み取る:
- 画像ファイルを直接 Read ツールで読み取る
- 以下の「基本ルール」と「出力フォーマット」に従ってデータを抽出する
- 抽出結果をユーザーに提示し、必ず目視確認を依頼する
⚠ デュアル検証が利用できないため、必ずユーザーに目視確認を依頼してください。
In environments where sub-agents are not available, follow these steps to read the image:
- Read the image file directly using the Read tool
- Extract data according to the "Basic Rules" and "Output Format" below
- 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 ツールで読み取る(Claude Vision が自動的に画像を認識する)
- 金額は必ず int(円単位の整数)で返す。カンマや「円」は除去する
- 日付は YYYY-MM-DD 形式で返す
- 和暦は西暦に変換する(令和7年 → 2025、令和6年 → 2024、平成31年 → 2019)
- 読み取れないフィールドは UNKNOWN(文字列)または 0(金額)とする
- 複数ファイルを渡された場合は全て順に処理してまとめて返す
- 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
画像を読み取り、以下の形式で返す:
---RECEIPT_DATA---
date: YYYY-MM-DD
vendor: 店舗名
total_amount: 金額(int)
tax_included: true/false
items:
- name: 品目名
amount: 金額(int)
quantity: 数量(int)
---END---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
画像を読み取り、以下の形式で返す:
---FURUSATO_RECEIPT_DATA---
municipality_name: 自治体名(市区町村名)
prefecture: 都道府県名
amount: 寄附金額(int)
date: YYYY-MM-DD
receipt_number: 受領証明書番号(記載がなければ UNKNOWN)
---END---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
- 合計金額(税込)を最優先で抽出する
- 内税・外税の区別を確認する(「税込」「税抜」の記載)
- 品目は読み取れる範囲で抽出する(不明な場合は items を空にする)
- 店舗名はレシート上部のロゴや名称から抽出する
- 日付はレシート上の取引日を使用する(発行日ではなく)
- 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
複数のファイルパスが指示された場合、または Glob パターンでファイル一覧を取得した場合:
- Glob ツールでファイル一覧を取得する(パターンが指示された場合)
- 各ファイルを Read ツールで順に読み取る
- 全ファイルの結果をまとめて返す(各結果の前にファイル名を記載する)
undefinedWhen multiple file paths are specified, or when a file list is obtained using a Glob pattern:
- Obtain the file list using the Glob tool (if a pattern is specified)
- Read each file in sequence using the Read tool
- Return the combined results of all files (state the file name before each result)
undefinedfile1.jpg
file1.jpg
---RECEIPT_DATA---
...
---END---
---RECEIPT_DATA---
...
---END---
file2.jpg
file2.jpg
---RECEIPT_DATA---
...
---END---
undefined---RECEIPT_DATA---
...
---END---
undefined