目录 / code-stats
code-stats
--- name: code-stats description: Analyze workspace code complexity — file counts by type, line counts, language breakdown, git commit frequency, and TODO/FIXME density. Use when you need to understand repo health or complexity metrics. --- # Code Stats Skill Analyzes a workspace directory for code complexity metrics. ## Usage ```js const { analyze, report } = require('./skills/code-stats'); // Analyze current workspace const stats = analyze(process.cwd()); console.log(report(stats)); ``` ## CLI ```bash node skills/code-stats/scripts/stats.js [directory] ``` ## Exports - `analyze(dir)` — Returns stats object with file counts, line counts, language breakdown - `report(stats)` — Returns human-readable formatted report string - `countTodos(dir)` — Scans for TODO/FIXME/HACK/XXX comments ## Output Fields - `filesByExt` — File count grouped by extension - `linesByExt` — Line count grouped by extension - `totalFiles` — Total file count (excludes node_modules, .git) - `totalLines` — Total lines of code - `todoCount` — TODO/FIXME/HACK/XXX comment count - `languageBreakdown` — Percentage breakdown by language
这是模型对公开材料的总结,不是官方声明,请以原链内容为准。
存档时间线
| 版本 | 存档时间 | 内容哈希 | 内容 |
|---|---|---|---|
| v1 | 2026-11-13 18:52 | c2d3861e | 可取 |
版本索引永久保留;内容副本只保留最新 1 份,更早版本仅留索引与哈希(存档时间线的证据链不会因此断裂)。
提交举报 / 纠错
侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。