Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/vailsen/paperless-brain/claude-mdgit clone --depth 1 https://github.com/vailsen/paperless-brainWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/vailsen/paperless-brain/claude-md)<a href="https://agentmods.dev/instructions/vailsen/paperless-brain/claude-md"><img src="https://agentmods.dev/badge/instructions/vailsen/paperless-brain/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.10390 | $0.10390 |
| Opus 5 | $0.05195 | $0.05195 |
| Sonnet 5 | $0.02078 | $0.02078 |
| Haiku 4.5 | $0.01039 | $0.01039 |
Grade A, and why
paperless-brain CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 757 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
PaperlessBrain — AI-powered frontend for Paperless-ngx. Built with NiceGUI + FastAPI. Lets users chat with their document archive (invoices, contracts, letters) via Claude or Ollama LLMs, with full tool-call agentic loop.
Running
# Local dev
python main.py
# App runs at http://0.0.0.0:8080
# Deploy: tag a release, CI publishes the image, the server pulls it
git tag vX.Y.Z && git push origin main --tags # .github/workflows/release.yml
ssh <server> "cd /root/paperlessbrain && docker compose pull && docker compose up -d"
Dependencies
Single source of truth: pyproject.toml (direct deps only, range pins;
name paperless-brain, version from config/version.py via hatchling).
The old requirements*.txt files are gone.
# GPU machine (dev)
pip install -e ".[crawl,i18n]"
# CPU-only (LXC/Docker) — +cpu torch wheel outranks the CUDA build on PyPI
pip install --extra-index-url https://download.pytorch.org/whl/cpu -e ".[crawl,i18n]"
playwright install chromium # only needed with the [crawl] extra
# Docker
docker build -t paperless-brain . # full
docker build --build-arg LEAN=1 -t paperless-brain . # no crawl4ai/chromium
docker compose up -d
Extras: [crawl] = crawl4ai + headless Chromium (JS-heavy page fetching —
app degrades to trafilatura-only without it); [i18n] = pybabel workflow.
Configuration
All settings via .env file (loaded by config/settings.py via pydantic-settings). Required keys:
APP_PATH— absolute path to repo root (with trailing slash)PAPERLESS_URL,PAPERLESS_SUPERUSER_TOKEN— Paperless-ngx APIIGNORE_INBOX_TAG_AT_SYNC— tag name to skip during syncEMBEDDING_MODEL,CHROMA_PATH,CHROMA_COLLECTION,EXTRACTION_SIDECAR_PATH,THUMB_PATHOLLAMA_SERVER,OLLAMA_INGEST_MODEL— optional, vision LLM for ingestion (both also settable in Settings > Processing, which wins). Chat and Werkbank never read them — those use per-user models with their ownbase_url.OLLAMA_SERVERadditionally names the host the WoL/shutdown buttons control; without it that is inferred from the first local-lane model in the registry.- No provider API key belongs in
.env. Every chat/research/vision model is managed per user in the UI (Settings > AI Models,services/model_registry.py) with its own backend (anthropic/openai_compatible), base URL, key and model id — which is what makes AI gateways (OpenRouter, Requesty, LiteLLM, Portkey …) work with no code. SEARXNG_HOST— self-hosted SearXNG instanceSTORAGE_SECRET— NiceGUI session secret
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 757 lines · 10,390 tokens per session scan A 45c128930c59
paperless-brain CLAUDE.md is an instructions file published in the GitHub repository vailsen/paperless-brain (24 stars, last pushed 16d ago), licensed MIT. It adds 10,390 tokens to every session, about $0.0519 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
paperless-mcp CLAUDE.md
Instructions for baruchiro/paperless-mcp, covering paperless-ngx mcp server - claude instructions, project overview, repository structure, build and development commands and essential commands.
libre-webui AGENTS.md
Instructions for libre-webui/libre-webui, covering agents.md, project overview, project structure, setup and development and testing and validation.
OpenDocuments AGENTS.md
Instructions for joungminsung/OpenDocuments, covering agents.md, project overview, monorepo structure, common commands and 특정 패키지만.
oncofiles CLAUDE.md
Instructions for peter-fusek/oncofiles, covering oncofiles, quick start, project structure, conventions and key commands.
ZimaOS-Blue AGENTS.md
Instructions for IceWhaleTech/ZimaOS-Blue, covering zimaos-blue project, skills reference, mobile toggle ux optimization (.agents/skill), superpowers (obra/superpowers) and golang best practices (golang-best-practices).
Strata AGENTS.md
AGENTS.md instructions for avinash-1707/Strata, covering agents.md, which document wins, read only what the task needs, always applies and while you work.