Capio
CLAUDE.md2 starsChanged 5 months agoMITView on GitHub
Guidance for Claude Code. This project uses the AAMAD framework. Before any implementation work: read CHECKLIST.md + project-context/2.build/TASKS.md. Capio — Latin: "I seize, I capture." Captures screenshots of Instagram/LinkedIn posts, articles, and web pages, extracts text via OCR so they're searchable. Pain point: 1000+ phone screenshots impossible to find later. Read these before touching any code. Full content in .claude/rules/. See _extract_content/CLAUDE.md for details.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Before any implementation work: read CHECKLIST.md + project-context/2.build/TASKS.md.
- Very specific: line 57
Read these before touching any code.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code. This project uses the AAMAD framework.
Navigation
.claude/
agents/ — @backend-eng @frontend-eng @product-mgr @qa-eng
prompts/ — prompt-phase-1-define prompt-phase-2-build prompt-phase-3-deliver
rules/ — architecture tech-stack output-format pipeline frontend-chrome coding-standards
templates/ — PRD SAD MR
project-context/
1.define/ — PRDs and SADs (feature definition artifacts)
2.build/ — api.md pipeline.md schema.md setup.md TASKS.md
3.deliver/ — QA logs, deploy configs
AGENTS.md — persona index + phase prompt guide
CHECKLIST.md — full project status across all three phasesBefore any implementation work: read CHECKLIST.md + project-context/2.build/TASKS.md.
What is Capio
Capio — Latin: "I seize, I capture."
Captures screenshots of Instagram/LinkedIn posts, articles, and web pages, extracts text via OCR so they're searchable. Pain point: 1000+ phone screenshots impossible to find later.
Run the server
uvicorn backend.api:app --host 0.0.0.0 --port 8008 --reloadBuild documentation
| Doc | Location |
| Setup & install | project-context/2.build/setup.md |
| API reference | project-context/2.build/api.md |
| Pipeline detail | project-context/2.build/pipeline.md |
| DB schema | project-context/2.build/schema.md |
| Active tasks | project-context/2.build/TASKS.md |
Always-on rules
Read these before touching any code. Full content in .claude/rules/.
| Rule | Summary |
architecture.mdc | Local-network-first; relative paths in DB; db.py init only at startup |
tech-stack.mdc | EasyOCR / FastAPI / SQLite FTS5 / Groq / Vanilla JS — no substitutions |
output-format.mdc | Never return raw JSON — always TOON |
pipeline.mdc | 5 steps in order; per-batch commits; DB before filesystem |
frontend-chrome.mdc | 56px header; no frameworks; mobile < 640px |
coding-standards.mdc | Parameterized SQL; with conn:; startup key validation; atomic file writes |
docs-sync.mdc | DB change → update schema.md; endpoint change → update api.md; never report done without docs in sync |
Codebase map
Extraction core — _extract_content/ (standalone CLI + MCP)
_extract_content/
extract.py CLI entry point
server.py FastMCP server (exposes extract_images as MCP tool)
output_utils.py TOON serialisation — save_output / save_combined
extractors/
image.py EasyOCR wrapper + continuous screenshot detectionSee _extract_content/CLAUDE.md for details.
Backend — backend/ (FastAPI + SQLite)
| File | What it does |
backend/api.py | FastAPI app — all pipeline steps, browse API, cleanup, Loci endpoints |
backend/db.py | SQLite schema init — img_tbl, bth_image_tbl (FTS5) |
backend/similarity.py | Two-stage Jaccard duplicate detection (title+gist+author tokens → 3-word shingles of MD body) |
backend/recommender.py | RFM topic chips + recommendations for Loci |
backend/classifier.py | Platform classifier (keyword scoring, 11 platforms) |
backend/prompts.py | Groq prompt builders — ocr_cleanup_prompt, retitle_prompt |
backend/static/ | Web frontend — Upload, Process, Browse, Clean Up, Loci |
backend/inbox/ | Screenshot drop zone |
backend/archive/ | Output Markdown notes (<slug>_<YYYYMMDD>_<hex6>.md) |
Pipeline steps (run in order from /process)
- Scan inbox →
img_tbl - Group continuous shots →
bth_image_tbl - EasyOCR →
json_data+toon_data(SSE stream) - Classify platform →
platform - Groq LLM →
title,gist,author,archive/*.md(SSE stream)
Pages
| Page | Path | Key features |
| Home | / | 5 cards |
| Process | /process | Step table, SSE live feed, Run All |
| Browse | /browse | FTS5 search, filters, Smart Merge, Stats, image viewer |
| Clean Up | /cleanup | Orphan scan, batch delete by ID |
| Loci | /loci | Topic chips, RFM recommendations, reading panel, PDF print |
Hardware
- Windows 11, NVIDIA RTX 3060 (6 GB), CUDA 12.5
- Python 3.10
- PyTorch:
https://download.pytorch.org/whl/cu124
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

