mm-filelisted
Install: claude install-skill shivamkpr/claude-skills
<!-- Public copy. Personal paths, names and ids are replaced with placeholders. -->
# MM expense filing — token-lean pipeline
## Architecture (why this exists)
The old flow (cowork money-manager skill) drove the MM browser tab via Claude-in-Chrome and
read PDFs + XML dumps in one chat — it burned a whole session limit. This pipeline replaces it:
- **Main thread (any model): orchestrate only.** Never open a PDF, never read MM XML, never
drive a browser. ~200 tokens per statement.
- **`scripts/mm_api.py`: zero-model HTTP client.** Talks to the MM server directly over LAN
(probe/get/add/transfer/balance/verify). No browser needed — this machine reaches the LAN address.
- **`mm-filer` agent (Sonnet), one per statement:** reads the local synced PDF (or downloads it
by fileId when given one) into its own throwaway context, extracts text locally with
pypdf, files rows via mm_api.py, verifies TAD,
returns a ≤10-line receipt.
## Orchestration recipe (main thread)
1. `python3 ~/.claude/skills/mm-file/scripts/mm_api.py probe` — MM URL changes on every server
restart; if probe fails, ask the user to start MM / give the current `<server-ip:port>`.
2. List new statements — LOCAL FIRST (a sync client mirrors them):
`<synced-statements-folder>/`
one subfolder per bank; pattern `YYYY_MM <Card>.pdf`.
Fallback cloud connector folder ids: the parent `<folder-id>`, plus one per bank.
⚠️ **Check the sync client is running first** (`pgrep -f "<sync-client>"`). If it is