commonplace: Instructions file for Claude Code

CLAUDE.md

commonplace CLAUDE.md is an instructions file for Claude Code from itsmeduncan/commonplace. It costs 2,878 tokens per session, scanned A, original, MIT.

Repository instructions for Commonplace, a Docker Compose setup that gives Claude Code and Pi long-term memory through a self-hosted Graphiti knowledge graph. They explain where configuration and runtime secrets live and how deployment works.

In plain words
What is it for?
Use them when configuring, deploying, or maintaining Commonplace, including its Docker services, host environment, MCP configuration, and Tailscale-connected clients.
Why use it?
They clarify which files are authoritative and prevent deployment mistakes, such as editing host-only secrets or treating client machines like servers.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is itsmeduncan/commonplace's own configuration. It tells Claude Code how to work on commonplace itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything commonplace configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/itsmeduncan/commonplace/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/itsmeduncan/commonplace

Made for: Claude Code.

Wrote 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.

agentmods badge for commonplace CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/itsmeduncan/commonplace/claude-md/github.svg)](https://agentmods.dev/instructions/itsmeduncan/commonplace/claude-md)
Your own site
<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.

agentmods 80×15 button for commonplace CLAUDE.md

Your own site · 80×15
<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>
Per session 2,878 This file is loaded in full into every session.
When invoked 2,878 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash f884c1ca3a5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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" \
CLAUDE.md · 156 lines

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 .env on the host only (gitignored; .dockerignore also excludes it from the build context). .env.example is 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_personal vs commonplace_client). group_id does not select the graph — it only namespaces nodes within one.
  • Two MCP instances, one custom image. commonplace-mcp:local is built locally from zepai/knowledge-graph-mcp:standalone (see Dockerfile) — the upstream :standalone image lacks the anthropic SDK and rejects remote Host headers, so the Dockerfile adds the SDK and runs patch_transport_security.py (plus patch_agent_identity.py → add_memory agent_id, patch_entity_fields.py → optional typed entity fields, patch_content_guard.py → reject_pattern tier guard, patch_queue_backpressure.py → max_queue_size GPU backpressure, patch_episode_uuids.py → get_episodes(uuids=…), and patch_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_0 on 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: set PERSONAL_LLM_PROVIDER=anthropic / PERSONAL_LLM_MODEL=claude-haiku-4-5 / PERSONAL_SEMAPHORE_LIMIT=5 / ANTHROPIC_API_KEY in .env (both provider blocks always exist; provider picks one). The client tier (config/client.yaml, host :8001) is always local — confidential data never leaves the box. Concurrency: SEMAPHORE_LIMIT defaults to 1 (GPU-bound); raise the personal tier to 5 if you switch it to hosted. Both env-overridable in docker-compose.yml. Optional GPU backpressure: set graphiti.max_queue_size and add_memory refuses new episodes once that many are pending (via patch_queue_backpressure.py); 0 = unbounded (default).
  • Gateway fronts both tiers. The gateway service (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 send Authorization: Bearer <token>. Optional defense-in-depth: set graphiti.reject_pattern (a regex) in a tier's config and add_memory refuses matching content (payload-level guard, via patch_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 :6379 binds to 127.0.0.1 only.
  • Ollama runs on the host, so each MCP service needs extra_hosts: host.docker.internal:host-gateway and an api_url of http://host.docker.internal:11434/v1.

Read the full file on GitHub · 156 lines

Changes

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.

  1. 1mo ago Changed · +11 lines · +249 tokens per session f884c1ca3a5a
  2. 2mo ago First seen · 145 lines · 2,629 tokens per session scan A 92e8bd4cdc61

Subscribe to this mod's changes

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.

Related

commonplace CLAUDE.md compared with instructions from other repositories

commonplace CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
commonplace CLAUDE.mditsmeduncan/commonplaceInstructions file818d agoMITA2,878Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode