code-stats
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.
Latest: v0.1.0
Expanded code-stats with language and repository health metrics.
- Added
analyze,report, andcountTodosexports. - Added a CLI at
scripts/stats.js. - Added file and line counts by extension, language breakdown, and TODO/FIXME/HACK/XXX counts.
- Total file counts exclude
node_modulesand.git.
Code Stats Skill
Analyzes a workspace directory for code complexity metrics.
Usage
const { analyze, report } = require('./skills/code-stats');
// Analyze current workspace
const stats = analyze(process.cwd());
console.log(report(stats));
CLI
node skills/code-stats/scripts/stats.js [directory]
Exports
analyze(dir)— Returns stats object with file counts, line counts, language breakdownreport(stats)— Returns human-readable formatted report stringcountTodos(dir)— Scans for TODO/FIXME/HACK/XXX comments
Output Fields
filesByExt— File count grouped by extensionlinesByExt— Line count grouped by extensiontotalFiles— Total file count (excludes node_modules, .git)totalLines— Total lines of codetodoCount— TODO/FIXME/HACK/XXX comment countlanguageBreakdown— Percentage breakdown by language
