8000
Skip to content

Add git-history skill — git history intelligence for AI agents#857

Open
m2015agg wants to merge 1 commit intoanthropics:mainfrom
m2015agg:add-git-history-skill
Open

Add git-history skill — git history intelligence for AI agents#857
m2015agg wants to merge 1 commit intoanthropics:mainfrom
m2015agg:add-git-history-skill

Conversation

@m2015agg
Copy link
Copy Markdown
@m2015agg m2015agg commented Apr 2, 2026

What This Skill Does

git-history gives AI agents institutional memory over a codebase's evolution. It indexes entire git history into SQLite+FTS5, computes derived analytics, and writes health summaries directly into Claude's memory system — so every session starts with awareness of what's churning, what was reverted, and what to avoid.

Key Capabilities

Feature What It Does
Hybrid search BM25 + vector cosine similarity with RRF fusion
Churn hotspots Identifies volatile files (last 30 days + all-time)
Smart alerts Thrashing, revert chains, fix-on-fix detection — written to Claude memory
verify Checks staged changes against history: "was this tried before?"
Workflow commands /plan, /implement, /review, /finalize, /trace
Historical debugging 3 fault types: Missing Guard, Parallel Evolution, Stale Side Effect
LLM enrichment Analyzes each commit for intent, reasoning, impact (Anthropic/OpenAI)
Memory integration Writes codebase health to ~/.claude/projects/*/memory/git_context.md
Team support Nightly cron fetches team commits before re-indexing

How It Works

git history ──→ SQLite cache ──→ Analytics ──→ Claude Memory
  (commits,       (indexed,        (hotspots,     (auto-loaded
   diffs,          searchable)      trends,        every session)
   branches)                        decisions)

Real-World Impact

From production use on a 2000+ commit codebase:

  • Prevented re-introduction of a reverted RAG optimization (saved debugging time)
  • Detected max_tokens thrashing (5 changes in one day on the same value)
  • Identified a crash fix pattern that was missing guards for new fields
  • Surfaced that a prompt service was never wired into 80% of request paths

Articles

Files Added

skills/git-history/
├── SKILL.md           # Skill definition (202 lines)
├── LICENSE.txt         # MIT License
└── scripts/
    └── check-setup.sh  # Setup verification script

Spec Compliance

Requirement Status
name lowercase, hyphens, 1-64 chars git-history (11 chars)
name matches directory skills/git-history/
description < 1024 chars 434 chars
SKILL.md < 500 lines 202 lines
license field Complete terms in LICENSE.txt
Frontmatter: only name, description, license Yes
No deeply nested references Yes

Test Plan

  • Install: npm install -g @m2015agg/git-skill
  • Setup: git-skill config && git-skill init in a test repo
  • Verify commands: git-skill doctor, git-skill hotspots, git-skill search "test"
  • Verify memory: cat ~/.claude/projects/*/memory/git_context.md
  • Verify workflow: /git-history walkthrough in Claude Code
  • Verify script: bash skills/git-history/scripts/check-setup.sh
  • No sensitive data in submission
  • Commit SSH-signed

Links


Also by the same author: context7-cache (PR #685)

Indexes entire git history into SQLite+FTS5, computes analytics
(churn hotspots, coupling, decision points, quality metrics),
and writes health summaries to Claude's memory system.

Key features:
- Hybrid search (BM25 + vector with RRF fusion)
- Smart churn alerts (thrashing, revert chains, fix-on-fix)
- verify command ("was this tried before?")
- Dev workflow commands (/plan, /implement, /review, /finalize, /trace)
- Historical context debugging skill (3 fault types)
- Claude memory integration (auto-loaded at session start)
- LLM enrichment (commit intent/reasoning analysis)
- Nightly cron with team fetch + auto-embed

npm: @m2015agg/git-skill
GitHub: https://github.com/m2015agg/git-skill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0