/code-health:health-inlinefrom Code Health
Runs inline codebase health checks across 5 modes: bugs, cleanup, deps, reuse, security. Detects issues, fixes them by priority, and verifies. For pnpm+TypeScript repos only.
Ships in Code Health. 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.
Read when SKILL.md points to them.
You ARE the orchestrator. Execute the workflow directly without spawning a
separate orchestrator agent. Pick the mode, open its full workflow in
references/modes/<mode>.md, use worker prompts from
references/worker-prompts/<mode>.md.
| Mode | Command | Detect brief | Fix brief | Priorities | Report | Changes log | Fixes artifact |
|---|---|---|---|---|---|---|---|
| bug | /health bugs | Bug Hunter | Bug Fixer | critical → high → medium → low | bug-hunting-report.md | bug-changes.json | bug-fixes-implemented.md |
| cleanup | /health cleanup | Dead Code Hunter | Dead Code Remover | critical → high → medium → low | dead-code-report.md | cleanup-changes.json | dead-code-cleanup-summary.md |
| deps | /health deps | Dependency Auditor | Dependency Updater | critical → high → medium → low | dependency-scan-report.md | deps-changes.json | dependency-updates-implemented.md |
| reuse | /health reuse | Reuse Hunter | Reuse Fixer | high → medium → low (no critical) | reuse-hunting-report.md | reuse-changes.json | reuse-consolidation-implemented.md |
| security | /health security | Security Scanner | Vulnerability Fixer | critical → high → medium → low | security-scan-report.md | security-changes.json | security-fixes-implemented.md |
The ten standalone worker agents (bug-hunter, bug-fixer, …) were retired into
_trash-2026-08-22/agents/health/workers/: the agent registry holds only 66
slots, and the same job described both here and in an agent file drifts apart —
the two copies have to be edited in lockstep, and a rollback already broke
because they were not.
Every worker is now spawned as subagent_type: "general-purpose",
model: "fable", with the full role brief pasted from
references/worker-prompts/<mode>.md. The brief names in the table above are
section headings inside that file, not agent types — subagent_type: "bug-hunter" will fail with Agent type not found. The mode files carry a short
orchestration prompt; the brief is what the worker actually needs, so paste it.
Detection → Baseline → Fix/Remove/Update/Consolidate by Priority → Gate vs baseline → Verify → Repeat if needed
The quality gate runs AFTER a fix, never before it. A red type-check/build
is the usual reason this skill is invoked, so a gate placed in front of the fixing
loop exits on exactly the input it exists to repair — and in security mode an
unrelated broken build would block patching a live vulnerability. The pre-fix run
is therefore a baseline record, not a gate: it can never end the workflow.
Max iterations: 3
mkdir -p .tmp/current/{plans,changes,backups};
validate environment (package.json, type-check + build scripts exist);
initialize TodoWrite with one item per priority + detection + verification.pnpm type-check and
pnpm build inline and RECORD the outcome as the baseline — green, or the set
of pre-existing errors. Red baseline → note it, hand the error list to the fix
worker as context, continue to Phase 4. Never report-and-exit here.pnpm type-check && pnpm build
compared against the baseline: any error absent from the baseline → report,
suggest rollback, exit; same-or-fewer errors → next priority. Green is not
required to proceed when the baseline was already red — the gate proves the
fixes did not make things worse, and Phase 5 reports what is still broken.baseline → final for both type-check and build, artifacts list (exact
templates — in the mode files).Error handling (all modes): quality gate fails → rollback available from the
mode's changes log + .tmp/current/backups/ (or rollback-changes skill);
worker fails → report error, suggest manual intervention, exit workflow.
pnpm install.packages/shared-types/src/, re-export export * from '@package/shared-types/{module}', NEVER copy code between packages).| Old (Orchestrator Agent) | New (Inline Skill) |
|---|---|
| 9+ orchestrator calls | 0 orchestrator calls |
| ~1400 lines (cmd + agent) | ~150 lines |
| Context reload each call | Single session context |
| Plan files for each phase | Direct execution |
| ~10,000+ tokens overhead | ~500 tokens |
references/modes/{bug,cleanup,deps,reuse,security}.md — full original
workflows, verbatim (formerly the 5 standalone skills).references/worker-prompts/{bug,cleanup,deps,reuse,security}.md — the full
role briefs: detection, verification and fix worker, each self-contained
(rewritten 2026-08-22, absorbing the bodies of the ten retired agents).references/bug-report-template.md — section-by-section template of
bug-hunting-report.md (раньше лежал в agents/references под именем bug-hunter-report-template.md — файла больше нет).references/bug-report-template.md (opens in a new tab)references/modes/bug.md (opens in a new tab)references/modes/cleanup.md (opens in a new tab)references/modes/deps.md (opens in a new tab)references/modes/reuse.md (opens in a new tab)references/modes/security.md (opens in a new tab)references/worker-prompts/bug.md (opens in a new tab)references/worker-prompts/cleanup.md (opens in a new tab)references/worker-prompts/deps.md (opens in a new tab)references/worker-prompts/reuse.md (opens in a new tab)references/worker-prompts/security.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/config-healthЗдоровье конфига Claude Code: битые ссылки, вес промпта, лимит памяти, живость MCP. Триггеры: «проверь конфиг», «вес промпта». НЕ чужой скилл→skill-manager; НЕ код→health-inline/leak-scanPII/деанон перед публикацией (leak_scan.py) + prompt-injection в чужом скилле (skill_injection_scan.py). Триггеры: «обезличь репо», «проверь скилл перед установкой»./osint-reconРазведка инфраструктуры домена/IP CLI osint_client.py: DNS, whois, субдомены, порты/CVE, санкции. Триггеры: «пробей домен». НЕ люди→social-intel./privacy-filterЛокальный PII-фильтр (OpenAI opf, on-device): обезличить текст перед облачным LLM, обратимая редакция. Триггеры: «обезличь текст», «найди ПД»./security-auditSecurity-аудит: секреты в коде, pip/npm audit, OWASP Top 10. Триггеры: «аудит безопасности», «проверь на уязвимости». НЕ активный пентест→агент security-engineer (режим PENTEST)./skill-auditЗаглушка: проверка чужого скилла/плагина до установки переехала в skill-manager, режим «Аудит». Сам не вызывается, держит старые ссылки живыми.npx claudepluginhub jhamidun/claude-code-config-pack --plugin code-healthOther plugins' skills for the same job