Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Performs safe, incremental code refactoring and measures SOLID principle compliance to prioritize technical debt.
Use this skill ↓48% 87%+39 ptsof test cases passed
Passed 20 of 23 test cases with the skill, and 11 of 23 without it.
我们在静态分析中发现了一个涉及循环依赖且包含 God Object 隐患的模块,影响范围很广,但解耦修复成本很低。请在优先级矩阵中明确其分类等级、建议处理期限与推荐行动。
Classifies the debt priority level as Critical.
3 of 3 safety checks passed
实施安全且渐进式的代码重构,定量评估 SOLID 原则的遵守情况。将技术债务可视化,明确改进的优先级。
# 识别复杂代码并制定重构计划
find . -name "*.js" -exec wc -l {} + | sort -rn | head -10
"重构大文件以降低复杂度"
# 检测并整合重复代码
grep -r "function processUser" . --include="*.js"
"通过 Extract Method 将重复函数共通化"
# 检测 SOLID 原则违反
grep -r "class.*Service" . --include="*.js" | head -10
"评估这些类是否遵循单一职责原则"
# 检测长方法
grep -A 50 "function" src/*.js | grep -B 50 -A 50 "return" | wc -l
"用 Extract Method 拆分 50 行以上的方法"
# 条件分支的复杂度
grep -r "if.*if.*if" . --include="*.js"
"用 Strategy 模式改进嵌套的条件语句"
# 检测代码异味
grep -r "TODO\|FIXME\|HACK" . --exclude-dir=node_modules
"解决成为技术债务的注释"
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.