sync-claude

A command that audits and updates every CLAUDE.md file in a repository using Anthropic’s documented guidance. These files give Claude Code project-specific instructions.

In plain words
What is it for?
Use it to review and apply targeted updates to repository guidance, keeping commands, architecture notes, workflow rules, and project-specific warnings accurate.
Why use it?
It finds instructions that no longer match the codebase, such as moved files, obsolete commands, missing sections, or duplicated content.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/aphrody-code/bxc/sync-claude
Clone the repo
git clone --depth 1 https://github.com/aphrody-code/bxc

Made for: Claude Code.

Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,603 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00060 $0.01603
Opus 5 $0.00030 $0.00801
Sonnet 5 $0.00012 $0.00321
Haiku 4.5 $0.00006 $0.00160

Measured yesterday against content hash b8604f44aab1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-claude 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 yesterday.

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.

.claude/commands/sync-claude.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/sync-claude — audit + update CLAUDE.md selon les guidelines Anthropic

Tu vas faire un audit COMPLET puis appliquer des updates ciblés sur les CLAUDE.md du repo. Scope = $ARGUMENTS (défaut all).

Principes officiels Anthropic (à respecter ABSOLUMENT)

Source : https://docs.claude.com/en/docs/claude-code/memory et le blog "Best practices for Claude Code".

  1. Concise et human-readable — dense > verbeux. CLAUDE.md fait partie du prompt système : chaque ligne coûte des tokens à chaque tour.
  2. Actionable — toute commande documentée doit être copy-paste ready. Pas de "you might want to" ni de "consider running". Verbe à l'impératif.
  3. Project-specific — pas de best practices génériques (TypeScript strict est un détail projet, "use TypeScript correctly" est du bruit).
  4. Non-obvious gotchas first — ce que le code ne révèle pas en lecture directe : ordre de chargement, side-effects, contraintes hardware, etc.
  5. Sections recommandées (utiliser SEULEMENT celles qui apportent) : Commands · Architecture · Key Files · Code Style · Environment · Testing · Gotchas · Workflow. Pas de remplissage.
  6. DRY via @path — la syntaxe @GEMINI.md importe un autre fichier au chargement. Préférer ça à la duplication de doc.
  7. Pas de duplication entre niveaux — CLAUDE.md package ne répète pas CLAUDE.md racine. Il ne contient QUE le delta propre au package.

Étape 1 — Discovery

Trouve tous les CLAUDE.md du projet (exclure vendor/, node_modules/, vendor/mcp-sdk-typescript/) :

find . -name "CLAUDE.md" -not -path "*/node_modules/*" -not -path "*/vendor/*/CLAUDE.md" 2>/dev/null

Filtre selon $ARGUMENTS :

  • root → seul ./CLAUDE.md
  • packages → seuls ./packages/*/CLAUDE.md
  • all (défaut) → tout

Étape 2 — Capture l'état RÉEL du projet

Pour chaque CLAUDE.md à auditer, capture la vérité terrain :

# scripts dispo (commands à documenter)
jq -r '.scripts | keys[]' package.json  # ou ./packages/X/package.json

# layout réel (sections Architecture / Key Files)
ls -la src/ packages/ scripts/ benchmarks/ 2>/dev/null

# tests et leur point d'entrée
find test -name '*.test.ts' | head -5

# entry points réels (vs stubs)
grep -l "Bun.serve\|\.listen(\|export default" src/*.ts packages/*/src/*.ts 2>/dev/null

# état git pour repérer les fichiers récemment renommés/supprimés
git log --diff-filter=D --name-only --pretty=format: -20 | sort -u
git log --diff-filter=R --name-status -10

Read the full file on GitHub · 144 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. yesterday First seen · 144 lines · 60 tokens per session scan A b8604f44aab1

Subscribe to this mod's changes

sync-claude is a command published in the GitHub repository aphrody-code/bxc (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,603 once invoked, about $0.0003 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-31.