kazukinagata avatar

Reading Payment Statement

Extracts structured data from Japanese payment statement images (支払調書), the tax documents that report freelance income and withholding. It handles both PDFs and images, trying text extraction first before falling back to OCR. The clever bit is the dual verification mode: it spins up two parallel sub-agents to read the same document independently, then compares results to catch OCR errors. If they disagree, you pick which one looks right. Falls back to single-pass OCR with mandatory human review if sub-agents aren't available. Returns structured data with payer name, payment amount, withholding tax, and category. Useful if you're building Japanese tax prep tools or need to digitize a stack of these forms without manually typing numbers.

skills.sh installs
318
GitHub stars
368
last updated
Aug 21, 2026

Install

$ npx -y skills add kazukinagata/shinkoku --skill reading-payment-statement --agent claude-code

Installs into .claude/skills of the current project.

Files

支払調書 画像読み取り

支払調書(報酬、料金、契約金及び賞金の支払調書)の画像を読み取り、構造化データとして返すスキル。

PDF ファイルの場合

ファイルが PDF(.pdf)の場合、画像 OCR の前にテキスト抽出を試みる。

  1. shinkoku pdf extract-text --file-path <path> を実行する
  2. 抽出テキストに必要な情報(支払金額・源泉徴収税額等)が含まれていれば、テキストから構造化データを生成する
  3. テキストが不十分(スキャン PDF 等)の場合は shinkoku pdf to-image --file-path <path> --output-dir <dir> で PNG に変換し、以下の画像読み取りフローに進む

画像読み取り方法

推奨: デュアル検証(並列2コンテキスト)

精度を高めるため、同じ画像を2つの独立したコンテキストで並列に読み取り、結果を照合する。

  1. 2つの独立した読み取りを実行する: サブエージェントが使える環境では、2つのサブエージェントを並列で起動し、それぞれ独立に画像を読み取る。 各サブエージェントには以下の「基本ルール」と「出力フォーマット」をプロンプトとして渡し、画像ファイルパスを指定する。

  2. 結果照合: 両方の読み取り結果から主要フィールド(金額等)を比較する。

  3. 一致の場合: そのまま採用。「2つの独立した読み取りで結果が一致しました」と報告する。

  4. 不一致の場合: ユーザーに元画像パスと両方の結果を提示し、正しい方を選択してもらう:

    • 差異のあるフィールドを明示する
    • A を採用 / B を採用 / 手動入力 の3択を提示する

フォールバック(サブエージェント非対応の場合)

サブエージェントが利用できない環境では、以下の手順で読み取る:

  1. 画像ファイルを直接 Read ツールで読み取る
  2. 以下の「基本ルール」と「出力フォーマット」に従ってデータを抽出する
  3. 抽出結果をユーザーに提示し、必ず目視確認を依頼する

⚠ デュアル検証が利用できないため、必ずユーザーに目視確認を依頼してください。

基本ルール

Sponsors

Details

Repository
github.com/kazukinagata/shinkoku
Category
Finance & Trading
License
MIT
First seen
Jun 3, 2026

More from kazukinagata/shinkoku

All 24
1meission avatareastmoney_select_stockmeission/eastmoney本 Skill 支持基于股票选股条件(行情指标、财务指标等)筛选满足条件的股票;可查询指定行业/板块内的股票、上市公司,以及板块指数的成分股;同时支持股票、上市公司、板块/指数推荐等相关任务,避免大模型在选股时使用过时信息。304skills.sh installs
2davila7 avatarinvoice-organizerdavila7/claude-code-templatesAutomatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting th300skills.sh installs
3sickn33 avatarstartup-financial-modelingsickn33/antigravity-awesome-skillsstartup financial modeling281skills.sh installs
4octagonai avatarfinancial-growthoctagonai/skillsRetrieve comprehensive year-over-year growth in key financial metrics including Revenue, Gross Profit, Operating Income, Net Income, EPS, and Free Cash Flow. Us270skills.sh installs
5octagonai avatarearnings-financial-guidanceoctagonai/skillsExtract and analyze financial guidance and forward-looking statements from earnings transcripts, including segment guidance, risk factors, and guidance vs. actu268skills.sh installs
6octagonai avatarstock-price-changeoctagonai/skillsRetrieve stock price change statistics across multiple time periods using Octagon MCP. Use when analyzing short-term and long-term returns, comparing performanc263skills.sh installs