@fdu-ins/scan-organizer
AOCR, classify, and organize scanned PDFs into category subfolders using AI vision and language models. Processes medical, financial, insurance, tax, legal, personal, and household documents.
Install
agr install @fdu-ins/scan-organizer --target claudeWrites 7 files into .claude/skills/, pinned to git-7a8c0a5f.
- .claude/skills/scan-organizer/.env.example
- .claude/skills/scan-organizer/.gitignore
- .claude/skills/scan-organizer/.python-version
- .claude/skills/scan-organizer/README.md
- .claude/skills/scan-organizer/SKILL.md
- .claude/skills/scan-organizer/pyproject.toml
- .claude/skills/scan-organizer/uv.lock
Document
name: scan-organizer description: OCR, classify, and organize scanned PDFs into category subfolders using AI vision and language models. Processes medical, financial, insurance, tax, legal, personal, and household documents. metadata: {"openclaw":{"emoji":"๐","requires":{"bins":["uv"]},"install":[{"id":"uv-sync","kind":"uv","label":"Install scan-organizer dependencies"}]}}
Scan Organizer
Processes scanned PDFs โ extracts text (Docling + vision OCR), classifies by category using an LLM, and organizes into subfolders with markdown and metadata sidecars. Works with any OpenAI-compatible API (Ollama, OpenAI, OpenRouter, etc.).
Categories
medical, financial, insurance, tax, legal, personal, household, other
Commands
Run from the scan-organizer project directory.
Process new scans
uv run scan-organizer process
Dry run (classify without moving)
uv run scan-organizer process --dry-run
Process a single file
uv run scan-organizer process --file /path/to/scan.pdf
Force re-process all (including already processed)
uv run scan-organizer process --force
Check inbox status
uv run scan-organizer status
Undo a processed file (move back to inbox)
uv run scan-organizer undo <filename>
Reclassify a file
uv run scan-organizer reclass <filename>
Output Format
All commands output JSON to stdout. Progress messages go to stderr.
Process output
{"processed": 3, "skipped": 7, "errors": 0, "results": [{"file": "...", "category": "medical", "title": "...", "destination": "..."}]}
Status output
{"inbox_count": 10, "unprocessed": 3, "already_processed": 7, "categories": {"medical": 2, "financial": 3}}
Architecture
- Extract โ Docling parses PDF structure and native text
- OCR โ Pages with sparse text are rendered to PNG and sent to a vision model
- Classify โ Merged text sent to a language model for categorization
- Organize โ PDF moved to
<scans_dir>/<category>/,.md+.meta.jsonsidecars written
File Organization
<scans_dir>/
medical/
2025-12-20_lab-results_0003.pdf
2025-12-20_lab-results_0003.md
2025-12-20_lab-results_0003.meta.json
financial/
...
.manifest.json <- tracks all moves for undo
Tips
- Run
statusfirst to see how many unprocessed scans are in the inbox - Use
--dry-runto preview classifications before moving files - The manifest tracks all moves for auditability
- If a classification is wrong, use
reclassto undo and re-process
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged โ not that the artifact is safe.
Versions
git-7a8c0a5fe49b2026-07-31