Borrowing it
Nothing to install: this file belongs to itsmeduncan/commonplace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/itsmeduncan/commonplace/main/CLAUDE.mdgit clone --depth 1 https://github.com/itsmeduncan/commonplaceWrote 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/itsmeduncan/commonplace/claude-md)<a href="https://agentmods.dev/instructions/itsmeduncan/commonplace/claude-md"><img src="https://agentmods.dev/badge/instructions/itsmeduncan/commonplace/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/itsmeduncan/commonplace/claude-md"><img src="https://agentmods.dev/badge/instructions/itsmeduncan/commonplace/claude-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.02878 | $0.02878 |
| Opus 5.5 | $0.01151 | $0.01151 |
| Sonnet 5.5 | $0.00576 | $0.00576 |
| Haiku 4.5 | $0.00288 | $0.00288 |
Grade A, and why
commonplace CLAUDE.md scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -o /dev/null -w "%{http_code}\n" \ How it starts
The opening of the file, as written. The whole thing — 156 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
commonplace is infrastructure only — a Docker Compose stack, two MCP config files, a
Dockerfile, seven build-time patches, and a second image for the Whelk Server org brain (brain/).
There is no application source and no lint step. The only test is the brain image's end-to-end
smoke test (brain/test/smoke.sh), which CI runs. It deploys a self-hosted, two-tier
Graphiti knowledge graph that Claude Code and Pi use as
long-term memory over a Tailscale tailnet.
Read README.md first — it is the real documentation. It contains the architecture diagram, the
endpoint/graph map, a 15-item "Gotchas" list, and client-config instructions. This file summarizes
only the load-bearing facts and points back to it.
Deployment model (source of truth lives in two places)
- The repo is the source of truth for config. Edit a clone → push → on the host
git pull→docker compose up -d. - Runtime + secrets live only on the host (a Linux server with Docker, Ollama, and an
optional consumer NVIDIA GPU) in the repo directory (e.g.
~/commonplace). Other devices are pure clients — they host nothing. - Secrets are in
.envon the host only (gitignored;.dockerignorealso excludes it from the build context)..env.exampleis the template. Never commit real values.
Architecture invariants (don't break these)
- One FalkorDB, two graphs. Both MCP instances share one FalkorDB; the graph is selected per
instance by
FALKORDB_DATABASE(commonplace_personalvscommonplace_client).group_iddoes not select the graph — it only namespaces nodes within one. - Two MCP instances, one custom image.
commonplace-mcp:localis built locally fromzepai/knowledge-graph-mcp:standalone(seeDockerfile) — the upstream:standaloneimage lacks theanthropicSDK and rejects remote Host headers, so the Dockerfile adds the SDK and runspatch_transport_security.py(pluspatch_agent_identity.py→add_memoryagent_id,patch_entity_fields.py→ optional typed entity fields,patch_content_guard.py→reject_patterntier guard,patch_queue_backpressure.py→max_queue_sizeGPU backpressure,patch_episode_uuids.py→get_episodes(uuids=…), andpatch_serial_ingest.py→ one episode at a time across groups, so concurrent groups cannot cross-write graphs). Use:standalone, never:latest(the latter bundles its own FalkorDB and can't share one). - Offline-first. Both tiers extract locally (
mistral:7b-instruct-q4_0on the GPU) by default — no API keys, nothing leaves the box. The personal tier (config/personal.yaml, host:8000) is env-switchable to a HOSTED model for non-confidential data: setPERSONAL_LLM_PROVIDER=anthropic/PERSONAL_LLM_MODEL=claude-haiku-4-5/PERSONAL_SEMAPHORE_LIMIT=5/ANTHROPIC_API_KEYin.env(both provider blocks always exist;providerpicks one). The client tier (config/client.yaml, host:8001) is always local — confidential data never leaves the box. Concurrency:SEMAPHORE_LIMITdefaults to 1 (GPU-bound); raise the personal tier to 5 if you switch it to hosted. Both env-overridable indocker-compose.yml. Optional GPU backpressure: setgraphiti.max_queue_sizeandadd_memoryrefuses new episodes once that many are pending (viapatch_queue_backpressure.py); 0 = unbounded (default). - Gateway fronts both tiers. The
gatewayservice (Caddy,gateway/Caddyfile) owns host ports:8000/:8001; the MCP containers are internal-only (expose, no host ports). It enforces per-tier bearer auth (PERSONAL_TOKEN/CLIENT_TOKEN) — separate tokens = tier isolation — and emits JSON access logs (audit) + Prometheus metrics (:9180, host-local). Clients must sendAuthorization: Bearer <token>. Optional defense-in-depth: setgraphiti.reject_pattern(a regex) in a tier's config andadd_memoryrefuses matching content (payload-level guard, viapatch_content_guard.py) — e.g. the personal tier rejecting confidential-tagged writes. - Shared embedder. Both tiers use Ollama
nomic-embed-text(768-dim). Do not change the embedder on only one tier — vectors from different embedders are not comparable. - MCP path has a trailing slash:
/mcp/(FastMCP default, not configurable). FalkorDB UI is on:3000; FalkorDB:6379binds to127.0.0.1only. - Ollama runs on the host, so each MCP service needs
extra_hosts: host.docker.internal:host-gatewayand anapi_urlofhttp://host.docker.internal:11434/v1.
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.
- 1mo ago Changed · +11 lines · +249 tokens per session f884c1ca3a5a
- 2mo ago First seen · 145 lines · 2,629 tokens per session scan A 92e8bd4cdc61
commonplace CLAUDE.md is an instructions file published in the GitHub repository itsmeduncan/commonplace (8 stars, last pushed 18d ago), licensed MIT. It adds 2,878 tokens to every session, about $0.0115 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
commonplace CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| commonplace CLAUDE.mditsmeduncan/commonplace | Instructions file | 8 | 18d ago | MIT | A | 2,878 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |