Analyze codebase complexity and generate visual statistics reports. Shows file counts, language distribution, line metrics, TODOs, and complexity indicators.
代码统计分析工具,可视化展示项目复杂度。
# 分析当前目录
node skills/code-stats/index.js
# 分析指定目录
node skills/code-stats/index.js /path/to/project
# JSON 输出
node skills/code-stats/index.js --json
# CSV 输出
node skills/code-stats/index.js --csv
const { analyzeWorkspace } = require('./skills/code-stats/analyzer');
const { formatOutput } = require('./skills/code-stats/visualizer');
const stats = await analyzeWorkspace('./my-project');
console.log(formatOutput(stats, 'pretty'));
╔════════════════════════════════════════════════════════╗
║ 📊 CODE STATISTICS REPORT ║
╚════════════════════════════════════════════════════════╝
📁 SUMMARY
──────────────────────────────────────────────────
Total Files: 156
Total Lines: 12,450
Code Lines: 9,876
Comment Lines: 1,234
Blank Lines: 1,340
Comment Ratio: 9.9%
Avg File Size: 80 lines
Total Functions: 342
TODOs Found: 12
🔤 TOP LANGUAGES
──────────────────────────────────────────────────
Python ████████░░░░░░░░░░░░ 40.2% (5,006)
JavaScript ██████░░░░░░░░░░░░░░ 30.1% (3,747)
TypeScript ███░░░░░░░░░░░░░░░░░ 15.5% (1,930)
Markdown ██░░░░░░░░░░░░░░░░░░ 10.2% (1,270)
JSON █░░░░░░░░░░░░░░░░░░░ 4.0% (497)
JavaScript, TypeScript, Python, Go, Rust, Java, C/C++, C#, Ruby, PHP, Swift, Kotlin, Shell, 等 30+ 种语言。
自动忽略: node_modules, .git, pycache, dist, build, venv, .env 等
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer