mcpField
R
repo-audit

repo-audit

github.com/zebbernTesting & quality4.7k41 installsUpdated 1d ago
Repository

About repo-audit

A command-line skill for analyzing Git history through hotspot detection, code ownership reports, and secret scanning. It is intended for repository maintainers and reviewers who need to assess change risk, contributor activity, and exposed credentials.

Key features

  1. 01Find frequently changed files
  2. 02Report contributor ownership and activity
  3. 03Scan Git history for secrets
  4. 04Filter by path, date, author, or branch
  5. 05Export results as table, CSV, or JSON

Use cases

  1. 01Prioritizing high-risk code reviews
  2. 02Finding files suited for refactoring
  3. 03Assigning reviewers by code expertise
  4. 04Checking repository history for leaked credentials

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zebbern/claude-code-guide --skill repo-audit

After installing, type/repo-auditin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE
scripts/
hotfiles.sh
ownership.sh
secret-scan.sh

Details

From the project README

Repo Audit — Deep Analysis of Git History

Perform three-dimensional analysis on a Git repository: hotspot file detection, code ownership analysis, and secret leak scanning.

Feature Overview

1. Hotspot File Analysis (scripts/hotfiles.sh)

Identify the most frequently changed files in a repository to help spot:

  • High-risk code areas (frequent changes = potential instability)
  • Files that deserve extra attention during code review
  • Modules that may need splitting or refactoring

Usage:

bash scripts/hotfiles.sh [options]
OptionDescriptionDefault
--repo PATHRepository pathCurrent directory
--top NShow top N files20
--since DATEStart date (e.g. 2024-01-01)None
--until DATEEnd dateNone
--author AUTHORFilter by authorNone
--format FORMATOutput format: table / csv / jsontable
2. Code Ownership Analysis (scripts/ownership.sh)

Analyze actual code ownership, reporting for each contributor within the specified scope:

  • Commit count and percentage
  • Lines changed (additions/deletions)
  • Last active date

Usage:

bash scripts/ownership.sh [options]
OptionDescriptionDefault
--repo PATHRepository pathCurrent directory
--path SUBPATHAnalyze a specific subdirectory or fileEntire repo
--top NShow top N contributors10
--since DATEStart dateNone
--format FORMATOutput format: table / csv / jsontable
3. Secret Leak Scanning (scripts/secret-scan.sh)

Scan the full Git history (including deleted commits) for common secrets and sensitive information:

  • AWS Access Key / Secret Key
  • GitHub / GitLab / Slack Tokens
  • SSH Private Keys
  • Generic API Keys, passwords, and secret patterns

Usage:

bash scripts/secret-scan.sh [options]
OptionDescriptionDefault
--repo PATHRepository pathCurrent directory
--branch BRANCHScan a specific branchAll branches
--since DATEStart dateNone
--format FORMATOutput format: table / csv / jsontable
--severity LEVELMinimum severity level: low / medium / highlow

Use Cases

  • Security audits: Scan history for leaked secrets before deploying to production
  • Code review optimization: Identify hotspot files and prioritize reviewing high-risk areas
  • Team collaboration: Understand who knows which parts of the code best, and assign reviews accordingly
  • Tech debt assessment: Frequently changed files are strong candidates for refactoring

Dependencies

  • git (>= 2.20)
  • bash (>= 4.0)
  • Standard Unix utilities: awk, sort, head, grep

No additional dependencies or paid APIs required.

Comments

Markdown supported