git-ai-archaeology

GitHub

分析仓库中AI编程工具配置的历史演变,追踪文件生命周期、传播路径及废弃情况,评估AI辅助开发的成熟度阶段。

examples/skills/git-ai-archaeology/SKILL.md FlorianBruniaux/claude-code-ultimate-guide

触发场景

需要追溯AI配置文件(如Copilot、Cursor等)的引入时间和演变历史 分析AI辅助代码提交的趋势和分布 识别AI工具在不同模块间的传播或弃用情况

安装

npx skills add FlorianBruniaux/claude-code-ultimate-guide --skill git-ai-archaeology -g -y
更多选项

非标准路径

npx skills add https://github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/examples/skills/git-ai-archaeology -g -y

不安装直接使用

npx skills use FlorianBruniaux/claude-code-ultimate-guide@git-ai-archaeology

指定 Agent (Claude Code)

npx skills add FlorianBruniaux/claude-code-ultimate-guide --skill git-ai-archaeology -a claude-code -g -y

安装 repo 全部 skill

npx skills add FlorianBruniaux/claude-code-ultimate-guide --all -g -y

预览 repo 内 skill

npx skills add FlorianBruniaux/claude-code-ultimate-guide --list

SKILL.md

Frontmatter
{
    "name": "git-ai-archaeology",
    "effort": "medium",
    "description": "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."
}

git-ai-archaeology

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]

Workflow

  1. 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.

  2. 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.

  3. 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 -50
    

    Rerun 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.

  4. 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.

  5. 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.

  6. 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.

Rules

  • Read-only. No git command that writes, no checkout, no fetch unless the user asks.
  • Privacy. Authors appear only as counts and shares. Do not print names or e-mails, even from 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.
  • Verify before asserting. A date or event not found in git is written "not found", with the command tried.
  • A rename is not a creation. The script follows renames between harness paths with -M and quotes the original creation date. A file moved in from a non-harness path shows as created on the move.
  • Show the flat months. The script lists every month from the first harness commit on, including months without any commit.

Validation checklist

  • Ref is the default branch, or the report says why not
  • Classification sampled; corrections rerun or listed as limits
  • Each phase cites a period, a count and a hash
  • Usage stated as a lower bound, with its first month and latest share
  • No author name or e-mail in any output
  • Both script outputs and the narrative exist in {out}

版本历史

  • dc6808c 当前 2026-11-03 05:35

    v2版本新增一次性运行的Python脚本以统计文件生命周期、重命名、复制及传播;增加未合并分支扫描支持;新增阅读指南和路由场景;工作流细化为六步并明确完成标准。

  • f02545e 2026-10-19 12:36

    将标题格式从 Title Case 统一转换为 sentence case,并更新相关文档生成逻辑以保持一致性。

  • fa57065 2026-07-25 10:18

同 Skill 集合

.agents/skills/guide-recap/SKILL.md
.agents/skills/self-assessment/SKILL.md
.agents/skills/source-command-audit-prose/SKILL.md
.agents/skills/source-command-audit-whitepapers/SKILL.md
.agents/skills/source-command-ccguide-daily/SKILL.md
.agents/skills/source-command-ccguide-diff-docs/SKILL.md
.agents/skills/source-command-ccguide-init-docs/SKILL.md
.agents/skills/source-command-ccguide-refresh-docs/SKILL.md
.agents/skills/source-command-methodology-advisor/SKILL.md
.agents/skills/source-command-track-mentions/SKILL.md
.agents/skills/source-command-update-infos-release/SKILL.md
.agents/skills/update-threat-db/SKILL.md
.claude/skills/self-assessment/SKILL.md
.claude/skills/source-command-update-infos-release/SKILL.md
.claude/skills/update-threat-db/SKILL.md
examples/learning-project/.claude/skills/verify-release/SKILL.md
examples/skills/audit-agents-skills/SKILL.md
examples/skills/audit-codebase/SKILL.md
examples/skills/autoresearch/SKILL.md
examples/skills/best-of-n/SKILL.md
examples/skills/canary/SKILL.md
examples/skills/catchup/SKILL.md
examples/skills/ccboard/SKILL.md
examples/skills/check-cache-bugs/SKILL.md
examples/skills/ci-all/SKILL.md
examples/skills/ci-pipeline/SKILL.md
examples/skills/ci-status/SKILL.md
examples/skills/ci-tests/SKILL.md
examples/skills/commit/SKILL.md
examples/skills/cyber-defense-team/SKILL.md
examples/skills/design-patterns/SKILL.md
examples/skills/diagnose/SKILL.md
examples/skills/eval-agents/SKILL.md
examples/skills/eval-rules/SKILL.md
examples/skills/eval-skills/SKILL.md
examples/skills/explain/SKILL.md
examples/skills/git-worktree-clean/SKILL.md
examples/skills/git-worktree-remove/SKILL.md
examples/skills/git-worktree-status/SKILL.md
examples/skills/git-worktree/SKILL.md
examples/skills/guide-recap/SKILL.md
examples/skills/handoff-create/SKILL.md
examples/skills/handoff-resume/SKILL.md
examples/skills/handoff-update/SKILL.md
examples/skills/investigate/SKILL.md
examples/skills/issue-triage/SKILL.md
examples/skills/land-and-deploy/SKILL.md
examples/skills/landing-page-generator/SKILL.md
examples/skills/learn-alternatives/SKILL.md

元信息

文件数
0
版本
dc6808c
Hash
ac4fb85b
收录时间
2026-07-25 10:18

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 12:58
浙ICP备14020137号-1