agentsclimarketplace

Git repo audit

Skill serejaris/kimi-skills/skills/git-repo-audit

Полная коллекция скиллов Kimi (267 built-in + 7 plugin skills), выгруженная из сандбокса агента

Install
npx -y skills add serejaris/kimi-skills --skill git-repo-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

深度分析 Git 仓库历史,识别高频变更的热点文件、分析代码的实际贡献归属关系、并扫描历史提交中的密钥泄露等安全隐患。当用户提及分析仓库、查看代码归属、寻找热点文件或安全风险扫描,或询问团队协作、代码审查分配、技术债务与安全审计等关键词时触发。

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.0 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

Git Forensics — Git 历史深度分析

对 Git 仓库进行三维深度分析:热点文件识别代码归属分析密钥泄露扫描

功能概览

1. 热点文件分析 (scripts/hotfiles.sh)

找出仓库中变更最频繁的文件,帮助识别:

  • 高风险代码区域(频繁修改 = 潜在不稳定)
  • 需要重点 code review 的文件
  • 可能需要拆分或重构的模块

用法:

bash scripts/hotfiles.sh [选项]
选项说明默认值
--repo PATH仓库路径当前目录
--top N显示前 N 个文件20
--since DATE起始日期(如 2024-01-01不限
--until DATE截止日期不限
--author AUTHOR按作者过滤不限
--format FORMAT输出格式:table / csv / jsontable

2. 代码归属分析 (scripts/ownership.sh)

分析代码的实际归属关系,输出每位贡献者在指定范围内的:

  • 提交次数与占比
  • 修改行数(增/删)
  • 最近活跃时间

用法:

bash scripts/ownership.sh [选项]
选项说明默认值
--repo PATH仓库路径当前目录
--path SUBPATH分析指定子目录或文件整个仓库
--top N显示前 N 位贡献者10
--since DATE起始日期不限
--format FORMAT输出格式:table / csv / jsontable

3. 密钥泄露扫描 (scripts/secret-scan.sh)

扫描 Git 全量历史(包括已删除的 commit),检测常见的密钥和敏感信息泄露:

  • AWS Access Key / Secret Key
  • GitHub / GitLab / Slack Token
  • SSH 私钥
  • 通用 API Key、密码、Secret 模式

用法:

bash scripts/secret-scan.sh [选项]
选项说明默认值
--repo PATH仓库路径当前目录
--branch BRANCH扫描指定分支所有分支
--since DATE起始日期不限
--format FORMAT输出格式:table / csv / jsontable
--severity LEVEL最低严重级别:low / medium / highlow

使用场景

  • 安全审计:在代码上线前扫描历史中是否有密钥泄露
  • Code Review 优化:识别热点文件,优先 review 高风险区域
  • 团队协作:了解谁最熟悉哪部分代码,合理分配 review 任务
  • 技术债务评估:高频变更文件可能是重构候选

依赖

  • git(>= 2.20)
  • bash(>= 4.0)
  • 标准 Unix 工具:awksortheadgrep

无需安装任何额外依赖或付费 API。

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.