
Reading Withholding
This extracts structured data from Japanese withholding tax certificate images (源泉徴収票), the kind you need for tax filing. It handles both scanned PDFs and image files, pulling out payment amounts, withheld tax, social insurance, and insurance deduction breakdowns. The interesting part is the dual verification approach: when sub-agents are available, it reads the same image in two independent contexts and compares results, asking you to resolve conflicts if they don't match. Otherwise it falls back to single-pass OCR with mandatory manual verification. Converts Japanese era dates to standard format and outputs everything as structured integers. Useful if you're building Japanese tax prep tools or just tired of manually transcribing these forms.
- skills.sh installs
- 331
- GitHub stars
- 368
- last updated
- Aug 21, 2026
Install
$ npx -y skills add kazukinagata/shinkoku --skill reading-withholding --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 Receipt328
- Consumption Tax327
- Settlement327
- Submit326
- Setup325
- Invoice System320
- Reading Deduction Cert319
- 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