tech-debt-audit
Skill0 starsChanged 8 months agoMITView on GitHub
Audit the codebase for technical debt across 4 dimensions: code health, test & reliability, documentation & specs, dependencies & infra. Produces a prioritized remediation plan. Triggers: "tech debt", "audit technique", "dette technique", "code health", "assess technical debt".
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- code-yeongyu/oh-my-openagenttheir own version, first seen Nov 5, 2026
- TencentBlueKing/bk-litetheir own version, first seen Oct 8, 2026
- code-yeongyu/oh-my-opencodetheir own version, first seen Oct 8, 2026
- robertoatila/jarvis-skill-registrytheir own version, first seen Sep 14, 2026
- ksimback/tech-debt-skilltheir own version, first seen Apr 25, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- code-yeongyu/oh-my-opencode★ 71ksame name
- code-yeongyu/oh-my-openagent★ 71ksame name
- ksimback/tech-debt-skill★ 594same name
- TencentBlueKing/bk-lite★ 72same name
- robertoatila/jarvis-skill-registry★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ci-watchSkill
- commitSkill
- discovery-interview-prepSkill
- doc-generateSkill
- incident-responseSkill
- opportunity-solution-treeSkill
- polarisSkill
- prd-developmentSkill
- prioritization-advisorSkill
- reviewSkill
- roadmapSkill
- security-auditSkill
- session-wrapSkill
- spec-updateSkill
- tddSkill
- test-runnerSkill
- user-storySkill
- uxSkill
- workshop-facilitationSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Use workshop-facilitation as the default interaction protocol for this skill.
- Very specific: line 93
After collecting answers, delegate the codebase scan to the tech-debt-auditor agent (.claude/agents/tech-debt-auditor.md):
- Distinctive: line 116
Recommendation: Start with dependency updates (security risk), then extract the 3 god files into modules.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Perform a comprehensive technical debt assessment across the entire codebase (or a specific module). Use this when you need a global health check -- not a per-commit review, but a bird's-eye view of accumulated debt. Outputs a scored health report with a prioritized remediation plan.
This is not a code review -- /review evaluates individual changes. This skill evaluates the codebase as a whole.
Key Concepts
The Technical Debt Quadrant (Martin Fowler)
| Prudent | Reckless | |
| Deliberate | "We know we're cutting corners, and we'll fix it" | "We don't have time for design" |
| Inadvertent | "Now we know how we should have done it" | "What's layering?" |
Debt Dimensions
| Dimension | Debt categories scanned |
| Code Health | Complexity (cyclomatic, nesting), Duplication (near-identical logic), Coupling (circular deps, leaky abstractions), Dead code (unused exports, unreachable branches) |
| Test & Reliability | Test coverage (missing/brittle tests), Error handling (silent failures, missing catch), Security (delegates to security-auditor agent if available) |
| Documentation & Specs | Spec coverage (domains without docs/specs/<domain>.md), Spec freshness (History entry vs recent commits), Spec completeness (missing User Stories/Behavior), Config docs (.env.example sync, undocumented settings), README alignment |
| Dependencies & Infra | Outdated packages, Known vulnerabilities, Build/CI health (slow pipelines, flaky tests), Migration debt (pending/irreversible migrations) |
Anti-Patterns
- Not a one-time event: Debt accumulates continuously -- reassess every quarter
- Not a blame tool: Debt is normal; the goal is informed prioritization, not finger-pointing
- Not exhaustive: Focus on actionable findings, not cataloging every imperfection
Facilitation Source of Truth
Use workshop-facilitation as the default interaction protocol for this skill.
It defines: session heads-up + entry mode (Guided, Context dump, Best guess), one-question turns, progress labels, interruption handling, numbered recommendations at decision points, quick-select options.
This file defines the domain-specific assessment content. If there is a conflict, follow this file's domain logic.
Application
This interactive skill asks up to 4 adaptive questions, then performs a deep codebase scan.
Question 1: Audit Scope
"What scope should this audit cover?"
- Entire project -- Full codebase health check
- Specific module/directory -- Focus on a subsystem (specify path)
- Recently changed files -- Last 30 days of git history
- Hot paths only -- Files with most commits/changes (churn analysis)
Question 2: Audit Dimensions (multi-select)
"Which dimensions should this audit cover? Select all that apply."
- Code Health -- Complexity, duplication, coupling, dead code
- Test & Reliability -- Test coverage, error handling, security patterns (delegates to security-auditor)
- Documentation & Specs -- Spec coverage/freshness, config docs, README alignment
- Dependencies & Infra -- Outdated deps, vulnerabilities, build/CI health, migration debt
Default if none selected: all 4 dimensions. Security scan within "Test & Reliability" delegates to the
security-auditoragent (.claude/agents/security-auditor.md) -- it does NOT duplicate/security-audit.
Question 3: Constraints
"What constraints should the remediation plan respect?"
- Time-boxed -- We have N sprints/days for refactoring
- Incremental only -- No big rewrites, must be done alongside features
- No constraints -- We can dedicate focused refactoring time
- Critical fixes only -- Only address things that cause production issues
Question 4: Severity Thresholds
"What thresholds should flag a file as problematic?"
- Strict -- Flag anything above 10 cyclomatic complexity, 200 LOC, or 3+ levels of nesting
- Moderate -- Flag above 20 complexity, 400 LOC, or 5+ nesting levels
- Lenient -- Only flag extreme cases (50+ complexity, 800+ LOC)
- Auto-detect -- Infer thresholds from the project's existing patterns
Audit Process
After collecting answers, delegate the codebase scan to the tech-debt-auditor agent (.claude/agents/tech-debt-auditor.md):
Use the Agent tool with subagent_type="general-purpose" and model="haiku".
Pass the collected context (scope, priorities, constraints, thresholds) as the prompt.
The agent scans the codebase and returns a structured Technical Debt Report.The agent handles: codebase scanning, dimension-based analysis, file scoring, git churn cross-referencing. It returns a health-scored report with a prioritized remediation plan. Pass the selected dimensions so the agent scans only what was requested.
Examples
Example 1: Healthy Project with Test Debt
- Context: Well-structured codebase, clean modules, but only 30% test coverage on business logic
- Score: Overall B (Test Coverage: D, all others: A-B)
- Recommendation: Focus remediation on test debt. Quick wins: add tests for top-10 most-changed files. No structural refactoring needed.
- Why NOT full refactor: Code quality is high -- adding tests is higher ROI than restructuring
Example 2: Legacy Monolith
- Context: 3-year-old codebase, several 1000+ LOC files, circular dependencies, outdated deps
- Score: Overall D (Complexity: F, Coupling: D, Dependencies: D)
- Recommendation: Start with dependency updates (security risk), then extract the 3 god files into modules. Time-box to 2 sprints.
- Why NOT rewrite: Incremental extraction preserves working behavior; rewrite risks regression
Common Pitfalls
Pitfall 1: Boiling the Ocean
Symptom: Audit produces 200 findings, team is paralyzed Consequence: Nothing gets fixed; audit is shelved Fix: Limit report to top 10 actionable items. Quick wins first. Re-audit after each batch.
Pitfall 2: Ignoring Churn Data
Symptom: Audit flags a complex file that nobody touches Consequence: Refactoring effort wasted on low-impact code Fix: Cross-reference complexity with git churn. High complexity + high churn = priority. High complexity + zero churn = ignore.
Pitfall 3: Scoring Without Context
Symptom: Applying the same thresholds to generated code, test fixtures, or config files Consequence: False positives drown real issues Fix: Exclude generated files, vendored code, and test fixtures from scoring.
Pitfall 4: Audit Without Follow-Through
Symptom: Report is generated, shared, then forgotten Consequence: Debt continues to accumulate Fix: Convert top findings into backlog items with clear acceptance criteria. Schedule reassessment.
Pitfall 5: Treating All Debt as Bad
Symptom: Team tries to eliminate all debt immediately Consequence: Velocity drops, features stall Fix: Some debt is intentional and acceptable. Focus on debt that slows the team down or causes bugs.
References
External Frameworks
- Martin Fowler, Technical Debt Quadrant (2009)
- Adam Tornhill, Your Code as a Crime Scene (2015) -- churn analysis
- Michael Feathers, Working Effectively with Legacy Code (2004)
Related Skills
/review-- Per-change code review (complementary, not overlapping)/simplify-- Post-change complexity reduction/test-runner-- Execute tests identified as missing
Credit
- Inspired by Desktop Commander "Assess Technical Debt" prompt pattern.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

