skills/investigating-repository-history/SKILL.md
Investigate GitHub repository history before risky code changes using git blame/log, GitHub PRs, review comments, squash/rebase/cherry-pick/rename heuristics, and cited evidence. Use when asking why code exists, whether a change is safe, what PR introduced behavior, or before editing API, compatibility, security, concurrency, persistence, migration, or performance-sensitive code.
npx skillsauth add codealive-ai/agents-reflection-skills investigating-repository-historyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.development
First Principles Framework (FPF) — thinking amplifier. Use when user wants to think through a complex problem, architect a system, evaluate alternatives, decompose complexity, classify problems, define quality attributes, plan rigorously, make decisions under uncertainty, establish causality, reason about time and trends, describe architecture or structural views, check mathematical model fit, or improve pattern quality. Also triggers on: FPF, bounded contexts, SoTA packs, assurance calculus, decision theory, causal reasoning, temporal reasoning, architecture description, quality gates, FPF Parts A-K. Not for simple task planning, general philosophy, or Agile unrelated to FPF.
tools
Search, find, discover, install, remove, update, review, list, move, optimise, and iterate on skills for AI coding agents. Use when user asks "find a skill for X", "search for a skill", "is there a skill for X", "install skill", "remove skill", "update skills", "list skills", "review skill quality", "move skill", "check for updates", "optimise skill", "train skill on tasks", "iterate skill", "audit skill edits", "log skill edit", "diff skill versions", "trigger test skill", "transfer skill across agents", or "how do I do X" where X might have an existing skill. THE tool for skill discovery, ecosystem search, and SkillOpt-style training loops. Do not use for creating skills from scratch (use /skill-creator instead).
tools
Rename and refactor C# symbols in a .NET solution or multi-solution monorepo with a one-shot Roslyn CLI. Use when the user asks to rename a symbol, preview impact, update references across a solution, or refactor shared projects across several solutions.
tools
Hands-on playbook for macOS disk cleanup, dev-machine optimization, and proactive health alerting. Use when the Mac is full or slow, when a kernel panic / watchdog timeout / vm-compressor-space-shortage / Jetsam event happened, when the user asks to free disk space, audit storage, set up disk/memory alerts, or restore the same monitoring on a new Mac. Built around Mole (`mo` CLI) for safety guards plus a custom LaunchAgent-based alerter for active warnings. Covers Apple Silicon laptops with heavy AI/Docker workloads. Not for general macOS support, hardware diagnostics, networking issues, GUI / window-manager bugs, Time Machine recovery, broken app installs, or app-specific performance problems unrelated to disk or memory pressure.