Git-history archaeology of a repository's AI coding harness (Copilot, Claude Code, Codex, Cursor, MCP, skills, agents, hooks). Use to date when each AI config appeared, trace how it spread, churned or was abandoned across modules, measure AI-assisted commits over time, or derive maturity phases. Not for auditing the current config or generic git stats.
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Reconstructs the history of an AI coding harness from git: which files appeared when, who maintained them, how they spread between modules, what was abandoned, and how AI-assisted commits evolved. A bundled script does the counting in one pass; the agent checks the classification and writes the narrative from the data.
Output: {out}/{slug}-harness.json and {out}/{slug}-harness.md (script), then {out}/{slug}-git-archaeology.md (narrative).
/git-ai-archaeology repo_path=/path/to/repo [out=./reports] [slug=name] [ref=main] [since=2025-01-01] [remotes=yes]Resolve the scope. Check the path with git -C {repo_path} rev-parse --git-dir. Use the default branch as ref unless the user names one; a feature branch distorts every count. Decide whether to scan remote branches (--remotes) for unmerged harness work. Done when repo, ref, period and output directory are recorded.
Run the script.
python3 -I ${CLAUDE_SKILL_DIR}/scripts/harness_archaeology.py \
--repo {repo_path} --out {out} --ref {ref} [--since {since}] [--remotes] [--slug {slug}]It walks every non-merge commit touching a harness path once (git log --raw --numstat -M), so its cost grows with the length of the history, not with the number of runs. Presence, copies and staleness are read from the tree of --ref, not the working copy. With --since, files older than the window take their first commit in the window as creation date, and the report says how many. It exits non-zero without writing when the path is not a git repository. Done when it prints harness_commits and both files exist.
Check the classification before trusting a number. Read the "By tool family" and "Most edited files" tables. Look for false positives (a commands/ folder of a test suite, an agents/ folder of business docs) and for harness files the patterns miss:
git -C {repo_path} -c core.quotePath=false ls-files | grep -iE 'agent|prompt|llm|copilot|claude|codex|cursor|mcp|skill' | grep -vE '\.(java|ts|py|go|kt)$' | head -50Rerun with --extra-glob 'path/**' (repeatable, family custom) for a missed location, and with --exclude-glob 'path/**' for files that are product content rather than harness, such as skills a repository publishes as examples. A false positive left in place is reported in the narrative's limits rather than hidden. Done when each family's files have been sampled and every correction is either rerun or listed.
Read the events, then write the phases. Work from the JSON, not from memory of typical projects. Use the reading grid to interpret each indicator. Look for: creation waves, the same file added to many modules on one day (propagation), files added then deleted within days (trial and error), renames from one tool's folder to another (migration), deletions whose subject states a policy, structuring commits, and work living only on remote branches. Derive phases from these breaks; their number and labels come from the data. Done when every phase names its period, its commit count and at least one hash.
Compare usage with harness activity. From the monthly table, set the AI-trailer share beside harness commits. A trailer is a lower bound: inline completion leaves none, and Co-authored-by: Copilot does not say which feature was used. The script counts a trailer when its e-mail belongs to a tool vendor, or when it names a tool with a bot or noreply e-mail, so a colleague named Claude does not count. Done when the narrative states the first month with AI trailers, the latest share and whether usage and harness work move together.
Write {slug}-git-archaeology.md. Sections: scope and method; key figures; timeline of first appearances per family; phases with evidence; spread and duplication; churn and abandonment; who maintains it (counts and shares only); usage versus harness; unmerged work; limits. Every figure comes from the JSON or a command quoted in the report. Done when the validation checklist below passes.
git shortlog. The script hashes e-mails with a random salt per run, so hashes cannot be recomputed; pass --salt only to compare two runs, and keep that salt out of the output. With one or two contributors, a share still points at a person: say so.-M and quotes the original creation date. A file moved in from a non-harness path shows as created on the move.{out}e0d8cbb
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.