git-ai-archaeology
Analyze AI config evolution in a git repo — first commits per path, monthly distribution, major PRs, maturity phases
Best use case
git-ai-archaeology is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Analyze AI config evolution in a git repo — first commits per path, monthly distribution, major PRs, maturity phases
Teams using git-ai-archaeology 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/git-ai-archaeology/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How git-ai-archaeology Compares
| Feature / Agent | git-ai-archaeology | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Analyze AI config evolution in a git repo — first commits per path, monthly distribution, major PRs, maturity phases
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.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# git-ai-archaeology
Produces a complete analysis of AI config evolution in a git repository. Finds when each AI configuration file was created, how AI-config commit velocity evolved month by month, which PRs structured the evolution, and identifies maturity phases.
**Output**: a single file `{output_dir}/{slug}-git-archaeology.md`
## Expected Input
```
/git-ai-archaeology repo_path=/path/to/repo [output=./talks/slug] [slug=talk-name] [since=2025-01-01]
```
- `repo_path`: absolute path to the target git repo (required)
- `output`: output directory (default: `./talks`)
- `slug`: output filename (default: repo folder name)
- `since`: analysis start date (default: first repo commit)
## Workflow
1. **Verify the repo**: ensure the path exists and is a git repo
2. **Global metrics**: total commits, releases, contributors, time period
3. **Section 1 — First commits**: find creation date for key AI-config paths
4. **Section 2 — Monthly distribution**: commits filtered by AI-config keywords
5. **Section 3 — Major PRs**: extract and categorize significant AI-config commits
6. **Section 4 — CHANGELOG**: if CHANGELOG.md exists, extract releases with AI mentions
7. **Section 5 — Phases**: synthesize evolution phases
8. **Save** the output file
---
## Step 1: Verification and Global Metrics
```bash
# Verify it's a git repo
git -C {repo_path} rev-parse --git-dir
# Global metrics
git -C {repo_path} log --oneline | wc -l # total commits
git -C {repo_path} tag --sort=version:refname | wc -l # total releases
git -C {repo_path} shortlog -sn --no-merges | wc -l # contributors
git -C {repo_path} log --pretty=format:"%ad" --date=short | tail -1 # first commit
git -C {repo_path} log --pretty=format:"%ad" --date=short | head -1 # last commit
git -C {repo_path} log --merges --oneline | wc -l # merged PRs
```
---
## Step 2: Section 1 — First Commits per AI-Config Path
For each path, find the origin commit with `--diff-filter=A`:
```bash
# Paths to analyze — adapt based on what exists in the repo
PATHS=(
"CLAUDE.md"
".claude"
".claude/commands"
".claude/agents"
".claude/hooks"
".claude/skills"
".claude/rules"
".agents"
".cursor"
"doc/knowledge-base.md"
"doc/guides/ai-instructions"
"doc/guides/ai-review"
)
for path in "${PATHS[@]}"; do
git -C {repo_path} log --diff-filter=A --follow \
--format="%ad | %H | %s" --date=short \
-- "$path" | tail -1
done
```
Build the Section 1 table from results. Skip paths with no output (don't exist in this repo).
Also build the ASCII timeline:
```
{date} ─── {path} ─── {message}
```
Sorted chronologically.
---
## Step 3: Section 2 — Monthly Distribution of AI-Config Commits
Filter commits by AI-config-related keywords:
```bash
# All commits with AI-config keywords
git -C {repo_path} log --format="%H %s" | \
grep -iE "(claude|feat.ai|docs.ai|tech.ai|mcp|skill|hook|agent|llm|prompt)" \
> /tmp/ai_commits_filtered.txt
# Count AI-config commits per month
git -C {repo_path} log --format="%ad %H" --date=format:"%Y-%m" | \
while read month hash; do
if grep -q "$hash" /tmp/ai_commits_filtered.txt; then
echo "$month"
fi
done | sort | uniq -c
```
More direct alternative:
```bash
git -C {repo_path} log --format="%ad %s" --date=format:"%Y-%m" | \
grep -iE " (feat|fix|docs|tech|chore|refactor)\(ai\)|claude|mcp.*server|\.claude/|skill|hook.*security|guardrail" | \
awk '{print $1}' | sort | uniq -c
```
Compute per month:
- AI-config commit count
- % of monthly total (cross-reference with all-category monthly total)
- Context (if notable period)
Build ASCII distribution chart (horizontal or vertical bars).
---
## Step 4: Section 3 — Major PRs and Commits
### 3.1 — feat(ai): / docs(ai): / tech(ai): commits
```bash
git -C {repo_path} log --format="%ad | %H | %s" --date=short | \
grep -iE "\(ai\)|\(mcp\)|\[ai\]"
```
### 3.2 — MCP Server integrations
```bash
git -C {repo_path} log --format="%ad | %H | %s" --date=short | \
grep -iE "mcp|serena|grepai|perplexity|sonar|postgres.*mcp|cursor.*mcp"
```
### 3.3 — Skills, commands, hooks, agents
```bash
git -C {repo_path} log --format="%ad | %H | %s" --date=short | \
grep -iE "feat\(skill|feat\(hook|feat\(agent|feat\(command|feat\(dx\)|feat\(ci\)" | \
grep -v "^$"
```
### 3.4 — Code review automation
```bash
git -C {repo_path} log --format="%ad | %H | %s" --date=short | \
grep -iE "review|code-review|pr.*auto|ci.*review"
```
---
## Step 5: Section 4 — CHANGELOG Analysis (if available)
```bash
# Check if CHANGELOG.md exists
ls {repo_path}/CHANGELOG.md
# Extract releases with AI mentions
grep -n "## \[" {repo_path}/CHANGELOG.md | head -30
```
Read the CHANGELOG and build a table:
| Release | Date | AI-Related Content |
|---------|------|-------------------|
Only list releases with AI-config content (CLAUDE.md, MCP, agents, skills, hooks, guardrails, prompts, etc.).
---
## Step 6: Section 5 — Evolution Phases
Analyze collected data and identify maturity phases. Typical pattern:
| Phase | Characteristics | Commits | Label |
|-------|-----------------|---------|-------|
| **Phase 1** | Basic config, solo usage, no structure | Low | "Config as Afterthought" |
| **Phase 2** | Documentation, knowledge base, first MCP | Growing | "Config as Documentation" |
| **Phase 3** | Infrastructure: skills/hooks/rules/MCP stack | Spike | "Config as Infrastructure" |
| **Phase 4** | Engineering: tests, CI, guardrails, modules | Dense | "Config as Engineering Practice" |
Adapt phases to what the data actually reveals.
Identify the **main inflection point**: the month where AI-config commit volume spiked.
Compute the "recent vs historical" ratio (e.g., "81% of AI-config commits in the last 2 months").
---
## Output Format: {slug}-git-archaeology.md
```markdown
# Git Archaeology — AI Config Evolution: {slug}
**Source**: Git history of repo `{repo_path}` ({total_commits}+ commits, {total_releases}+ releases)
**Method**: `git log --diff-filter=A` for first commits, filtered monthly distribution, major PRs
**Last updated**: {date}
---
## Section 1: First Commit per Key Path
| Path | Creation Date | Commit Message | Hash |
|------|--------------|----------------|------|
{rows}
### Creation Timeline
\```
{ascii_timeline}
\```
---
## Section 2: Monthly Distribution of AI-Config Commits
| Month | AI-Config Commits | % of Total | Context |
|-------|-------------------|-----------|---------|
{rows}
### Visualization
\```
{ascii_chart}
\```
**Inflection**: {insight on the commit spike}
---
## Section 3: Major PRs and Commits Related to AI Tooling
### 3.1 PRs `feat(ai):` / `tech(ai):` / `docs(ai):`
| Date | Hash | Message | Impact |
|------|------|---------|--------|
{rows}
### 3.2 MCP Server Integrations (chronological)
| Date | MCP Server | Hash / PR | Role |
|------|------------|-----------|------|
{rows}
### 3.3 Skills, Commands, Hooks, Agents
| Date | Hash | Message | Category |
|------|------|---------|----------|
{rows}
### 3.4 Code Review Automation
| Date | Hash | Message |
|------|------|---------|
{rows}
---
## Section 4: CHANGELOG AI Mentions by Release
{section if CHANGELOG available, otherwise "Not applicable"}
---
## Section 5: Evolution Phases
### Evidence-Based Timeline
| Milestone | Exact Git Date | Git Evidence |
|-----------|----------------|-------------|
{rows}
### {N} Evolution Phases
#### Phase 1: {Label} ({period}) — {n} commits
{description}
#### Phase 2: {Label} ({period}) — {n} commits
{description}
#### Phase 3: {Label} ({period}) — {n} commits
{description}
#### Phase 4: {Label} ({period}) — {n} commits
{description}
### Key Insight
{Summary paragraph: main inflection point, recent/historical ratio, what the data reveals about the project's AI maturity.}
---
*Generated by git-ai-archaeology — {date}*
*Repo: {repo_path} | {total_commits} commits | {total_releases} releases*
```
---
## Important Rules
- **Read-only**: no git commands that modify repo state
- **Verify before asserting**: a date not found in git = note "unverified"
- **Adapt paths**: Section 1 paths must be filtered to what actually exists in this repo
- **Extensible keywords**: if the repo uses different conventions (e.g., `feat[ai]` vs `feat(ai)`), adapt grep patterns
- **Section 4 optional**: if no CHANGELOG.md or no AI mentions, note "Not applicable" and skip to Section 5
- **Adaptive phases**: 4 phases is a common pattern, not a rule — 2 phases or 6 phases are equally valid
## Anti-Patterns
- Inventing data not found in git
- Rounding numbers without flagging it
- Analyzing paths that don't exist in this repo
- Confusing a rename commit with a creation
- Omitting "flat" months (0 AI-config commits also tells a story)
## Validation Checklist
- [ ] Repo verified and readable
- [ ] Section 1: only paths that exist in this repo
- [ ] Section 2: distribution covers the full repo period
- [ ] Section 3: commits sorted chronologically, hash included
- [ ] Section 4: cleanly skipped if no CHANGELOG
- [ ] Section 5: phases based on data, not the template
- [ ] Output file savedRelated Skills
token-audit
Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan
voice-refine
Transform verbose voice input into structured, token-efficient Claude prompts. Use when cleaning up voice memos, dictation output, or speech-to-text transcriptions that contain filler words, repetitions, and unstructured thoughts.
talk-stage6-revision
Produces revision sheets with quick navigation by act, a master concept-to-URL table, Q&A cheat-sheet with 6-10 anticipated questions, glossary, and external resources list. Use when preparing for a talk with Q&A, creating shareable reference material for attendees, or building a safety-net glossary for live delivery.
talk-stage5-script
Produces a complete 5-act pitch with speaker notes, a slide-by-slide specification, and a ready-to-paste Kimi prompt for AI slide generation. Requires validated angle and title from Stage 4. Use when you have a confirmed talk angle and need the full script, slide spec, and AI-generated presentation prompt.
talk-stage4-position
Generates 3-4 strategic talk angles with strength/weakness analysis, title options, CFP descriptions, and a peer feedback draft, then enforces a mandatory CHECKPOINT for user confirmation before scripting. Use when deciding how to frame a talk, preparing a CFP submission, or choosing between multiple narrative angles.
talk-stage3-concepts
Builds a numbered, categorized concept catalogue from the talk summary and timeline, scoring each concept HIGH / MEDIUM / LOW for talk potential with optional repo enrichment. Use when you need a structured inventory of concepts before choosing a talk angle, or when assessing which ideas have the strongest presentation potential.
talk-stage2-research
Performs git archaeology, changelog analysis, and builds a verified factual timeline by cross-referencing git history with source material. REX mode only — skipped automatically in Concept mode. Use when building a REX talk and you need verified commit metrics, release timelines, and contributor data from a git repository.
talk-stage1-extract
Extracts and structures source material (articles, transcripts, notes) into a talk summary with narrative arc, themes, metrics, and gaps. Auto-detects REX vs Concept type. Use when starting a new talk from any source material or auditing existing material before committing to a talk.
talk-pipeline
Orchestrates the complete talk preparation pipeline from raw material to revision sheets, running 6 stages in sequence with human-in-the-loop checkpoints for REX or Concept mode talks. Use when starting a new talk pipeline, resuming a pipeline from a specific stage, or running the full end-to-end preparation workflow.
skill-creator
Scaffold a new Claude Code skill with SKILL.md, frontmatter, and bundled resources. Use when creating a custom skill, standardizing skill structure across a team, or packaging a skill for distribution.
rtk-optimizer
Wrap high-verbosity shell commands with RTK to reduce token consumption. Use when running git log, git diff, cargo test, pytest, or other verbose CLI output that wastes context window tokens.
release-notes-generator
Generate release notes in 3 formats (CHANGELOG.md, PR body, Slack announcement) from git commits. Automatically categorizes changes and converts technical language to user-friendly messaging. Use for releases, changelogs, version notes, what's new summaries, or ship announcements.