name: code-stats description: Visualizes repository complexity by counting files, lines of code, and grouping by extension. Use to assess project size or growth.
Analyzes the current workspace to provide development metrics.
7w4.net收錄了海量優質技能外掛。
node skills/code-stats/index.js [path]
Defaults to current working directory if path is omitted.
JSON object with:
- files: Total file count.
- lines: Total line count (approximate).
- byExt: Breakdown by file extension.
這個 Skill 質量中等偏上,功能實用,能夠快速統計專案中的檔案數量、程式碼行數,並按檔案型別分組展示。操作簡單,直接執行即可得到 JSON 格式的統計資料。有測試指令碼驗證基本功能,文件說明也比較清晰。主要不足是對於大型專案的處理效率可能不高,且沒有考慮忽略常見的大型依賴目錄,統計結果可能包含不必要的檔案。總體而言,是一個可用但功能相對基礎的程式碼統計工具,適合小中型專案使用。