git-repo-audit

git-repo-audit is a skill for Claude Code, Codex from serejaris/kimi-skills. It costs 94 tokens per session (959 once invoked), scanned A, original, MIT.

A set of scripts for examining a Git repository's history. It finds files that change often, shows who has worked on different parts of the code, and searches past commits for leaked secrets.

In plain words
What is it for?
Use it to focus code reviews, plan refactoring, understand team contributions, investigate technical debt, and scan repository history for keys, tokens, passwords, and private keys.
Why use it?
It helps reveal unstable areas, unclear code ownership, and credentials that may remain exposed in old commits, even after the files were deleted.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to focus code reviews, plan refactoring, understand team contributions, investigate technical debt, and scan repository history for keys, tokens, passwords, and private keys.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/kimi-skills/git-repo-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serejaris/kimi-skills --skill git-repo-audit
Clone the repo
git clone --depth 1 https://github.com/serejaris/kimi-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-repo-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/serejaris/kimi-skills/git-repo-audit/github.svg)](https://agentmods.dev/skills/serejaris/kimi-skills/git-repo-audit)
Your own site
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/git-repo-audit"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/git-repo-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-repo-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/git-repo-audit"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/git-repo-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00094 $0.00959
Opus 5 $0.00047 $0.00479
Sonnet 5 $0.00019 $0.00192
Haiku 4.5 $0.00009 $0.00096

Measured 9d ago against content hash 558bbc7fbfe3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

git-repo-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/hotfiles.sh, scripts/ownership.sh, scripts/secret-scan.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/git-repo-audit/SKILL.md · 95 lines

What it actually says

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 / json table

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

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

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

用法:

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

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 / json table
--severity LEVEL 最低严重级别:low / medium / high low

使用场景

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

依赖

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

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

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 95 lines · 94 tokens per session scan A 558bbc7fbfe3

Subscribe to this mod's changes

git-repo-audit is a skill published in the GitHub repository serejaris/kimi-skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 94 tokens to every session and 959 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

resolve-pr-comments

Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…

tobihagemann/turbo · 95 tokens

create-pr

Create a GitHub pull request with a drafted title and description. Use when the user asks to "create a PR", "create a pull request", "open a PR", or "submit a PR".

tobihagemann/turbo · 44 tokens

update-pr

Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".

tobihagemann/turbo · 56 tokens

changelog-rules

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

tobihagemann/turbo · 29 tokens

fetch-pr-comments

Fetch and summarize review feedback and conversation from a GitHub PR (unresolved review threads, review bodies, and PR conversation comments) without making changes. Use when the user asks to "fetch PR comments", "show PR comments", "check PR for unresolved comments", "list review comments", "what comments are on the…

tobihagemann/turbo · 83 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens