techdebt/SKILL.md
Use at end of coding sessions to find and eliminate duplicated code, dead code, and unnecessary abstractions. Also use when codebase feels cluttered or when you suspect copy-paste patterns have accumulated.
npx skillsauth add aromanarguello/roman-skills techdebtInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find and kill duplicated code, dead code, and unnecessary complexity.
/techdebt before wrapping up)digraph techdebt {
rankdir=TB;
"Start /techdebt" [shape=box];
"Scope: changed files or full scan?" [shape=diamond];
"Get recently modified files" [shape=box];
"Scan entire codebase" [shape=box];
"Find duplications" [shape=box];
"Find dead code" [shape=box];
"Find over-abstractions" [shape=box];
"Present findings with severity" [shape=box];
"User picks what to fix" [shape=diamond];
"Apply fixes" [shape=box];
"Verify no regressions" [shape=box];
"Done" [shape=box];
"Start /techdebt" -> "Scope: changed files or full scan?";
"Scope: changed files or full scan?" -> "Get recently modified files" [label="session"];
"Scope: changed files or full scan?" -> "Scan entire codebase" [label="full"];
"Get recently modified files" -> "Find duplications";
"Scan entire codebase" -> "Find duplications";
"Find duplications" -> "Find dead code";
"Find dead code" -> "Find over-abstractions";
"Find over-abstractions" -> "Present findings with severity";
"Present findings with severity" -> "User picks what to fix";
"User picks what to fix" -> "Apply fixes" [label="yes"];
"User picks what to fix" -> "Done" [label="skip"];
"Apply fixes" -> "Verify no regressions";
"Verify no regressions" -> "Done";
}
Detection approach:
Present findings as a prioritized list:
## Tech Debt Found
### High Priority (fix now)
1. **Duplicated validation logic** in `auth.ts:45` and `api.ts:120`
- 15 lines identical, only differ in error message
- Suggestion: Extract to `validateRequest()` helper
### Medium Priority (consider fixing)
2. **Dead export** `formatDate` in `utils.ts:30`
- Exported but never imported anywhere
- Suggestion: Remove or make internal
### Low Priority (note for later)
3. **Similar patterns** in handlers `userHandler.ts`, `orderHandler.ts`
- Could share base class but works fine as-is
When user runs /techdebt:
Determine scope
git diff --name-only HEAD~10)Run analysis
Present findings
Interactive cleanup
| Command | Description |
|---------|-------------|
| /techdebt | Scan session changes |
| /techdebt full | Scan entire codebase |
| /techdebt --duplicates | Only find duplications |
| /techdebt --dead | Only find dead code |
Pair with wrap-up skill:
/techdebt firstdevelopment
Use when the user wants to brainstorm, stress-test, sharpen a plan, explore options, decide what to build, or says "grill me", "/grill-me", "help me think through", "sharpen this idea", or "what should I build".
development
Use when you have 2+ independent tasks to run concurrently without a formal plan. Triggers on "parallel research", "parallel subagents", "explore in parallel", "investigate multiple", "run tests in parallel". NOT for plan execution (use subagent-driven-development instead)
testing
Pre-merge review that runs PR quality, tech debt, security, regression, and performance analysis in parallel via general-purpose agents, aggregates findings into a unified prioritized report, then auto-fixes mechanical issues. Use when the user says "final review", "pre-merge review", "run all reviews", or wants a comprehensive check before merging. Defaults to all reviewers; accepts args to run a subset (e.g., `/final-review security techdebt`).
development
Apply when writing, modifying, or reviewing code. Behavioral guidelines to reduce common LLM coding mistakes. Triggers on implementation tasks, code changes, refactoring, bug fixes, or feature development.