Skip to main content
skill CX Codex

repo-audit — Claude Code skill: what it does, how to install

Analyzes Git history to reveal frequently modified hotspot files, author ownership metrics, and leaked credentials across all commits.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add zebbern/claude-code-guide --skill repo-audit -a claude-code
Open on GitHub

What repo-audit does

The skill investigates Git repositories using three dedicated shell scripts. The scripts/hotfiles.sh script pinpoints heavily edited files, displaying the top 20 churn hotspots by default. This highlights fragile code sections and candidates for refactoring.

Ownership analysis runs via scripts/ownership.sh. It reports commit shares, added or removed lines, and last active dates per contributor for the entire project or a selected directory. To catch security risks, scripts/secret-scan.sh inspects commit history, including deleted revisions, looking for AWS keys, Slack tokens, SSH private keys, and passwords.

The toolkit relies on git 2.20 or newer, bash 4.0 or newer, and core Unix tools like awk, grep, sort, and head. It requires no third-party APIs. Without bash 4.0 in your environment, the scripts will fail to execute.

What it helps with

  • detect frequently edited files that create technical debt
  • identify primary code owners before assigning review tasks
  • scan commit history across all branches for leaked tokens and private keys
  • export Git contributor activity metrics to table, CSV, or JSON

Example prompts for the agent

  • Scan the Git history for leaked credentials and private keys
  • Show the top 20 most frequently changed files since 2024-01-01
  • Check code ownership and recent contributors for the src/api folder

How to install repo-audit

1Skills CLI (Vercel)

npx skills add zebbern/claude-code-guide --skill repo-audit -a claude-code

2Manually: put the files in place

~/.claude/skills/repo-audit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/repo-audit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about repo-audit

How do I install repo-audit in Claude Code?

Run npx skills add zebbern/claude-code-guide --skill repo-audit -a claude-code. You can also place the configuration file manually at ~/.claude/skills/repo-audit/SKILL.md.

What does repo-audit do?

It runs a three-part analysis on Git history: detecting hotspot files, calculating author contributions by lines and commits, and scanning revisions for exposed API keys and passwords.

What are the system requirements for repo-audit?

It requires git (>= 2.20), bash (>= 4.0), and standard Unix utilities such as awk, sort, head, and grep. No paid APIs or extra packages are needed.

Source text

SKILL.md · MIT
---
name: repo-audit
description: "Deep analysis of Git history: identify frequently changed hotspot files, analyze code ownership by contributor, and scan for leaked secrets. Triggered when users ask about Git analysis, code hotspots, who owns what code, secret scanning, security audits of commit history, or optimizing code review assignments."
type: tool
license: MIT
tags:
  - git
  - security
  - analysis
  - devops
---

# 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
bash scripts/hotfiles.sh [options]
```

| Option | Description | Default |
|--------|-------------|---------|
| `--repo PATH` | Repository path | Current directory |
| `--top N` | Show top N files | 20 |
| `--since DATE` | Start date (e.g. `2024-01-01`) | None |
| `--until DATE` | End date | None |
| `--author AUTHOR` | Filter by author | None |
| `--format FORMAT` | Output format: `table` / `csv` / `json` | table |

### 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
bash scripts/ownership.sh [options]
```

| Option | Description | Default |
|--------|-------------|---------|
| `--repo PATH` | Repository path | Current directory |
| `--path SUBPATH` | Analyze a specific subdirectory or file | Entire repo |
| `--top N` | Show top N contributors | 10 |
| `--since DATE` | Start date | None |
| `--format FORMAT` | Output format: `table` / `csv` / `json` | table |

### 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
bash scripts/secret-scan.sh [options]
```

| Option | Description | Default |
|--------|-------------|---------|
| `--repo PATH` | Repository path | Current directory |
| `--branch BRANCH` | Scan a specific branch | All branches |
| `--since DATE` | Start date | None |
| `--format FORMAT` | Output format: `table` / `csv` / `json` | table |
| `--severity LEVEL` | Minimum severity level: `low` / `medium` / `high` | low |

## 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.

© zebbern · MIT · zebbern/claude-code-guide

Similar skills

All skills for Git and GitHub →

From the same set40

secure-code-review This skill walks your code through all ten OWASP Top 10 categories and returns a report with vulnerable examples and working fixes. Useful before a release or when reviewing unfamiliar code. CX Codex +1 ★ 4,679repo stars scholarly-writing-refiner Refines academic English text paragraph by paragraph for journal submissions. It checks grammar, academic vocabulary, voice, and flow. CX Codex +1 ★ 4,679repo stars scanning-tools Guidance for choosing and using tools to inspect networks, web apps, and systems for security issues. Useful when planning a scan or preparing its report. CX Codex +1 ★ 4,679repo stars route-to-openapi Reads route definitions in your source tree and writes an OpenAPI 3.0.3 spec. Useful when an API needs docs and nobody wants to type them out. CX Codex +1 ★ 4,679repo stars regulatory-audit-generator Creates a compliance checklist for a business scenario, with relevant rules, risk ratings, and remediation steps. Use it to review a feature before launch. CX Codex +1 ★ 4,679repo stars regression-modeler Fits OLS or logistic regression on your table and explains the coefficients in plain language. Handy when you need significance checks without writing the stats code yourself. CX Codex +1 ★ 4,679repo stars r3f-animation Teaches the coding agent how to handle React Three Fiber animations, GLTF clip blending, and spring motion. CX Codex +1 ★ 4,679repo stars r2-upload Uploads files to Cloudflare R2, AWS S3, and compatible storage, then returns a temporary download link. Use it when a file needs to be shared with an expiration time. CX Codex +1 ★ 4,679repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor