techdebt
Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.
它会碰到什么
扫了多少2 个文本文件,4 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
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.Listinstead oflist - 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.
Usage:
/techdebt- Scan entire project/techdebt src/- Scan specific directory/techdebt src/utils.py- Scan specific file
Output
Provide a summary of:
- Issues found (by category)
- Issues fixed
- Remaining items for future sessions
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 3,829
本站分层T1
该仓技能数1161
原文件路径
skills/09-meleantonio-awesome-econ-ai-stuff/_skills/engineering/techdebt/SKILL.md同一个仓库里的其他技能
- Full-empirical-analysis-skill
- Full-empirical-analysis-skill-R
- Full-empirical-analysis-skill-Stata
- auto-empirical-research-skills
- StatsPAI_skill
- Full-empirical-analysis-skill
- Full-empirical-analysis-skill-Stata
- Full-empirical-analysis-skill-R
- academic-paper-composer
- academic-paper-strategist
- medical-imaging-review
- paper-slide-deck