
Reading Deduction Cert
This reads Japanese tax deduction certificates (life insurance, earthquake insurance, social insurance, and pension contributions) from images or PDFs and returns structured JSON. It tries text extraction first on PDFs, then falls back to OCR if needed. The interesting bit is the dual verification approach where it runs two independent reads in parallel subagents and compares results, asking you to resolve discrepancies only when the outputs differ. Handles the messy parts like converting Japanese era dates to Gregorian and distinguishing between old and new insurance schemes. If you're building tax filing automation for Japan, this solves the tedious certificate data entry problem with a built-in accuracy check.
- skills.sh installs
- 319
- GitHub stars
- 368
- last updated
- Aug 21, 2026
Install
$ npx -y skills add kazukinagata/shinkoku --skill reading-deduction-cert --agent claude-codeInstalls into .claude/skills of the current project.
Files
控除証明書 画像読み取り
控除証明書(生命保険料控除証明書、地震保険料控除証明書、社会保険料控除証明書等)の画像を読み取り、構造化データとして返すスキル。
PDF ファイルの場合
ファイルが PDF(.pdf)の場合、画像 OCR の前にテキスト抽出を試みる。
shinkoku pdf extract-text --file-path <path>を実行する- 抽出テキストに必要な情報(保険料額・証明額等)が含まれていれば、テキストから構造化データを生成する
- テキストが不十分(スキャン PDF 等)の場合は
shinkoku pdf to-image --file-path <path> --output-dir <dir>で PNG に変換し、以下の画像読み取りフローに進む
画像読み取り方法
推奨: デュアル検証(並列2コンテキスト)
精度を高めるため、同じ画像を2つの独立したコンテキストで並列に読み取り、結果を照合する。
-
2つの独立した読み取りを実行する: サブエージェントが使える環境では、2つのサブエージェントを並列で起動し、それぞれ独立に画像を読み取る。 各サブエージェントには以下の「基本ルール」と「出力フォーマット」をプロンプトとして渡し、画像ファイルパスを指定する。
-
結果照合: 両方の読み取り結果から主要フィールド(金額等)を比較する。
-
一致の場合: そのまま採用。「2つの独立した読み取りで結果が一致しました」と報告する。
-
不一致の場合: ユーザーに元画像パスと両方の結果を提示し、正しい方を選択してもらう:
- 差異のあるフィールドを明示する
- A を採用 / B を採用 / 手動入力 の3択を提示する
フォールバック(サブエージェント非対応の場合)
サブエージェントが利用できない環境では、以下の手順で読み取る:
- 画像ファイルを直接 Read ツールで読み取る
- 以下の「基本ルール」と「出力フォーマット」に従ってデータを抽出する
- 抽出結果をユーザーに提示し、必ず目視確認を依頼する
⚠ デュアル検証が利用できないため、必ずユーザーに目視確認を依頼してください。
基本ルール
Sponsors
Details
- Repository
- github.com/kazukinagata/shinkoku
- License
- MIT
- First seen
- Jun 3, 2026
More from kazukinagata/shinkoku
All 24- Reading Payment Statement318
- Incorporation317
- Furusato315
- Capabilities314
- E Bookkeeping Compliance280
- Tax Legal Context204
- Tax Housing Loan Context193
- Tax Ebookkeeping Context192
- Tax Invoice Credit Context189
- Tax Advisor457
- Reading Invoice383
- Journal343
- E Tax342
- Income Tax341
- Assess339
- Gather335
- Reading Withholding331
- Reading Receipt328
- Consumption Tax327
- Settlement327
- Submit326
- Setup325
- Invoice System320