Receipt Expense Workflow logo

Receipt Expense Workflow

Community
aktsmm
receipt-expense-workflow

Company expense receipt workflow. OCR, rename, sort, summarize, and prepare receipt images/PDFs/videos for D365 expense mapping and attachment. Use when sorting company expense receipts, organizing travel expense files, OCR renaming, receipt sorting, expense sorting, レシート仕分け, 出張経費バッチ, D365経費仕分け, D365経費カテゴリマッピング, or D365経費精算. Not for personal or sole-proprietor tax receipts (確定申告).

Overview

Publisheraktsmm
RepositoryAgent-Skills
Skill namereceipt-expense-workflow
Stars
27
Forks
5
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by aktsmm on GitHub. Read the source before you install it.

Installation

Install the Receipt Expense Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aktsmm/Agent-Skills/tree/master/receipt-expense-workflow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aktsmm/Agent-Skills.git /tmp/Agent-Skills
mkdir -p .claude/skills
cp -r /tmp/Agent-Skills/receipt-expense-workflow .claude/skills/receipt-expense-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Receipt Expense Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Receipt Expense Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Receipt Expense Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Receipt Expense Workflow

OCR(Surya)を使った領収書の自動仕分け・リネーム・集計ツール。

When to Use

  • 領収書を仕分けて, レシートを整理して, receipt sorting
  • フォルダ内の領収書画像をプロジェクト単位で自動整理したい
  • 大量のレシート写真に日付・金額・用途でファイル名を付けたい
  • 出張経費の領収書を一括でリネーム&集計したい

Core Workflow

  1. 入力フォルダの画像 / PDF / ZIP / 動画を受け取る
  2. OCR で日付・金額・国・カード・用途を抽出する
  3. 品質補正をかけて標準ファイル名へ正規化する
  4. プロジェクト単位で仕分ける
  5. Markdown サマリーを出す

Architecture

入力フォルダ(incoming/unassigned 等)
  │
  ├─ JPEG/PNG/PDF/ZIP → OCR → 抽出 → リネーム → PJフォルダへ移動
  ├─ MP4/MOV → ffmpeg → JPG → OCR → ...
  │
  ├─ カード不明 or テキスト不可 → 未分類フォルダ → 再仕分け可能
  │
  └─ 個人経費(D365対象外) → PJフォルダ/private/

private/ フォルダ: D365 に申請しない個人経費レシートを格納する。OCR後にユーザーが「個人経費」と判断した場合に移動する。

Naming Convention

YYYY-MM-DD-国コード-金額[-カード]-分類.ext

例:
  2026-02-09-jpn-14320-amex-shinkansen.jpeg
  2026-02-11-us-272-amex-hotel.jpeg
  2026-02-12-us-190.38-meal.jpeg        ← カードなし
  2026-02-09-us-6.80-amex-meal-starbucks.jpeg

国コード一覧、分類一覧、D365 カテゴリ対応、添付手順は references/d365-expense-guide.md を参照。

CLI Usage

powershell
# Dry-run(確認のみ、ファイル移動なし)
python receipt_sorter.py --project "202602_Domestic_Trip" --dry-run

# 本実行
python receipt_sorter.py --project "202602_Domestic_Trip" --input "incoming\unassigned"

# ログ指定
python receipt_sorter.py --project "202602_Domestic_Trip" --input "incoming\unassigned" --log "result.csv"

Options

オプション説明デフォルト
--project出力PJフォルダ名(必須)-
--input入力フォルダincoming/unassigned/
--dry-runファイル移動せず結果のみ表示false
--log結果CSVパス<PJフォルダ>/csv/<PJ名>_dryrun.csv or _result.csv

Markdown Summary Output

本実行後、PJフォルダに <PJ名>_summary.md が自動生成される。

含む内容:

  • プロジェクト合計(通貨混在・参考値)
  • 国コード別合計テーブル
  • 日付×国コード別合計テーブル
  • 全明細テーブル(日付・国・金額・カード・分類・日本語概要・ファイル名)

Intake Pattern

  • 未分類の生ファイルは、workspace root ではなく専用の intake folder に集約する
  • 例: incoming/unassigned/
  • 案件が確定しているファイルは、intake folder を経由せず project folder へ直接入れてよい
  • 案件が不明な出張明細は、移動前に read-only の承認記録、予定表、予約記録を日付・区間・目的で照合する。一致しなければ --project を推測せず、未分類に残して確認する
  • システム発行の交通領収書は表示日や購入日ではなくサービス日・乗車日を使う。出発地と到着地が両方確認できる場合だけ、分類末尾へ origin-to-destination を付けて往復を区別する
  • 実行対象を専用 intake に限定し、dry-run の結果を確認してから本実行する
  • 重複照合はハッシュだけでなく日付・店名・金額・証憑番号で行う。同額だけでは重複とせず、撮影違い・領収証と決済控えは主証憑と補助資料として保持し、取引集計・D365明細を重ねて作らない
  • dry-run 用のコピーや検証入力は一時フォルダで扱い、完了後に削除する

Setup

→ references/setup-guide.md

Script Reference

D365 Expense Integration

OCR 後のファイルを D365 Expense に添付する運用はこの skill の重要ユースケースだが、カテゴリ表と添付手順は本体から分離する。

  • Report 作成 / metadata 編集
  • Expense line の Category / Description / Country / tax group 編集
  • line-level receipt upload / 差し替え / 照合
  • report / line / receipt card のread-only JSON検証
  • D365 UI の stale 表示や active row ずれの回避

詳細は references/d365-expense-guide.md を参照。

Known Limitations

  • OCRの精度はSuryaモデルに依存(手書きや歪みが大きい領収書は誤読あり)
  • 金額は最大候補を採用するが、複数明細のあるレシートでは個別明細は取れない
  • 金額連結誤読: OCRが改行をまたいで数字を結合し巨大整数を返すことがある(例: 14520 + 300 → 14520300)。上限チェック(500万超は除外)で防御しているが、完全ではない
  • 動画は中間フレーム1枚のみ抽出(最適フレーム選択は未実装)
  • 日本語の漢字店名はスラッグ化時にASCII変換で落ちる(カタカナはローマ字化される)
  • Windows PIL ファイルロック: Image.open() がハンドルを保持し shutil.move() が WinError 32 で失敗する。with + img.copy() + リトライで対応済み

Done Criteria

  • OCR 抽出からリネームまで一貫して処理できる
  • 標準ファイル名でプロジェクト単位に仕分けできる
  • 未分類と private の扱いを説明できる
  • Markdown サマリーが出力される
  • D365 へ載せる場合は reference の照合ルールに従って添付できる

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Receipt Expense Workflow AI skill do?

Company expense receipt workflow. OCR, rename, sort, summarize, and prepare receipt images/PDFs/videos for D365 expense mapping and attachment. Use when sorting company expense receipts, organizing travel expense files, OCR renaming, receipt sorting, expense sorting, レシート仕分け, 出張経費バッチ, D365経費仕分け, D365経費カテゴリマッピング, or D365経費精算. Not for personal or sole-proprietor tax receipts (確定申告).

Why use Receipt Expense Workflow on TypingMind?

Because you install it once and use it with any model. Receipt Expense Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Receipt Expense Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aktsmm/Agent-Skills/tree/master/receipt-expense-workflow. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Receipt Expense Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Receipt Expense Workflow?

As many as you like. As long as a model supports skills, you can use Receipt Expense Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Receipt Expense Workflow AI skill free?

It is published on GitHub by aktsmm. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇