agentleFS
edjchapmanedjchapman/claude-code-config/home/CLAUDE.md

claude-code-config / home

CLAUDE.md8 starsChanged 19 days agoMITView on GitHub

Symlinked to ~/.claude/CLAUDE.md by scripts/setup-global.sh. Loaded by Claude Code in every session, regardless of working directory. Keep this file for cross-project rules — anything project-specific belongs in that project's own CLAUDE.md. When you notice a non-time-bound follow-up mid-session (a validator worth building, a pattern worth capturing, a learning to revisit), give it a durable home before writing "deferred to future sessions" in your reply — chat narrative dies with context expiry, the rest survive. Default: pick the most durable home…

  • Commits and pushes

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you notice a non-time-bound follow-up mid-session (a validator worth building, a pattern worth capturing, a learning to revisit), give …

    line 7
  2. Very specific:

    Default: pick the most durable home that matches the scope.

    line 13
  3. Distinctive:

    A failed scan is not a detected secret: Only exit code 1 means secrets were found.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Global behavioural rules

Symlinked to ~/.claude/CLAUDE.md by scripts/setup-global.sh. Loaded by Claude Code in every session, regardless of working directory. Keep this file for cross-project rules — anything project-specific belongs in that project's own CLAUDE.md.

Capturing deferred follow-ups

When you notice a non-time-bound follow-up mid-session (a validator worth building, a pattern worth capturing, a learning to revisit), give it a durable home before writing "deferred to future sessions" in your reply — chat narrative dies with context expiry, the rest survive.

  • Cross-session / personal backlog — call /later with --category Learn/Do/Research/Read. Writes to ~/Reference/Later/<Category>/, surfaced when /later next runs.
  • Repo TODO without a trigger — inline comment in the relevant file (Makefile / script / markdown). Survives via git; visible when next editing that file.
  • Memory-worthy rule or pattern — write a new feedback_*.md to ~/.claude/projects/<slug>/memory/ (cross-session, but not git-backed). For rules that should apply globally across all projects, add a section to this file instead — git-backed via claude-code-config.

Default: pick the most durable home that matches the scope. A few seconds invoking /later (or adding two lines here) beats a silently-lost learning.

Writing code

  • Comments: only where the "why" isn't obvious. Never restate what code does.
  • Edit repo files with Edit/Write, not shell scripts: format hooks and path rules skip those.

The GitGuardian secret scan (ggshield)

The global pre-push hook (~/.config/git/hooks/pre-push, chezmoi-managed) scans the commits about to leave the machine, in every repo, against one shared workspace budget of 10,000 API calls on a rolling 30-day window — exhausting it in one repo blocks pushes in all of them, and it recovers only as old usage ages out. (It moved from pre-commit in Dotfiles#159: per-commit scanning billed every amend and rejected attempt. Individual repos may still carry their own per-commit ggshield hook via the pre-commit framework.)

A failed scan is not a detected secret. Only exit code 1 means secrets were found; quota exhaustion exits 128, auth failure 3, server-unreachable 4. Run ggshield quota before acting on any ggshield failure — on the old hook's message, which said "detected secrets" for every non-zero exit, agents sanitised files that were never dirty.

Cost (measured 2026-08-28; billing is per API request, not per document — /multiscan carries 20 documents for one unit): a commit costs 1 unit, or ceil(files / 20). ggshield secret scan repo costs hundreds — ~417 on a 996-commit repo. A busy month of commits came to under 5% of the budget, so cutting commit volume buys almost nothing and costs real safety; the expensive thing is scan mode. Treat full-history scans as deliberate and occasional, never a routine gate. If the budget is gone, suspect those (or check GitGuardian's dashboard) before blaming commit volume.

Never bypass with git commit --no-verify where a repo's .githooks/pre-commit also runs a validation battery — that skips the battery too. It needs Ed's explicit per-commit approval, with make check then run by hand. Under the pre-commit framework, SKIP=ggshield git commit skips only that hook and is the safer lever.

When quota exhaustion blocks a push (exit 128 — which can persist for weeks): git push --no-verify skips only the secret scan, since the global pre-push hook is the only pre-push check; per-commit gitleaks and GitGuardian's GitHub App still cover the range. It needs Ed's explicit per-push approval — agents must stop and ask, never run it unprompted.

Applying the tooling & bootstrapping repos

The --hooks/--tooling gotcha, .gitignore hygiene, and the full end-to-end new-repo runbook (manifest hygiene, standard files, remote creation, merge policy, main-protection ruleset, strict commit style, prove-the-loop) live in the project-setup skill — invoked on demand rather than loaded every session. Reach for it when installing this config into a repo or bootstrapping a new one.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.