/claude-init:updatefrom claude-init
Re-analyzes a codebase and updates existing .claude/ configuration to match current state. Detects stack changes, new dependencies, and config drift without overwriting customizations.
Ships in claude-init. 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.
Re-analyze the codebase and update the existing .claude/ configuration to match the current state.
Read and fingerprint every existing config file:
CLAUDE.md — extract sections, note any <!-- custom --> or <!-- generated --> markersARCHITECTURE.md — check if it exists and capture its Directory Structure section for drift comparisonagents/ — list all agents and their model/tool configskills/ — list all skills and their paths: scopes (not just rules — skills can be path-scoped too)rules/ — list all rules and their paths: scopessettings.json — read hooks, permissions, and any outputStyle fieldoutput-styles/ — list any custom output styles (generated tdd.md, user-added ones)settings.local.json.example — check it exists so new contributors can bootstrap personal overridesRun the same analysis as /claude-init (parallel subagents):
Codebase drift is not the only reason config goes stale — the templates themselves improve over time, and a project generated by an older claude-init keeps the old (sometimes buggy) output. /update must close that gap, because nothing auto-propagates: generated .claude/ files are static copies with no live link back to the templates.
Resolve the current templates the same way /claude-init does — first match wins:
${CLAUDE_SKILL_DIR}/../../../templates/ (running from a cloned repo)~/.claude/claude-init-templates/ (global install)If neither exists, skip this step (note it in the report so the user knows template-sync was unavailable) and continue with the codebase-drift diff.
Scan the project's generated config for known-stale patterns. These are fixes that landed in the templates after early projects were generated — flag each one found:
| Stale pattern | Where | Fix |
|---|---|---|
"decision": "allow" / "decision": "block" in a PreToolUse hook | .claude/settings.json | PreToolUse ignores this form. Rewrite to hookSpecificOutput.permissionDecision (deny + permissionDecisionReason; delete the else echo allow branch — silent exit 0 already allows). |
Skill description: with no when-to-use trigger (Use when…, Use before…, Auto-triggered…) | .claude/skills/*/SKILL.md | Add a trigger phrase so the skill fires reliably. |
Skill description: written in first/second person ("I …", "You …") | .claude/skills/*/SKILL.md | Rewrite in third person. |
SKILL.md body over 500 lines | .claude/skills/*/SKILL.md | Split long examples/scripts into sibling reference files. |
Missing settings.local.json.example while settings.json exists | .claude/ | Generate the example so contributors can bootstrap personal overrides. |
Write(path) rules in permissions | .claude/settings.json | They match nothing. Rewrite each as Edit(path). |
| No Stop-hook gate, or a gate that hardcodes a subset of checks | .claude/settings.json, .claude/scripts/ | Install the hook chain from templates/hooks/scripts/ and point gate.conf's CHECK_CMD at the project's whole check command (see the claude-init skill's reference/harness.md). |
Gate armed only by an Edit|Write hook | .claude/settings.json | Add the PostToolUse Bash mtime hook and SessionStart stamp, or bash edits never run the gate. |
Stop hook rooted at $CLAUDE_PROJECT_DIR | .claude/scripts/stop-hook.sh | Root it at the payload cwd's git toplevel so worktree sessions gate their own tree. |
No .githooks/ (pre-push gate, post-merge schema sync, session trailer), or core.hooksPath unset | repo root | Offer the templates from templates/githooks/; set git config core.hooksPath .githooks before adding its deny rule. |
Missing CODING_STANDARDS.md, live-verify, push-and-watch (when pushes deploy), what-happened, wait-what | repo root, .claude/skills/ | Offer them from the templates, filled for this project. |
This list grows as templates evolve — treat it as "known fixes since generation", not an exhaustive lint. For a fuller config audit, point the user at /doctor.
Fold whatever you find here into the same proposal you present in Step 4, tagged (template sync) so the user can tell template fixes apart from codebase-drift updates. Apply only on approval (Step 5), preserving <!-- custom --> blocks exactly as for any other change.
Compare the re-analysis against the current config. Identify:
New things to add:
Stale things to update:
npm test changed to vitest)paths: globs match zero files)ARCHITECTURE.md drift check (always run):
ls -d */)package.json / Cargo.toml / requirements.txt/claude-init (present the new version as a diff against the old one; preserve <!-- custom --> blocks)Things to preserve (never touch):
<!-- custom --> markersShow a diff-style summary:
## Proposed Updates
### CLAUDE.md
+ Add: `bun test` (detected bun migration from npm)
- Remove: `npm test` (no longer in package.json)
~ Update: Architecture section (Drizzle detected, was Prisma)
### agents/developer.md
~ Update: Framework references (SvelteKit detected, was Next.js)
### rules/
+ Add: rules/api.md (new API routes detected in src/api/)
### settings.json (template sync)
~ Fix: PreToolUse hooks use legacy `{"decision":...}` form → `hookSpecificOutput.permissionDecision`
### No changes needed:
- agents/architect.md (still current)
- skills/plan/ (still current)
Wait for user approval before applying any changes.
Apply approved changes. For each modified file:
<!-- generated by claude-init --> markers around generated sections<!-- custom --> sections untouched(template sync) in the proposal so the user can distinguish them from codebase-drift updatesWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yash-gadodia/claude-init --plugin claude-init4 skills in this plugin
/claude-initAnalyze any codebase and generate a complete .claude/ configuration to make it AI-native. Use when setting up Claude Code for a new or existing repo. Handles cold-start by detecting stack, framework, patterns, and generating tailored CLAUDE.md, agents, skills, rules, and hooks./doctorValidate your .claude/ configuration. Checks that commands work, paths exist, hooks are valid, and agents are well-formed. Use after /claude-init or /update to catch issues./onboardQuick onboarding to an existing codebase. Generates a mental model of the architecture, key patterns, and how things connect. Use when joining a new repo or when a teammate needs to get up to speed fast.