code-stats by 0xdarkmatter/claude-mods
npx skills add https://github.com/0xdarkmatter/claude-mods --skill code-stats快速分析代码库的规模、构成和变更。
# 统计所有代码
tokei
# 紧凑输出并按代码量排序
tokei --compact --sort code
# 特定语言
tokei --type=TypeScript,JavaScript
# 排除目录
tokei --exclude node_modules --exclude dist
# 用于脚本处理的 JSON 输出
tokei --output json | jq '.Total.code'
===============================================================================
语言 文件数 总行数 代码行 注释行 空行
===============================================================================
TypeScript 45 12847 9823 1456 1568
JavaScript 12 2341 1876 234 231
-------------------------------------------------------------------------------
总计 57 15188 11699 1690 1799
===============================================================================
# 比较文件
difft old.ts new.ts
# 行内模式
difft --display=inline old.ts new.ts
# 与 git 结合使用
GIT_EXTERNAL_DIFF=difft git diff
GIT_EXTERNAL_DIFF=difft git show HEAD~1
Quickly analyze codebase size, composition, and changes.
# Count all code
tokei
# Compact output sorted by code
tokei --compact --sort code
# Specific languages
tokei --type=TypeScript,JavaScript
# Exclude directories
tokei --exclude node_modules --exclude dist
# JSON output for scripting
tokei --output json | jq '.Total.code'
===============================================================================
Language Files Lines Code Comments Blanks
===============================================================================
TypeScript 45 12847 9823 1456 1568
JavaScript 12 2341 1876 234 231
-------------------------------------------------------------------------------
Total 57 15188 11699 1690 1799
===============================================================================
# Compare files
difft old.ts new.ts
# Inline mode
difft --display=inline old.ts new.ts
# With git
GIT_EXTERNAL_DIFF=difft git diff
GIT_EXTERNAL_DIFF=difft git show HEAD~1
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 传统差异工具 | difft |
|---|---|
| 逐行比较 | 基于抽象语法树 |
| 将移动显示为删除+添加 | 识别代码移动 |
| 对空白字符敏感 | 忽略格式差异 |
| 任务 | 命令 |
|---|---|
| 统计所有代码 | tokei |
| 紧凑输出 | tokei --compact |
| 按代码量排序 | tokei --sort code |
| 仅 TypeScript | tokei -t TypeScript |
| JSON 输出 | tokei --output json |
| 排除目录 | tokei --exclude node_modules |
| 语义化差异 | difft file1 file2 |
| Git 差异比较 | GIT_EXTERNAL_DIFF=difft git diff |
如需详细模式,请加载:
./references/tokei-advanced.md - 过滤、输出格式、CI 集成./references/difft-advanced.md - 显示模式、git 集成、语言支持每周安装量
19
代码仓库
GitHub 星标数
8
首次出现
2026年1月24日
安全审计
已安装于
claude-code17
opencode17
gemini-cli16
codex16
cursor14
trae12
| Traditional diff | difft |
|---|---|
| Line-by-line | AST-aware |
| Shows moved as delete+add | Recognizes moves |
| Whitespace sensitive | Ignores formatting |
| Task | Command |
|---|---|
| Count all code | tokei |
| Compact output | tokei --compact |
| Sort by code | tokei --sort code |
| TypeScript only | tokei -t TypeScript |
| JSON output | tokei --output json |
| Exclude dir | tokei --exclude node_modules |
| Semantic diff | difft file1 file2 |
| Git diff | GIT_EXTERNAL_DIFF=difft git diff |
For detailed patterns, load:
./references/tokei-advanced.md - Filtering, output formats, CI integration./references/difft-advanced.md - Display modes, git integration, language supportWeekly Installs
19
Repository
GitHub Stars
8
First Seen
Jan 24, 2026
Security Audits
Installed on
claude-code17
opencode17
gemini-cli16
codex16
cursor14
trae12
AI新闻播客制作技能:实时新闻转对话式播客脚本与音频生成
1,200 周安装