/codebase-health:setup [check|apply]from codebase-health
Verifies and configures the codebase-health audit config at .claude/codebase-health.md. check inspects the merged config read-only; apply interviews the user and writes the team-layer config.
Ships in codebase-health. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Verify and manage the consuming repo's tracked audit-dimension config at .claude/codebase-health.md
so /codebase-health:audit runs deterministically instead of re-inferring targets every run.
The config is optional: with none, the audit re-infers its targets each run, so its absence is a
reported INFO, never a FAIL. check inspects the effective merged config read-only; apply interviews
and writes it, then re-runs check. No argument or check runs the check; apply runs the check
first, then the interview-and-write flow. Idempotent: re-running reads the existing config and offers
updates rather than overwriting blind.
The audit config resolves as an additive merge of the documented layers. User-global
(~/.claude/codebase-health.md) → team (.claude/codebase-health.md) → personal override
(.claude/codebase-health.local.md), where a later layer's globs union with (not replace) the
earlier layer's and example-claims concatenate, except that a later layer declaring a dimension
with empty source lists is an explicit opt-out that removes that inherited dimension. This skill
writes only the team file; changes to the user-global layer or the personal override are the user's to make.
check (read-only)Inspect the effective merged config and report a PASS/FAIL/INFO table with one remediation line per
FAIL. Modify nothing, and do NOT run an audit. That is /codebase-health:audit.
apply writes .claude/codebase-health.md to make the run deterministic. When a
higher layer (a user-global base outside the repo) cannot be read, WARN it was not considered rather
than presenting the team file alone as the effective config.git check-ignore -v .claude/codebase-health.md; a non-empty result is FAIL with the matching
pattern. The .local.md personal override is expected to be ignored. INFO, not FAIL.apply
writes only the team file.apply (idempotent)Run check, then interview and write the config. Never create, write, edit or rewrite
.claude/codebase-health.md, by any tool (Write, Edit, or a Bash redirect, tee, sed -i or
interpreter), until the user confirms the proposed changes in a later turn. Even when every value
looks unambiguous, the turn that drafts the config ends by presenting it and asking, not by writing.
check just reported. This step writes only the team file,
so name what the local or user-global layer contributes. When a local or user-global opt-out zeroes a dimension,
a team-scope re-enable will not restore it on this machine, because that layer keeps removing it;
prompt the user to remove or update the opt-out in that layer too. The interview proposes
changes against that baseline, and nothing is dropped without the user confirming.docs/, README.md), agent-instruction
files (AGENTS.md, CLAUDE.md), ADR directories, convention docs.Directory.Build.props, pyproject.toml,
package.json, .github/workflows/, lefthook.yml, .editorconfig).verification-sources (the fence forbids
the other primary-source files). Omitting them makes cross-file findings unreachable.{ claim, verify-via } rows drawn from real
sentences in them. Concrete rows teach the discovery pass what drift looks like in THIS repo, the highest-value part of the config. The user approves or edits each row..claude/codebase-health.md following the structure in
${CLAUDE_PLUGIN_ROOT}/skills/setup/templates/config-template.md (replace every placeholder comment
with real values; drop unused placeholder rows).check probes on the written file. Dimension source lists
parse and name real paths, and both halves of the tracked-file pair hold:
git check-ignore -v .claude/codebase-health.md reports no match (a match is FAIL; surface the
pattern and offer to fix .gitignore before reporting success) AND
git ls-files --error-unmatch .claude/codebase-health.md exits 0 (non-zero means un-ignored but
still untracked, the guaranteed state right after a fresh write, so report "written but
untracked: commit it to share with the team", never success). Then offer the personal override convention: personal overrides go in
.claude/codebase-health.local.md; recommend the consumer add the recursive .claude/**/*.local.*
line to .gitignore if not already covered. A user-global base at ~/.claude/codebase-health.md is also honored. Layers
resolve user-global → team → personal override, additively.Re-running apply after everything passes changes nothing and reports "already configured".
A tracked .claude/codebase-health.md in the consuming repo, plus a one-paragraph summary of what
was written and how to re-run this setup to reconfigure.
/codebase-health:audit. check only inspects config.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub melodic-software/claude-code-plugins --plugin codebase-health2 skills in this plugin
Other plugins' skills for the same job