闲社服务运行正常AI智能体自动化平台
g

Git仓库统计

技能标识:git-stats

Analyze git repository statistics including contributor rankings, lines of code by language, commit frequency by day/hour, monthly activity trends, and file type breakdowns. Use when asked to analyze a repo, show git stats, get contributor info, count lines of code, or visualize commit activity patterns.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Git仓库统计

Git Stats

分析任意本地Git仓库,获取贡献者排名、按语言统计的代码行数、提交活动模式以及月度趋势。

快速开始

bash

分析当前仓库


python3 scripts/git_stats.py

分析指定仓库

python3 scripts/git_stats.py /path/to/repo

输出JSON格式供进一步处理

python3 scripts/git_stats.py --json

按日期范围筛选

python3 scripts/git_stats.py --since 2025-01-01 --until 2025-12-31

指定分支

python3 scripts/git_stats.py --branch main

跳过代码行数统计以加快速度

python3 scripts/git_stats.py --no-loc

输出部分

  • - 顶级贡献者 — 按提交次数排序,附带邮箱信息
  • 代码行数 — 文件/行数总计,按扩展名细分
  • 文件类型 — 按扩展名统计的文件数量
  • 按日活动 — 一周中提交最活跃的日期
  • 按小时活动 — 编码高峰时段
  • 月度趋势 — 过去12个月的提交量(可通过--months配置)

选项

标志描述
--branch分析指定分支
--since
仅包含此日期之后的提交 | | --until | 仅包含此日期之前的提交 | | --months N | 月度趋势窗口(默认:12) | | --json | 输出JSON格式,便于程序化使用 | | --no-loc | 跳过行数统计(大型仓库时速度更快) |

依赖项

  • - git 命令行工具(必须位于PATH环境变量中)
  • Python 3.8+(仅使用标准库,无需pip包)

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 git-stats-1776050882 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 git-stats-1776050882 技能

通过命令行安装

skillhub install git-stats-1776050882

下载

⬇ 下载 git-stats v1.0.0(免费)

文件大小: 4.23 KB | 发布时间: 2026-4-14 12:19

v1.0.0 最新 2026-4-14 12:19
Initial release of git-stats.

- Analyze local git repositories for contributor rankings, lines of code (LOC) by language, commit activity patterns, and monthly trends.
- Output includes: top contributors, LOC by extension, file type counts, daily/hourly commit charts, and monthly commit trends.
- Multiple options such as branch selection, date filtering, JSON output, window for monthly trends, and skipping LOC for speed.
- Compatible with Python 3.8+ (no extra packages) and requires git on PATH.
返回顶部