/ai-driven-development:investigating-repository-historyfrom ai-driven-development
Investigates GitHub repository history before risky code changes using git blame/log, PRs, review comments, and heuristics. Answers why code exists, whether a change is safe, and what PR introduced behavior.
Ships in ai-driven-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill to reconstruct the historical intent behind code before changing it. The goal is not merely “find the blame commit”; the goal is to return a compact, cited history note explaining relevant PRs, review comments, constraints, rejected approaches, and anomalies.
Use this skill when the user asks any of these:
Do not use this skill for trivial new code with no dependency on existing behavior.
Before making a risky edit, produce a history note answering:
If the evidence is weak, say UNKNOWN and lower confidence. Never invent intent from a semantic match alone.
From the repository working tree, run the collector first. If the skill directory is not the current directory, prefix the script path with the installed skill path and pass --repo-dir /path/to/repo.
python3 scripts/history_context.py inspect \
--repo-dir /path/to/repo \
--path path/to/file.ext \
--start 120 --end 160 \
--question "Can I remove this constraint?" \
--format markdown
For symbol-level questions without exact lines:
python3 scripts/history_context.py inspect \
--repo-dir /path/to/repo \
--path path/to/file.ext \
--symbol SymbolOrFunctionName \
--question "Why does this behavior exist?" \
--format markdown
For JSON suitable for deeper agent reasoning:
python3 scripts/history_context.py inspect \
--repo-dir /path/to/repo \
--path path/to/file.ext \
--start 120 --end 160 \
--symbol SymbolOrFunctionName \
--question "What PR introduced this behavior?" \
--format json \
--output history-context.json
Then read only the relevant sections of the output. Do not paste huge raw PR/comment dumps into the final answer.
Load these files only when needed:
references/ANOMALIES.md — use when exact commit→PR mapping fails, or when squash, rebase, cherry-pick, backport, revert, rename, split, generated files, or mass refactors are possible.references/GH_CLI.md — use when the script fails or manual gh api calls are needed.references/DECISION_ATOMS.md — use when converting PR/comment evidence into constraints, risks, rejected approaches, or test requirements.references/OUTPUT_SCHEMA.md — use when producing a formal machine-readable report.references/EVALUATION.md — use when testing or improving the skill.git blame -w -M -C -C -C, git log --follow, git log -S, and git log -G.High confidence:
Medium confidence:
Low confidence:
Never claim “this was decided” unless a commit, PR body, review, review comment, issue comment, or linked issue supports it.
Use this concise template in the final answer or implementation plan:
## History note
Scope inspected: [paths, lines, symbols]
Relevant evidence:
- PR #[n] — [relation: exact/squash-like/rename-lineage/search], [why relevant], [confidence]
- Commit [sha] — [what it changed], [relation]
- Review/comment — [constraint or concern]
Decision atoms:
- [constraint/risk/rejected approach/test requirement] — [claim] — evidence: [PR/comment/commit]
Risk: [low|medium|high|unknown]
Confidence: [0.00-1.00]
Unknowns/truncation: [none or list]
Plan impact: [proceed|modify plan|ask human|do not change]
git blame is a seed generator, not truth. Formatting commits, moves, squashes, and refactors can hide origin.gh api responses may be truncated by the underlying GitHub endpoints. If truncation is possible, mark evidence incomplete.scripts/history_context.py — main collector for local Git + GitHub PR evidence. Run python3 scripts/history_context.py --help.scripts/compact_pr.py — fetch one or more PRs and print compact evidence. Run python3 scripts/compact_pr.py --help.scripts/validate_skill.py — validate this skill’s frontmatter and basic structure.LICENSE (opens in a new tab)README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/history-note-template.md (opens in a new tab)references/ANOMALIES.md (opens in a new tab)references/DECISION_ATOMS.md (opens in a new tab)references/EVALUATION.md (opens in a new tab)references/GH_CLI.md (opens in a new tab)references/OUTPUT_SCHEMA.md (opens in a new tab)scripts/compact_pr.py (opens in a new tab)scripts/history_context.py (opens in a new tab)scripts/validate_skill.py (opens in a new tab)tests/__init__.py (opens in a new tab)tests/test_skill.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub codealive-ai/ai-driven-development --plugin ai-driven-development22 skills in this plugin
/agentic-readinessAudit and improve repositories for reliable agentic work across Codex and Codex App, Claude Code, and OpenCode. Use when reviewing AGENTS.md or CLAUDE.md quality and discovery, instruction routing in monorepos or meta-repos, agent settings, MCP configuration, skills, subagents, context budgets, or repository organization for coding agents./bug-fix-protocol8-step disciplined bug-fix protocol that treats every production bug as two failures — the code defect itself and the testing system that allowed it through. Use when fixing a production bug, investigating a regression, writing a post-mortem, or auditing a missed defect. Triggers on "fix this bug", "production bug", "regression test", "post-mortem", "test gap", "why did the tests miss this"./clipboardCopy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text"./code-that-fits-in-your-headHeuristics for the shape of code inside one code base, after Mark Seemann's Code That Fits in Your Head (2021), updated for coding agents: units small enough to hold in mind, invariants in types, APIs hard to misuse, explicit effects. Use when writing or reviewing code, refactoring accidental complexity or a Big Ball of Mud, controlling technical debt in generated code, designing a type, an invariant or an in-code API, decomposing a long function or a tangled module, replacing a method or class side by side (Strangler), reading or measuring an unfamiliar code base, debugging a defect by hypothesis and bisection, setting up a maintainable code base, or turning a recurring finding into a lint or CI gate. Not for choosing, writing or repairing tests, TDD included (pragmatic-verification), choosing a design, state ownership, migration or rollout, or threat modelling (pragmatic-architecture), security audits, production incident response, performance profiling, or language and framework tutorials./coding-agents-managementManages MCP servers, lifecycle hooks, agent settings, permissions, rules, and plugins across Antigravity (App 2.0, IDE, CLI agy), Claude Code/Desktop, Codex CLI/App, OpenCode, Devin, Cursor, Grok Build, Gemini CLI, Qwen Code, Kimi Code, Hermes, Oh My Pi (omp), and VS Code. Use when adding or debugging MCP servers, automating tool hooks, configuring TOML/JSON/JSONC settings and sandboxes, or scaffolding, validating, and publishing plugins. Do not use for authoring, auditing, optimizing, or deduplicating standalone SKILL.md skills — use skills-management instead./fetch-url-as-markdownFetch a web page (URL) and return clean Markdown via local trafilatura, with Exa MCP as a fallback for JS-rendered or anti-bot pages. Use when the user asks to read, fetch, scrape, summarize, or quote a URL — prefer this over the built-in WebFetch tool. Don't use for binary files (PDFs, images, archives) or for fetching API/JSON endpoints.Other plugins' skills for the same job