/quality-gates:claude-md-syncfrom quality-gates
Keeps CLAUDE.md accurate after code changes by classifying diffs, editing stale lines, and verifying references. Invoke after business logic, schema, API, or config changes.
Ships in quality-gates. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
CLAUDE.md is what the next session believes about this repo. After a change, make it true again with the smallest edit. A stale line is worse than a missing one.
git diff plus staged, or the files named). Find every CLAUDE.md that governs them: the repo root and any in a parent directory of a changed file. Do not open CLAUDE.local.md or files listed in .gitignore unless asked.--help). Do not run a command that writes, migrates or deploys to verify it.| Change | Update? | What to write |
|---|---|---|
| Business rule, invariant, pricing/limit/eligibility logic, state machine | Yes | The rule in one line, where it is enforced (path:symbol) |
| Data model, schema, migration, new entity or field with meaning | Yes | What it means, who owns writes, any constraint not visible in the schema |
| Public API, route, event, job, webhook added/removed/changed contract | Yes | Name, purpose, the non-obvious contract |
| Architecture: new layer, module boundary, service, data flow | Yes | The boundary and the rule ("UI never imports db/") |
| Build/test/run/lint command, env var name, required tool or version | Yes | The exact command or variable name (names only, never values) |
| New dependency that replaces a pattern ("use zod, not hand checks") | Yes | The convention |
| Gotcha discovered while making the change | Yes | The trap and how to avoid it |
| Rename/move of something CLAUDE.md names | Yes | Fix the reference |
| Refactor with same behaviour, styling, copy, tests only, bug fix restoring documented behaviour | No | — |
src/billing/tax.ts:applyTax) instead of copying it..env values. Variable names only./init or repo-agent-guide.## CLAUDE.md: UPDATED | NO UPDATE NEEDED | NEEDS DECISION
Files: <CLAUDE.md paths edited>
Changes:
- <file>: <+/-/~> <the line, short> (because <code change>)
Verified: <commands/paths checked>
Open: <anything unsure, e.g. a rule you could not confirm in the code>
Key decisions in this skill: a new architecture rule or module boundary, a business-rule wording you cannot confirm in the code, and moving facts between CLAUDE.md files.
Before acting on one, get a second opinion: call the Agent tool with model: "opus" (subagent_type Plan, read-only). Give it the decision, each option in one line, the evidence (file:line, measurements, the diff) and the constraints. Ask for a pick, the main risk of that pick, and what would change its mind. Do not send secrets or .env contents.
Advisor: <decision> -> <pick> (<agreed | overruled because ...>).Spend the strong models on judgment and the cheap ones on volume. When this skill spawns subagents with the Agent tool, set model by role:
| Role | Model | Use for |
|---|---|---|
| Think | fable (Fable 5.2), or opus when limits are tight | Plan, decompose, pick an approach. One call, read-only (subagent_type: "Plan"). |
| Execute | sonnet (Sonnet 5.5) | Write and edit code, run checks, produce the deliverable. |
| Review | opus (Opus 5.5) | Check the finished work before reporting: correctness, security, money, data loss. |
| Swarm | haiku (Haiku 5.5) | Many small parallel jobs: search, read, extract, classify, per-file scans. |
mcp__ccd_session_mgmt__get_usage (load it with ToolSearch if deferred). Use fable only when every window has room: 5-hour limit under 70% used, "Weekly · all models" under 80%, and "Weekly · Fable" (if listed) under 80%. Otherwise use opus. If the tool is missing, or its status is unavailable or not_applicable (API key, Bedrock, Vertex), use opus. Say the pick in one line: Think: <model> (5h <n>%, weekly <n>%, Fable <n>%).Lessons from earlier runs live in two files: ~/.claude/skill-lessons/claude-md-sync.md (any repo) and .claude/skill-lessons/claude-md-sync.md at the repo root (this repo only).
- <YYYY-MM-DD>: <do or avoid X> because <Y>. (seen: 1). When a line already says the same thing, raise its seen count and date instead of adding one. Facts about this repo go in the repo file, everything else in the user file. Keep each file under 30 lines by merging or dropping stale lessons.seen: 3: if the ashish-claude-skills source repo is open, propose the edit to plugins/quality-gates/skills/claude-md-sync/SKILL.md as a diff and wait for a yes, then delete the lesson once it lands; otherwise say Lesson ready to promote: <line> in the report.Learned: <the line written | nothing>.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/design-auditUse when a UI component, page or stylesheet has just been built or changed and its visual quality needs checking, when the user asks whether a screen looks right, consistent or polished, or before shipping front-end work./login-and-accessUse when writing, changing or reviewing sign-in, sign-up, logout, password reset, magic links, OAuth or SSO, MFA, sessions, cookies, JWTs, refresh tokens, roles, permissions, admin areas, multi-tenant data or any route that must know who the caller is and what they may see./personal-dataUse when writing, changing or reviewing code that stores, reads, sends, logs, exports or deletes information about people (users, customers, clients, patients, children, employees), including new database columns or tables, migrations, forms, analytics or tracking events, error reporting, third-party APIs, AI prompts, data exports, account deletion, consent, cookie banners, retention jobs, or questions about GDPR, CCPA, LGPD, DPDP or other privacy laws./playwright-testsUse when writing, generating or fixing Playwright end-to-end tests, covering a user journey in a real browser, choosing locators, handling login state or test data, or when an e2e test is flaky, slow or times out./security-code-auditUse when writing, changing or reviewing code that handles user input, forms, auth, passwords, sessions, tokens, API keys, secrets, env vars, permissions, database queries, file uploads, webhooks, payments or a new API route, or when the user asks for a security review of a diff, a file or a feature./threat-modelUse when planning or designing a feature, service or integration that adds a new entry point, before a launch or a major release, when changing deploy, infrastructure, CI/CD, hosting or network config, when asked where an attacker could break in, for a threat model, attack surface review, launch security checklist, penetration test plan or scope, or when setting up security scanning.npx claudepluginhub ashishyd/ashish-claude-skills --plugin quality-gatesOther plugins' skills for the same job