/forge:repo-healthfrom forge
Audits technical debt across architectural, structural, operational, and code hygiene vectors. Asks scoping questions, then writes a health-audit.md with prioritized findings for remediation.
Ships in forge. 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.
None: SKILL.md is the whole skill.
You coordinate a technical debt audit of a codebase. The auditor runs as a separate agent with its own context window.
$ARGUMENTS is optional context — the repo path, specific concerns, or scope constraints. If empty, audit the current working directory.
Ask scoping questions one at a time, preferring multiple choice. Wait for each answer before asking the next.
The health audit scans for technical debt across 4 vectors: architectural, structural, operational, and code hygiene. Findings are prioritized by severity (CRITICAL > HIGH > MEDIUM > LOW). The pipeline remediates until all CRITICAL and HIGH findings are resolved.
Question 1 — Known pain points give the auditor a starting hypothesis instead of scanning cold:
Are there parts of the codebase you already know are problematic?
Things that keep breaking, areas you dread touching, modules that slow down every PR.
A) Yes (tell me which areas and what's wrong)
B) No — scan everything with fresh eyes
Question 2 — Goal determines which debt vectors the auditor emphasizes:
What's the primary goal for this audit?
A) General health check — scan all 4 vectors equally
B) Production hardening — emphasize operational debt (error handling, timeouts, resource leaks, observability)
C) Onboarding prep — emphasize structural and hygiene debt (naming, dead code, documentation, test coverage)
D) Pre-release cleanup — focus on CRITICAL/HIGH items only, skip MEDIUM/LOW
Question 3 — Deployment target changes what "operational debt" means. A Lambda function has different concerns than a long-running container:
What's the deployment target?
A) Serverless (Lambda, Cloud Functions) — cold starts, execution limits, stateless constraints
B) Containers (ECS, Kubernetes, Docker) — resource management, health checks, graceful shutdown
C) Static hosting / SPA — build pipeline, CDN, client-side concerns
D) Monolith / traditional server — process management, connection pooling, memory leaks
E) Multiple (tell me which)
F) Not deployed yet / unsure
Question 4 — Scope and constraints in one question:
What should the health auditor cover, and is anything off-limits?
A) Full repo, no constraints
B) Full repo, but skip specific areas (tell me which — e.g., "don't touch the legacy auth module")
C) Specific directories only (tell me which)
Question 5 — Existing tooling helps the fortifier (hardening phase) know what guardrails already exist so it doesn't duplicate work:
What development tooling is already in place?
A) Full setup — linters, CI pipeline, pre-commit hooks, type checking
B) Partial (tell me what you have — e.g., "ESLint but no CI")
C) None — no linting, CI, or hooks configured
Generate the directory name: YYYY-MM-DD-health-slug
health-ragstack, health-api)docs/plans/YYYY-MM-DD-health-slug/Create the directory.
Spawn an Agent with subagent_type="forge:health-auditor", name="health-auditor". The subagent definition supplies the role prompt — pass only the <task>:
<task>
Audit the codebase in the current working directory.
Goal: [from Step 1]
Scope: [from Step 1]
Existing tooling: [from Step 1]
Constraints: [from Step 1]
</task>
Verify the auditor's output contains AUDIT_COMPLETE. If missing, the agent may have been truncated — report to the user and do NOT write health-audit.md with partial data.
If signal present, Write docs/plans/YYYY-MM-DD-health-slug/health-audit.md:
---
type: repo-health
date: YYYY-MM-DD
goal: [from Step 1]
---
# Codebase Health Audit: [repo name]
## Configuration
- **Goal:** [from Step 1]
- **Scope:** [from Step 1]
- **Existing Tooling:** [from Step 1]
- **Constraints:** [from Step 1]
## Summary
- Overall health: [CRITICAL | POOR | FAIR | GOOD | EXCELLENT]
- Total findings: X critical, Y high, Z medium, W low
## Tech Debt Ledger
[Full auditor output — prioritized findings with file:line locations]
## Quick Wins
[Low effort, high impact items from the auditor]
## Automated Scan Results
[Tool output summaries from knip/vulture, npm audit/pip-audit, etc.]
Append an entry to .claude/skill-runs.json in the repo root. If the file does not exist, create it with an empty array first.
{
"skill": "repo-health",
"date": "YYYY-MM-DD",
"plan": "YYYY-MM-DD-health-slug"
}
Audit complete: docs/plans/YYYY-MM-DD-health-slug/health-audit.md
Findings: X critical, Y high, Z medium, W low
Quick wins identified: N
To remediate, run:
/forge:run YYYY-MM-DD-health-slug
(Standalone install: /run YYYY-MM-DD-health-slug. To orchestrate in this session instead: /forge:pipeline YYYY-MM-DD-health-slug.)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/auditRun any mix of repo-eval, repo-health and doc-health audits in parallel, producing one plan directory for a single /forge:run./brainstormExplore the codebase and turn a feature idea into a design spec (brainstorm.md) through clarifying questions; the entry point for /forge:run./doc-healthAudit documentation drift against the code across 6 phases and write doc-audit.md for /forge:run remediation./pipelineRun the adversarial plan → implement → review pipeline on a plan directory produced by /brainstorm or an audit skill./repo-evalScore the codebase on 12 pillars with a 3-evaluator hiring panel and write eval.md for /forge:run remediation.npx claudepluginhub hatmanstack/claude-forge --plugin forgeOther plugins' skills for the same job