Agent skill

Git Archaeology

by prime-radiant-inc in prime-radiant-inc/greenfield

Layer 1 skill for mining git history for behavioral intelligence.

Apache-2.0Auto-check passedDevelopment

Install Git Archaeology

skills CLI
$ npx skills add prime-radiant-inc/greenfield --skill git-archaeology -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install prime-radiant-inc/greenfield git-archaeology --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/prime-radiant-inc/greenfield.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/git-archaeology .claude/skills/git-archaeology && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-archaeology
GitHub stars
292
Token cost
~3.1k tokens
SKILL.md length
1,018 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Layer 1 skill for mining git history for behavioral intelligence.

  • Works in 5 steps: Repository Overview → Commit Message Mining → PR/MR Description Mining → …
  • Tasks that involve Git workflow
  • SKILL.md covers When to Use This Mode, Why Git History Matters, Phase 1: Repository Overview and Phase 2: Commit Message Mining, plus 4 more sections
  • Calls git, gh and glab

What it does

Git Archaeology is an agent skill from prime-radiant-inc/greenfield. Layer 1 skill for mining git history for behavioral intelligence. Repository overview, commit message mining, PR/MR description extraction, blame-based maintenance heat maps, issue tracker cross-referencing. Loaded by the analyzer agent during Layer 1.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow, Commit messages and Issue triage. It works with Git. The repository describes itself as: A Claude Code plugin that reverse-engineers clean behavioral specs, test vectors, and acceptance criteria from any codebase, producing a provenance trail so a fresh team can… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Git workflow
  • Tasks that involve Commit messages
  • Tasks that involve Issue triage

Example prompts

  • “/git-archaeology”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Repository Overview
  2. Commit Message Mining
  3. PR/MR Description Mining
  4. Blame-Based Maintenance Heat Map
  5. Issue Tracker Cross-Reference

What it can do on your machine

Read from SKILL.md and the folder at commit 6e6d4b4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • glab

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, gh and glab, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Archaeology loads about 3.1k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 1,018 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from prime-radiant-inc/greenfield at commit 6e6d4b4, republished under its Apache-2.0 licence (© prime-radiant-inc). 1,018 words, ~3,133 tokens.

Download SKILL.mdSave it as .claude/skills/git-archaeology/SKILL.md (or your agent's skills folder).
name
git-archaeology
description
Layer 1 skill for mining git history for behavioral intelligence. Repository overview, commit message mining, PR/MR description extraction, blame-based maintenance heat maps, issue tracker cross-referencing. Loaded by the analyzer agent during Layer 1.

Git Archaeology Methodology

Extract behavioral intelligence from version control history. Commit messages, PR descriptions, blame annotations, and issue references encode design decisions, behavioral changes, and maintenance patterns that no other source captures.

When to Use This Mode

Git archaeology activates when:

  • The target is a git repository (or has a .git directory)
  • The discovery inventory identifies a git repository with meaningful commit history
  • Other modes discover a git repository during analysis

This mode runs independently of all other intelligence sources. It requires only access to the git repository and optionally to a GitHub/GitLab remote. All output is RAW (commit messages and PR descriptions may reference proprietary internals).

Why Git History Matters

Source code tells you what the system does NOW. Git history tells you:

  • What changed and why -- commit messages encode intent that is invisible in the current code
  • What broke and how it was fixed -- fix commits reveal failure modes and edge cases
  • What was deliberately removed -- reverted features and deleted code reveal abandoned behaviors
  • Where maintenance concentrates -- frequently modified files signal complexity and instability
  • What decisions were debated -- PR descriptions capture design trade-offs that never appear in documentation

Phase 1: Repository Overview

Goal: Establish the scope, age, and shape of the project.

bash
# Commit count and date range
echo "Total commits: $(git rev-list --count HEAD)"
echo "First commit: $(git log --reverse --format='%ai' | head -1)"
echo "Latest commit: $(git log -1 --format='%ai')"

# Contributors
git shortlog -sn --no-merges | head -20

# Active branches
git branch -r --sort=-committerdate | head -20

# Tags (releases)
git tag --sort=-version:refname | head -20

# Commit frequency (commits per month, last 12 months)
for i in $(seq 0 11); do
  month=$(date -d "$i months ago" +%Y-%m 2>/dev/null || date -v-${i}m +%Y-%m)
  count=$(git rev-list --count --after="${month}-01" --before="${month}-31" HEAD 2>/dev/null || echo "0")
  echo "$month: $count"
done

# Top-level directory structure at HEAD
git ls-tree --name-only HEAD

Write to workspace/raw/project-history/overview.md.

Phase 2: Commit Message Mining

Goal: Extract behavioral claims from commit messages. Commit messages that describe features, fixes, and breaking changes encode behavioral contracts.

2.1 Feature Commits
bash
# Conventional commits: feat
git log --oneline --grep="^feat" --no-merges | head -100

# Keywords indicating new behavior
git log --oneline --grep="add\|implement\|introduce\|support\|enable" -i --no-merges | head -100

For each feature commit, extract:

  • What behavior was added (the claim)
  • When it was added (the commit date, for version context)
  • The commit SHA (for provenance)
2.2 Fix Commits
bash
# Conventional commits: fix
git log --oneline --grep="^fix" --no-merges | head -100

# Keywords indicating bug fixes
git log --oneline --grep="fix\|bug\|repair\|correct\|resolve\|patch" -i --no-merges | head -100

Fix commits are especially valuable because they reveal:

  • A behavior that was WRONG (the bug)
  • A behavior that is now CORRECT (the fix)
  • Edge cases that the original implementation missed
2.3 Breaking Change Commits
bash
# Conventional commits: breaking
git log --oneline --grep="BREAKING" --no-merges | head -50

# Keywords indicating behavioral changes
git log --oneline --grep="breaking\|deprecat\|remov\|migration\|upgrade" -i --no-merges | head -50

Breaking changes reveal behavioral contracts that were considered important enough to announce their violation.

2.4 Detailed Message Extraction

For high-value commits (features, fixes, breaking changes), read the full commit message:

bash
# Full message for a specific commit
git log -1 --format='%H%n%ai%n%an%n%n%B' <commit-sha>

Extract behavioral claims from the message body. Many commit messages contain:

  • Before/after descriptions -- explicit behavioral contract changes
  • Issue references -- links to detailed context
  • Test descriptions -- what was verified
  • Migration instructions -- how behavior shifted

Write to workspace/raw/project-history/behavioral-claims.md.

Provenance for Commit-Derived Claims
markdown
- The `--output csv` flag was added in v2.3
  <!-- cite: source=git-history, ref=abc1234, confidence=inferred, agent=git-archaeologist -->

Phase 3: PR/MR Description Mining

Goal: Extract behavioral intelligence from pull request and merge request descriptions. PR descriptions often contain the richest behavioral context: motivation, design decisions, testing notes, and review discussions.

3.1 GitHub PRs
bash
# List merged PRs (most recent first)
gh pr list --state merged --limit 100 --json number,title,body,mergedAt,labels

# View a specific PR with full body and comments
gh pr view <number> --json title,body,comments,reviews,labels,mergedAt

# Search PRs by keyword
gh pr list --state merged --search "authentication" --limit 20 --json number,title,body
3.2 GitLab MRs

If the remote is GitLab rather than GitHub:

bash
# List merged MRs
glab mr list --state merged --per-page 100

# View a specific MR
glab mr view <number>
3.3 What to Extract from PRs/MRs

For each PR/MR, extract:

  • Motivation -- why was this change made? What problem does it solve?
  • Design decisions -- what alternatives were considered? Why was this approach chosen?
  • Testing notes -- what was tested? How was it verified?
  • Review comments -- what concerns were raised? What was changed in response?
  • Behavioral claims -- explicit statements about what the code does or should do

PR descriptions that contain phrases like "this PR adds", "this fixes", "after this change", "the new behavior is" are direct behavioral claims.

3.4 Availability Check

Not all repositories have accessible PR history. Check first:

bash
# GitHub: check if gh CLI is authenticated and repo is accessible
gh repo view --json name 2>/dev/null && echo "GitHub accessible" || echo "GitHub not accessible"

# Check if remote is GitHub or GitLab
git remote get-url origin

If PR history is not accessible, document the gap and move on. Do not treat inaccessibility as failure.

Phase 4: Blame-Based Maintenance Heat Map

Goal: Identify which parts of the codebase are actively maintained, recently modified, or fossilized. Maintenance patterns reveal where behavioral complexity concentrates.

4.1 Recently Modified Files
bash
# Files modified in the last 90 days, sorted by modification count
git log --since="90 days ago" --name-only --no-merges --format="" | sort | uniq -c | sort -rn | head -50
4.2 Most Frequently Modified Files (All Time)
bash
# Files with the most commits
git log --name-only --no-merges --format="" | sort | uniq -c | sort -rn | head -50
4.3 Fossilized Code
bash
# Files not modified in over a year
git log --diff-filter=M --since="1 year ago" --name-only --no-merges --format="" | sort -u > /tmp/recently-modified.txt
git ls-files | while read f; do
  grep -qx "$f" /tmp/recently-modified.txt || echo "$f"
done | head -100
4.4 Churn Analysis
bash
# Files with the highest churn (lines added + removed) in last 6 months
git log --since="6 months ago" --numstat --no-merges --format="" | \
  awk '{adds[$3]+=$1; dels[$3]+=$2} END {for(f in adds) print adds[f]+dels[f], adds[f], dels[f], f}' | \
  sort -rn | head -30
4.5 Interpreting the Heat Map
PatternSignal
High recent churn, many contributorsActive development, likely unstable behavior
High recent churn, single contributorFocused refactoring or feature work
No modifications in 1+ yearFossilized: either stable or abandoned
Frequent modifications to test filesBehavioral contracts actively evolving
Config files frequently modifiedDeployment or environment complexity

Write to workspace/raw/project-history/maintenance-heatmap.md.

Show full SKILL.md (389 more words)Show less

Phase 5: Issue Tracker Cross-Reference

Goal: Extract issue references from commits and fetch the referenced issues for behavioral context.

5.1 Extract Issue References
bash
# Find commits that reference issues (common patterns: #123, GH-123, JIRA-123)
git log --oneline --no-merges --format="%H %s" | grep -oE '#[0-9]+|[A-Z]+-[0-9]+' | sort | uniq -c | sort -rn | head -50

# Full commit messages that reference issues
git log --no-merges --grep='#[0-9]\+' --format="%H %ai %s" | head -50
5.2 Fetch Referenced Issues (GitHub)
bash
# Fetch a specific issue
gh issue view <number> --json title,body,comments,labels,state

# List issues with behavioral labels
gh issue list --label "bug" --state all --limit 50 --json number,title,body,state
gh issue list --label "enhancement" --state all --limit 50 --json number,title,body,state
5.3 What to Extract from Issues

Issues provide behavioral context that commits alone cannot:

  • Bug reports -- describe expected vs. actual behavior (behavioral contract violations)
  • Feature requests -- describe desired behavior (behavioral requirements)
  • Discussion threads -- capture design decisions and trade-offs
  • Reproduction steps -- equivalent to test vectors
5.4 Availability Check

Issue tracker access depends on the hosting platform and repository visibility. If the issue tracker is not accessible, document the gap. Extract what you can from commit message references alone.

Write to workspace/raw/project-history/issue-references.md.

Provenance Rules

Source Type

All claims from git history analysis use source=git-history:

markdown
- The retry logic was added after users reported timeout failures on slow connections
  <!-- cite: source=git-history, ref=abc1234, confidence=inferred, agent=git-archaeologist -->
Confidence Levels
  • confirmed -- the commit message or PR description explicitly states the behavioral claim, AND a second source (e.g., a linked issue or test change) corroborates it
  • inferred -- the commit message or PR description directly states or strongly implies the behavioral claim from a single source
  • assumed -- the behavioral claim is derived from commit patterns, file names, or structural reasoning rather than explicit statements
Cite As You Go

Every behavioral claim gets an inline citation immediately after the claim. The ref field should be the commit SHA (short form is acceptable). For PR-derived claims, use ref=PR-<number>.

Output Structure

workspace/raw/project-history/
    overview.md                # Repository overview: age, size, contributors, structure
    behavioral-claims.md       # Behavioral claims extracted from commit messages
    maintenance-heatmap.md     # File modification patterns and churn analysis
    issue-references.md        # Issue cross-references and extracted behavioral context

Rules

  1. Git history is RAW -- commit messages and PR descriptions may contain proprietary information. All output goes to workspace/raw/.
  2. Recency matters -- recent commits are more likely to describe current behavior. Flag the date of every commit-derived claim.
  3. Commit messages are claims, not facts -- a commit that says "fix authentication bug" does not prove the fix is correct. It is an inferred claim until corroborated by another source.
  4. Absence of history is not absence of behavior -- a feature with no commit history may predate the repository or have been imported wholesale.
  5. Do not read source code diffs -- this is git ARCHAEOLOGY, not source analysis. Extract behavioral claims from messages, descriptions, and patterns. Source code analysis is a separate mode.
  6. Document what is inaccessible -- if PR history, issue trackers, or remote repositories are not reachable, document the gap explicitly. Partial results are valuable.
  7. Cite as you go -- every behavioral claim gets an inline <!-- cite: --> comment immediately after the claim. Never defer citation to a later step.

© prime-radiant-inc, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/git-archaeology of prime-radiant-inc/greenfield.

Open the folder on GitHubat commit 6e6d4b4

Compare with similar skills

Git Archaeology next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Archaeology compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Archaeology this skillprime-radiant-inc/greenfield292—~3.1kAutomated safety check: PassApache-2.0
ToolJet Multi-Repo CommitToolJet/ToolJet41k—~1.3kAutomated safety check: PassAGPL-3.0
Git Workflow and Versioningaddyosmani/agent-skills105k2 repos~3.5kAutomated safety check: NotesMIT
React Router Pull Request Creatorremix-run/react-router57k—~2.5kAutomated safety check: PassMIT
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Emoji Commit ConventionsbaptisteArno/typebot.io11k—~424Automated safety check: PassCustom licence

Similar skills

  • Commits changes across ToolJet's root repo and its server/ee and frontend/ee submodules, writing messages from the diffs and updating submodule pointers in order.

    41k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git Workflow and Versioning

    addyosmani/agent-skills

    Sets git habits for every change: short-lived branches, atomic commits with descriptive messages, clean pull requests, plus versioning, tagging and changelogs for releases.

    105k GitHub starsUsed in 2 repos~3.5k tokens
    DevelopmentAuto-check: notes
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Emoji Commit Conventions

    baptisteArno/typebot.io

    Sets the repository's convention for commit messages and pull request titles: one emoji prefix for the main intent, a concise title and clean follow-up commits.

    11k GitHub stars~424 tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Draft Pull Request Creator

    wordpress-mobile/WordPress-Android

    Commits and pushes current changes, writes a pull request title and body from the branch history and template, and opens a draft PR on GitHub after you approve it.

    3.2k GitHub stars~881 tokensUpdated yesterday
    DevelopmentAuto-check: notes

More from prime-radiant-inc/greenfield

All 21 skills in this repo
  • Reverse Engineering Analysis Pipeline

    prime-radiant-inc/greenfield

    Master methodology for reverse-engineering a codebase into behavioral specs with cited evidence, reading every line across source, binaries, docs, runtime and git history.

    292 GitHub stars~3.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Community Intelligence Research

    prime-radiant-inc/greenfield

    Mines tutorials, forums, reviews, issues and changelogs for observed product behavior, using six search channels and consensus analysis.

    292 GitHub stars~4.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Containerized Target Execution

    prime-radiant-inc/greenfield

    Runs untrusted analysis targets inside Docker or Podman containers with memory, CPU and process limits, covering image builds, lifecycle, command execution and cleanup.

    292 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed
  • API Contract Detection

    prime-radiant-inc/greenfield

    Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.

    292 GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Documentation Research Methodology

    prime-radiant-inc/greenfield

    Method for extracting behavioral specifications from a product's public documentation: tiered search order, claim extraction rules, output structure, stop criteria and gap analysis.

    292 GitHub stars~4.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Ecosystem Analysis

    prime-radiant-inc/greenfield

    Layer 1 skill for SDK and ecosystem analysis. An agent skill from prime-radiant-inc/greenfield.

    292 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Git Archaeology

What does Git Archaeology do?

Layer 1 skill for mining git history for behavioral intelligence. Git Archaeology is an agent skill from prime-radiant-inc/greenfield. Layer 1 skill for mining git history for behavioral intelligence.

When should I use Git Archaeology?

Git Archaeology fits situations like: tasks that involve Git workflow; tasks that involve Commit messages; tasks that involve Issue triage.

How do I install Git Archaeology in Claude Code?

Run `npx skills add prime-radiant-inc/greenfield --skill git-archaeology -a claude-code`. Or copy the skill folder (skills/git-archaeology in prime-radiant-inc/greenfield) into .claude/skills/git-archaeology in your project. Claude Code loads it when a task matches its description.

How do I install Git Archaeology in Codex?

Run `npx skills add prime-radiant-inc/greenfield --skill git-archaeology -a codex`. Or copy the skill folder (skills/git-archaeology in prime-radiant-inc/greenfield) into .agents/skills/git-archaeology in your project. Codex loads it when a task matches its description.

Can I use Git Archaeology in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add prime-radiant-inc/greenfield --skill git-archaeology -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-archaeology, .gemini/skills/git-archaeology, .github/skills/git-archaeology and .opencode/skills/git-archaeology in your project.

What does Git Archaeology need to run?

Going by SKILL.md and its folder, Git Archaeology needs the command-line tools its instructions call (git, gh and glab).

Does Git Archaeology access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Archaeology safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Archaeology use?

Git Archaeology is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Archaeology use?

About 3.1k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Archaeology?

Skills that share tags, products or a category with Git Archaeology: ToolJet Multi-Repo Commit (ToolJet/ToolJet, 41k stars), Git Workflow and Versioning (addyosmani/agent-skills, 105k stars), React Router Pull Request Creator (remix-run/react-router, 57k stars) and Saleor Commit Workflow (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Archaeology?

prime-radiant-inc (a GitHub organization) maintains it in prime-radiant-inc/greenfield, which has 292 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on August 6, 2026.

Source: prime-radiant-inc/greenfield on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.