Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Checks code quality metrics such as cyclomatic complexity, function length, nesting depth, naming conventions and duplicate code.
55% 95%+41 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 12 of 22 without it.
I need to run an automated quality check on the directory `./src/api` and receive the metrics strictly formatted as machine-readable JSON data. What exact command should I execute using the project's quality checker script?
The command invokes 'node scripts/quality_checker.js ./src/api --json'.
3 of 3 safety checks passed
代码质量 = 可读性 + 可维护性 + 可测试性
劣质代码是技术债,技术债是道基裂痕
复杂度是 bug 的温床
运行质量检查脚本(跨平台):
# 在 skill 目录下运行
node scripts/quality_checker.js <扫描路径>
node scripts/quality_checker.js <扫描路径> -v # 详细模式
node scripts/quality_checker.js <扫描路径> --json # JSON 输出
| 指标 | 阈值 | 超标后果 |
|---|---|---|
| 圈复杂度 | ≤ 10 | 🟠 警告,建议拆分 |
| 函数长度 | ≤ 50 行 | 🟠 警告,建议拆分 |
| 文件长度 | ≤ 500 行 | 🟡 提示,考虑拆分 |
| 参数数量 | ≤ 5 | 🟠 警告,考虑封装 |
| 嵌套深度 | ≤ 4 | 🟠 警告,建议重构 |
| 行长度 | ≤ 120 | 🔵 提示 |
| 类型 | 规范 | 示例 |
|---|---|---|
| 类名 | PascalCase | UserService, HttpClient |
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.