Repo Metrics — Git skill for Claude Code
Claude Code skill: code-metrics dashboard for any git repo (branches, merged PRs, development span, contributors, LOC).
How to install Repo Metrics
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mdsami/repo-metrics and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Repo Metrics does
Claude Code skill: code-metrics dashboard for any git repo (branches, merged PRs, development span, contributors, LOC).
Alternatives in Git
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Worktree Parallel Init — Create multiple git worktrees for parallel development: $ARGUMENTS 23.4k ★
- Create Worktrees — by evmts - Creates git worktrees for all open PRs or specific branches, handling branches with slashes, cleani 440 ★
README
repo-metrics
A Claude Code skill that builds a code-metrics dashboard for any git repository:
- Development span: the first and last commit, active days, and commits per month
- Branches: every remote branch, with its merge status and the lines changed since it split from its trunk
- Pull requests: merged and closed counts, plus breakdowns by author and by target branch (via
gh) - Contributors: commits, lines added and deleted, and active dates per person, with identity merging. AI assistants and bots are left out of the head count.
- Lines of code by file type for each trunk
Lockfiles, build output, source maps, images and fonts are left out of every line count.
Install
Anyone can install it in Claude Code with:
/plugin install repo-metrics --marketplace mdsami/repo-metrics
On older versions of Claude Code (before 2.1.275), add the marketplace first:
/plugin marketplace add mdsami/repo-metrics
/plugin install repo-metrics@mdsami-skills
Restart Claude Code if the skill doesn't appear straight away. To get later versions, run `/plugin marketplace update mdsami-skills`. To remove it, run `/plugin uninstall repo-metrics@mdsami-skills`.
Usage
Open Claude Code inside the git repository you want to measure, then either type the command:
/repo-metrics
or ask in your own words, for example:
- "Lines of code metrics for all branches and merged PRs, development span, contributor report"
- "Who contributed most to this repo, and over what period?"
- "How many branches are still unmerged, and how big are they?"
Claude then:
- Fetches every remote branch (
git fetch --all --prune). - Finds the trunks: the default branch, plus any long-lived branch that most PRs target.
- Runs
collect.py, then merges author names that share an email address into one person. It keeps people separate when u
Related Skills
Polydev
Polydev is an agent orchestration toolkit for running parallel development work with Git worktrees and termina
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr
Git.Merge
Merge the current branch's PR, switch to the default branch, and clean up all merged/gone local and remote bra
Clean Branches
Safely prune merged and stale Git branches: drop dead remote-tracking refs, list merged candidates for review,
Prune Stale Branches And Worktrees
Prune stale git branches (merged, abandoned, or older than 30 days with no open PR) and stale git worktrees. S
Clean Repos
Scan every repo under ~/git/ for branches already merged into trunk (or develop under Gitflow) and worktrees p
Related Agents
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Hatch3r Fixer
Targeted fix agent that takes structured reviewer output and implements fixes for Critical and Warning finding
Coppers
Git agent for commits, branches, and PRs/MRs on GitHub and GitLab. Smart commit messages, risk-tiered confirma