adr-new
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for pr|review|self`. Reads `git diff HEAD` (or passed range), returns 3–5 bullet plain-English narration. Read-only — defers
$ npx -y skills add Filip-Podstavec/claude-leverage --skill explain-diff --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/explain-diffContext preview
The summary Claude sees to decide when to auto-load this skill.
USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for pr|review|self`. Reads `git diff HEAD` (or passed range), returns 3–5 bullet plain-English narration. Read-only — defers
name: explain-diff description: > USE WHEN about to open a PR, when teammate asks "what's in this diff?", or when returning to a branch and needing self-orientation. Three modes: `--for pr|review|self`. Reads `git diff HEAD` (or passed range), returns 3–5 bullet plain-English narration. Read-only — defers security/test concerns to other skills. allowed-tools: - Read - Bash(git diff:*) - Bash(git log:*) - Bash(git status:*) - Bash(git rev-parse:*) argument-hint: "[ref-range, default HEAD] [--for pr|review|self]"
Reads a git diff and produces a tight English narration of what changed, why a reviewer should care, and where the risk concentrates. Lives next to the vanilla commit workflow (mechanical Conventional Commits message) and `/security-review` (structured security audit) — covers the "narrative" niche neither does.
Three audience modes:
`## Summary`, `## Why`, `## How to verify`. Copy-pasteable into the PR body.
flags non-obvious decisions that the reviewer might miss without the author's voice ("the new `IF EXISTS` clause on line 47 is load-bearing — without it the migration is non-idempotent").
switching context or coming back to a branch later.
1. **Resolve diff range.**
as a ref range and use `git diff <range>`.
use `git diff main...HEAD` instead (covers the whole branch).
2. **Get supporting context** (parallel-OK):
3. **Read the diff** in full. If the diff is enormous (>50k tokens estimated), STOP and report: "diff is too large — narrow with `--paths <pattern>` or `<file>...`". Don't try to chunk and summarize partial diffs; the result would be incoherent.
4. **Walk the diff** and identify:
changes, new dependencies).
`tests/`, etc.).
`*.env*`, `routes/`, etc.) — surface as a "consider /security-review" reminder, not a substitute for it.
`--for review`). A load-bearing hunk that encodes a non-obvious choice — an ordering dependency, a perf carve-out, an idempotency trick, a deliberate rejection of the obvious approach — and carries no `AIDEV-NOTE:` / `AIDEV-TODO:` / `AIDEV-QUESTION:` in the added lines is a memory the next agent won't inherit. This is the review-boundary backstop for the `ai-first-nudge` hook, which only fires on ≥50-LOC single writes and so misses decisions built up incrementally.
5. **Emit narration in the requested shape.**
## Summary - <one sentence per key change, ordered by importance> ## Why <one paragraph: the motivation. If the diff doesn't make the motivation obvious, say so explicitly — "motivation not inferable from the diff; add to PR body".> ## How to verify - [ ] <reviewer step 1> - [ ] <reviewer step 2> - <commands to run if applicable>
## What changed (load-bearing) - `file:line` — <description of load-bearing change> - ... ## What changed (mechanical, low-risk) - <bulk list, less detail> ## What to look at first <top 1–2 things the reviewer should NOT skip> ## What's untested - <files modified without corresponding test changes, IF the language conventionally tests, IF the file is non-trivial> ## Load-bearing but un-anchored - `file:line` — <the non-obvious decision that has no AIDEV anchor; suggest the anchor to add, e.g. "AIDEV-NOTE: retry order matters — webhook must land before the DB commit"> - <omit this section entirely if every load-bearing hunk is either self-evident or already anchored — don't manufacture findings>
- <bullet 1, ≤80 chars> - <bullet 2> - <bullet 3> [max 5]
"while you're at it, fix X" — STOP and surface that as a separate request.
obvious, explicitly say "motivation not inferable from diff" rather than guess.
up, ONE LINE: "diff touches `routes/auth/...` — consider `/security-review`". Don't try to be that skill.
are 30 of them; aggregate ("renamed 30 files from `services/old/*` to `services/new/*`").
`--for review` to make sure the diff is honestly readable.
re-orient.
They're different shapes: a commit message is per-commit; a PR description is per-branch. Don't conflate.
a
Make any repo AI-first - write sustainable code from the start, or refactor a legacy codebase to prepare it for agent-driven development.Building blocks for Claude Code: subagents, slash commands, hooks, and workflow patterns. Copy what you need. A working developer's stack for Claude Code.
Repo: Filip-Podstavec/claude-leverage
USE WHEN a load-bearing architectural decision is being made in conversation (database / framework / auth model / integration choice, or explicit rejection of…
USE WHEN setting up a repo for AI-first work, after a major directory restructure, or when an agent needs structured answers like "which modules are stable?" /…
USE WHEN setting up Codex CLI in a project, tightening sandbox for prod/CI, or when user asks about Codex permissions. Interactive helper for per-project…
USE WHEN setting up a repo for AI-first work (after /init-repo), or when the context-surface hook should start feeding repo conventions to agents before edits.…
USE WHEN the user explicitly asks to verify that this repo's DECLARED build/test/lint commands actually run ("does the quickstart work?", "validate the…
USE WHEN setting up a repo for AI-first work, when an agent hallucinates domain term meaning, or when user asks to bootstrap / extend the repo's domain…