Git-Workspace-Audit

Audit a git repository's health by analyzing commit activity, contributors, hottest files, bug-fix hotspots, and reverts/hotfixes. Produces a Slack-formatted report copied to clipboard.

6 stars

Best use case

Git-Workspace-Audit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Audit a git repository's health by analyzing commit activity, contributors, hottest files, bug-fix hotspots, and reverts/hotfixes. Produces a Slack-formatted report copied to clipboard.

Teams using Git-Workspace-Audit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/git-workspace-audit/SKILL.md --create-dirs "https://raw.githubusercontent.com/tdhopper/dotfiles2.0/main/.claude/skills/git-workspace-audit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/git-workspace-audit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Git-Workspace-Audit Compares

Feature / AgentGit-Workspace-AuditStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Audit a git repository's health by analyzing commit activity, contributors, hottest files, bug-fix hotspots, and reverts/hotfixes. Produces a Slack-formatted report copied to clipboard.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Git Workspace Audit

Analyze a git repository using the commands from [5 Git Commands to Run Before Reading Code](https://piechowski.io/post/git-commands-before-reading-code/) and produce a concise Slack-formatted report.

## When to Use

- Getting oriented in a new or unfamiliar codebase
- Preparing a team status update or repo health check
- User says "audit this repo", "workspace audit", "repo health", "codebase report"

## Prerequisites

- Must be inside a git repository

## Procedure

Run all six data-gathering commands in parallel, then compose a single Slack mrkdwn report.

### 1. Gather Data (run in parallel)

**Hottest files** (most frequently changed in last year):
```bash
git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20
```

**All-time contributors** (top 15 by commit count):
```bash
git log --format='%aN' | sort | uniq -c | sort -rn | head -15
```

**Recent contributors** (top 15, last 6 months):
```bash
git log --since="6 months ago" --format='%aN' | sort | uniq -c | sort -rn | head -15
```

**Bug-fix hotspots** (files most often touched in fix/bug/broken commits):
```bash
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
```

**Commits per month** (full history):
```bash
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
```

**Reverts and hotfixes** (last year):
```bash
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'
```

Also gather these summary stats:
```bash
git log --oneline | wc -l                    # total commits
git log --format='%aN' | sort -u | wc -l     # unique contributors
git log --oneline --since="1 year ago" | wc -l  # commits last year
```

### 2. Compose Report

Build a Slack mrkdwn report with these sections:

- *Activity Overview* — total commits, unique contributors, commits last year, peak activity period
- *Recent Velocity* — commits per month for the last 6 months
- *Top Contributors* — top 5 from the last 6 months with commit counts
- *Hottest Files* — top 5 most-changed files in the last year
- *Bug-Fix Hotspots* — top 5 files from fix/bug/broken commits
- *Reverts & Hotfixes* — count and brief characterization of themes

Use Slack emoji prefixes for each section (:bar_chart:, :calendar:, :busts_in_silhouette:, :fire:, :bug:, :rotating_light:).

Include a methodology link at the bottom.

### 3. Copy to Clipboard

Pipe the final report to `pbcopy` (macOS) or `xclip -selection clipboard` (Linux).

Confirm to the user that the report has been copied.

## Output Format

The report should look like:

```
*<Repo Name> Repo Health Report* (<Month Year>)

:bar_chart: *Activity Overview*
...

:calendar: *Recent Velocity (Last 6 Months)*
...

:busts_in_silhouette: *Top Contributors (Last 6 Months)*
...

:fire: *Hottest Files (Most Changed, Last Year)*
...

:bug: *Bug-Fix Hotspots (All Time)*
...

:rotating_light: *Reverts & Hotfixes (Last Year)*
...

_Methodology: <https://piechowski.io/post/git-commands-before-reading-code/|5 git commands to run before reading code>_
```

## Arguments

- `--since=<duration>`: Override the "last year" window (e.g. `--since="6 months ago"`). Default: `1 year ago`.
- `--no-copy`: Print the report to stdout instead of copying to clipboard.

Related Skills

claude-settings-audit

6
from tdhopper/dotfiles2.0

Analyze a repository to generate recommended Claude Code settings.json permissions. Use when setting up a new project, auditing existing settings, or determining which read-only bash commands to allow. Detects tech stack, build tools, and monorepo structure.

auditing-claude-instructions

6
from tdhopper/dotfiles2.0

Use this skill when evaluating, auditing, reviewing, or optimizing CLAUDE.md files (or agents.md files) for effectiveness. Triggers on "review my CLAUDE.md", "optimize my claude instructions", "is my CLAUDE.md effective", "audit my claude config", or when users share their CLAUDE.md content for feedback. Evaluates files against a research-backed rubric covering minimality, tooling, codebase overviews, novelty, and authorship.

stop-slop

6
from tdhopper/dotfiles2.0

Use this skill when writing or editing prose to eliminate predictable AI writing patterns. Helps make writing more direct, authentic, and human.

sonos-control

6
from tdhopper/dotfiles2.0

Control Sonos speakers on Tim's home network. Use when the user wants to (1) play, pause, or stop music on Sonos speakers, (2) change volume on speakers, (3) skip tracks, (4) check what's playing, (5) see speaker status, (6) group or ungroup speakers, (7) any Sonos or music/audio playback task involving home speakers. Triggers on "sonos", "speakers", "play music", "what's playing", "volume", "turn up", "turn down", "pause music", "stop music".

slack-message

6
from tdhopper/dotfiles2.0

Draft and send Slack messages in Tim's natural voice. Use when the user wants to (1) post an update to a channel, (2) draft a Slack message, (3) share something on Slack, (4) send a DM, (5) reply in a thread. Applies Tim's Slack writing style and prose principles automatically.

skill-creator

6
from tdhopper/dotfiles2.0

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

sending-to-codex

6
from tdhopper/dotfiles2.0

Delegate tasks or ask questions to OpenAI's Codex CLI from within Claude Code. Use this skill when the user says "ask codex", "send to codex", "delegate to codex", "have codex do this", "get codex's opinion", "run this in codex", or wants to offload a coding task or question to the Codex agent. Supports both fire-and-forget coding tasks (fix bugs, add features, refactor) and research questions (analyze code, explain behavior, get a second opinion).

reviewing-writing

6
from tdhopper/dotfiles2.0

Review and critique writing using Michael Nielsen's principles on craft. Analyzes text for purpose focus, brevity, danger words, opening strength, originality, reader psychology, truthfulness, and title impact. Use when the user says "review my writing", "nielsen review", "writing review", "review this writing", "critique my writing", or asks for feedback on prose quality.

reviewing-code

6
from tdhopper/dotfiles2.0

Review pull requests, branch changes, or code diffs. Triggers on "review this PR", "review my changes", "code review", "review branch", or GitHub PR URLs. Focuses on bugs, tests, complexity, and performance - not linting.

resend-email

6
from tdhopper/dotfiles2.0

Send emails via Resend.com API. Use when the user wants to (1) send an email, (2) email someone, (3) send a message to an email address, (4) send email with attachments, (5) schedule an email for later. Requires RESEND_API_KEY environment variable.

refresh-dotfiles

6
from tdhopper/dotfiles2.0

Full sync of personal (yadm) and work (yadm-work) dotfiles. Pulls remote changes, commits and pushes local changes, and audits for untracked files that should be tracked. Use when the user says 'refresh yadm', 'sync dotfiles', 'dotfiles sync', or 'update dotfiles'.

omnifocus

6
from tdhopper/dotfiles2.0

Interact with OmniFocus task manager via the command-line interface (@stephendolan/omnifocus-cli). Use when the user wants to: (1) Add tasks or projects to OmniFocus, (2) List, view, or search tasks/projects, (3) Update or complete tasks, (4) Manage inbox items, (5) Work with tags and analyze tag usage, (6) Process or organize their OmniFocus database from the command line.