
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.
$ npx -y skills add kazukinagata/shinkoku --skill reading-payment-statement --agent claude-codeInstalls into .claude/skills of the current project.
支払調書(報酬、料金、契約金及び賞金の支払調書)の画像を読み取り、構造化データとして返すスキル。
ファイルが PDF(.pdf)の場合、画像 OCR の前にテキスト抽出を試みる。
shinkoku pdf extract-text --file-path <path> を実行するshinkoku pdf to-image --file-path <path> --output-dir <dir> で PNG に変換し、以下の画像読み取りフローに進む精度を高めるため、同じ画像を2つの独立したコンテキストで並列に読み取り、結果を照合する。
2つの独立した読み取りを実行する: サブエージェントが使える環境では、2つのサブエージェントを並列で起動し、それぞれ独立に画像を読み取る。 各サブエージェントには以下の「基本ルール」と「出力フォーマット」をプロンプトとして渡し、画像ファイルパスを指定する。
結果照合: 両方の読み取り結果から主要フィールド(金額等)を比較する。
一致の場合: そのまま採用。「2つの独立した読み取りで結果が一致しました」と報告する。
不一致の場合: ユーザーに元画像パスと両方の結果を提示し、正しい方を選択してもらう:
サブエージェントが利用できない環境では、以下の手順で読み取る:
⚠ デュアル検証が利用できないため、必ずユーザーに目視確認を依頼してください。
Sponsors