Start a fresh conversation. Replace the highlighted placeholders.
Use techdebt to scan [target directory or file] for technical debt, prioritize and fix high-severity easy issues with atomic commits, then run the documented lint and test gates; leave any unresolved findings summarized for a future session.
Required inputs
[target directory or file]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: techdebtdescription: Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.workflow_stage: engineeringcompatibility: - claude-code - cursor - codex - gemini-cliauthor: Awesome Econ AI Communityversion: 1.0.0disable-model-invocation: truetags: - refactoring - code-quality - maintenance
Technical Debt Finder
Identify and fix technical debt in the codebase.
What to Look For
Code Duplication
Functions with similar logic that could be consolidated
Copy-pasted code blocks
Repeated patterns that should be abstracted
Dead Code
Unused imports
Unused functions or classes
Commented-out code blocks
Unreachable code paths
Outdated Patterns
Deprecated API usage
Old-style string formatting (% or .format) vs f-strings
Type hints using typing.List instead of list
Missing type hints on public functions
Code Smells
Functions longer than 50 lines
Too many parameters (more than 5)
Deep nesting (more than 3 levels)
Magic numbers without constants
Overly complex conditionals
Missing Best Practices
Missing docstrings on public functions
Missing error handling
Hardcoded values that should be config
Missing tests for critical paths
Workflow
Scan the Codebase
Look for patterns matching the issues above
Prioritize by impact and ease of fix
Report Findings
List issues by category
Include file paths and line numbers
Estimate severity (high/medium/low)
Fix Issues
Start with high-severity, easy fixes
Create atomic commits for each fix
Run tests after each change
Verify
Run linter: ruff check .
Run tests: pytest
Ensure no new issues introduced
Arguments
Optionally specify a directory or file to focus on.