skills/brief/SKILL.md
Generates a rich, visual HTML one-pager that lets a busy reviewer understand a body of changes and either approve a proposed PR stack or merge a finished one — without reading the diff themselves. Auto-detects whether the run is DRAFT (working-tree changes plus a proposed stack, pre-approval) or FINAL (a real PR stack with review complete, pre-merge). Leads with a TL;DR, surfaces the PR stack near the top, flags high-stakes changes (endpoints, auth, schema), then walks the reviewer through the important code as a numbered Code Tour with inline diff snippets. Use whenever someone wants to eyeball a change before approving or merging — "review the changes", "show me what changed", "summarize the diff / the branch / the stack", "what am I about to approve", "walk me through what shipped", "explain the final code", or any shipping-workflow approval/merge gate — even if they don't say the words "brief" or "HTML".
npx skillsauth add ilamanov/skills briefInstall 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.
Produce a rich, visual one-pager — a single self-contained HTML file, designed like a dense dashboard rather than a written document — that lets a time-pressed reviewer understand a body of changes and decide quickly whether to approve or merge them, without reading the diff themselves.
The reader is a busy manager. They may give this 30 seconds or 10 minutes; the brief has to reward both. So the structure is strictly priority-ordered: the highest-stakes, hardest-to-undo changes come first, and the long tail of routine edits comes last. The goal is maximum signal in minimum time — but never trade clarity for brevity. Be thorough; just front-load what matters.
The brief is not a report. It is the equivalent of the PR author sitting down with the reviewer and walking them through the work — anchoring every claim to real code, explaining why the change exists, not just what changed. Most readers will not open the diff. Show them the code that matters, inline.
The same skill produces two flavors of brief depending on the state of the work:
proposed-pr-stack.md. No real PRs exist yet, or the stack is not yet review-complete. The brief is what the user reads at the approval gate before the work is sliced into PRs.How to pick the mode: look at what exists.
gh pr list --head <branch>, gt log if Graphite is in use.)If the user explicitly asks for one mode ("draft brief" / "final brief"), honor it. Otherwise pick automatically and state your choice at the top of your reply ("Generating a FINAL brief — stack is review-clean.").
The difference between the modes is in content, not visual structure. The HTML scaffolding below applies to both; mode-specific content (review status pills on each PR card, commit cause tags, skipped-finding rows) only appears in FINAL mode, inside the same PR Stack section both modes share.
A page of tables and callouts is quick to skim but hard to truly absorb: the reviewer gets facts without the thread that connects them. So beyond being well-structured, the brief should read — like an author walking a colleague through the change, not filing a report.
Keep prose as connective tissue, not bulk. A skimmer still gets everything from the structure; a top-to-bottom reader gets a coherent story.
Identify the trunk branch (usually main). Then collect the full picture of what changed against it:
git diff <trunk>..HEAD --stat and the full diff for the files that matter.git log <trunk>..HEAD --oneline, plus full commit messages (git log <trunk>..HEAD --format=fuller or git log <trunk>..HEAD --format=%B) so you can pull out any explanatory body text the author wrote. Many commits will have only a subject line — that's fine, treat the body as optional. But when a commit does carry a meaningful body (a Why: paragraph, a rationale, a tradeoff note), it is the author's own explanation of that slice and belongs in the brief.git status --porcelain then read them directly.proposed-pr-stack.md (look in repo root and .briefs/). If none exists, omit the stack section. Do not invent one.gh pr list --head <branch> and per-PR via gh pr view <num> --json title,body,state,commits,reviews,reviewDecision. If Graphite, also gt log short.gh pr view <num> --comments and gh api repos/{owner}/{repo}/pulls/{num}/comments for inline review comments. Cross-reference commit messages against findings to build the finding → commit mapping.Skip generated files when picking what to show in the Code Tour. They add noise without informing the walkthrough. Common examples — adapt to the repo:
**/*.api.md, **/api-report* — generated API surface reportsapps/docs/content/reference/**, generated reference docsyarn.lock, package-lock.json, pnpm-lock.yaml**/CHANGELOG.md when auto-generatedThese can still appear in the compact file index, but they should not be tour stops or callouts.
Ignore any pre-existing brief files. .briefs/ may already contain briefs from earlier runs or other work. They are never an input — they may be stale or obsolete. Do not read them.
Before writing anything, sort what you found into tiers. This ordering drives the page.
Tier 1 — High-stakes (lead with these, make them impossible to miss):
Tier 2 — Core logic that carries the feature: business logic, data flow, API response shapes, state machines, the functions a reviewer must actually understand.
Tier 3 — Routine: UI tweaks, refactors, tests, docs, formatting.
If a tier is empty, say so explicitly ("No auth or schema changes") — absence of high-stakes change is itself valuable information.
Schema changes are the most dangerous thing in most diffs and the easiest to wave through. If the schema source changed (schema.prisma, db/schema.ts, migration files, model definitions), do not summarize — walk it.
One row per individual change: table/model, exact field, before → after, nullability, default, index/constraint impact, and the practical consequence ("existing rows need a backfill", "this drop loses data", "non-null without default will fail on a populated table"). The reviewer should be able to audit the entire schema delta from this section.
This is the heart of the brief and the most important section to get right. The Code Tour is a numbered sequence of "stops" through the change, the way the author would walk a colleague through it. The core idea is borrowed from Graphite Code Tours: instead of forcing the reviewer to scroll between a PR description, comments, and a scattered diff, the narrative lives alongside the actual code in one sequential path. Each stop pairs a short prose explanation with the specific hunk being discussed, so the reviewer never has to context-switch to understand what changed.
Planning rules:
index.ts, types.ts, public.ts — just plumbing the new Foo type").Write one self-contained .html file — all CSS inline in a <style> block, no external requests, no JS frameworks, no fetched fonts. It must open straight from disk.
The page is dense but strictly ordered — this order is non-negotiable, even if you think a particular change would read better another way. Past briefs that reshuffled (PR stack ending up below the code walkthrough, single-PR briefs hiding the PR number in the meta grid) consistently failed reviewers. A reviewer who reads only the first screenful must see: the title, mode, the TL;DR, the PR stack, and any high-stakes callouts. Everything below scrolls.
Use this section order exactly:
DRAFT, green for FINAL · review clean, red for FINAL · 2 findings open). The reader should know which mode they're in from across the room. A muted tag-style chip is not enough.1/3), PR number / slug, one-line summary, size (e.g. +312 / −44 · 8 files), status pill (open / merged / draft). For FINAL mode, also a review-state pill (review-clean / 2 findings / 1 skipped).initial for the baseline, review finding / user steering / other (CI fix, restacking fallout, polish) for follow-ups. Cross-reference commit messages against review threads to attribute follow-ups; every follow-up must carry a cause.Why: line that restates the subject, AI-attribution trailers, Co-Authored-By lines. Sparse is the right default: only the bodies that add signal expand; the rest are subject-only rows. For a PR with many commits and few meaningful bodies, this naturally produces a compact list with a couple of expanded rows.Route / Inputs / Success behavior / Failure behavior / Side effect / Auth. One row per endpoint. This belongs above the schema walk because new surface area is usually the highest-stakes thing in a backend change. Skip this section if the change touches zero or one endpoint — the callout in (3) is enough.3. Row-locking the delete path). Numbers are useful so the reviewer can reference a specific stop; descriptive titles make the TOC scannable.position: sticky column (or a top-anchored mini-nav for narrower viewports) listing every stop title with #anchor links. Highlight grouping by indenting child stops under their section heading. No JS — just sticky CSS and named anchors. This is what makes Graphite's tour navigable; without it a long brief forces linear scrolling.The tour stops must show real code, not pseudocode or paraphrase. Use a simple, hand-rolled approach — no syntax highlighter library:
<pre><code> with a monospace stack.<span class="add">, <span class="del">, or <span class="ctx"> based on its leading +/-/ character; the CSS gives each class a soft green / red / neutral background that spans the full row.@@ hunk header line as <span class="hunk"> (muted color).<pre><code> block with no per-line classes; just monospace on a neutral panel background.↕ 12 lines unchanged on its own row (muted color, dashed border, smaller type). This lets a single stop show both ends of a long file without faking continuity, and tells the reviewer exactly how much code they're not seeing.white-space: pre-wrap; word-break: break-word; on code blocks so wide lines don't blow out the layout.This lands in front of a manager, so it should look deliberate, not generic: clear type hierarchy, color used purposefully (priority, severity, review state, add/del), monospace for code and paths, real whitespace rhythm. Aim for a max page width around 1100–1200px. Avoid the generic AI-generated look. If a frontend-design skill is available, lean on its principles.
The hero must stay slim — resist the urge to fill it with cards. Most of the visual weight should be the PR stack and the Code Tour.
Save the file into a .briefs/ directory at the repo root. Naming:
draft-brief-<slug>.html for DRAFT mode.final-brief-<slug>.html for FINAL mode.Where <slug> is the branch name or a short slug of what the change does, so the file never collides with briefs from other work. Make sure .briefs/ is ignored by version control so briefs are never committed — prefer a local, uncommitted ignore rule over editing a tracked .gitignore. Then open the brief in the user's browser.
Before handing off, check the brief against its purpose:
Then tell the user the brief is ready, where it is, and which mode you chose.
development
Map every Codex and Claude Code session for a project to the git worktrees they ran in, in an interactive local UI. Use whenever someone wants to see, search, audit, or clean up past AI coding-agent conversations and the worktrees those ran in — e.g. "what Codex sessions ran on this repo", "list my Claude Code sessions", "which worktree was that session in", "find the chat where I refactored auth", "archive old Codex sessions", or "show every session across my worktrees". Reach for it to untangle which of many worktrees still has live agent history attached. This is about Codex and Claude Code transcript history plus git worktrees — not HTTP, login, or auth sessions, not terminal or tmux sessions, and not user-research sessions.
tools
Generally-applicable conventions for how code is written and arranged — tooling/package manager, import style, file & component naming, comments, and where files live (colocation vs. global folders). Use whenever creating, naming, moving, or importing a file, running project commands, or deciding where a new module belongs. Consult BEFORE writing the code so the conventions are baked in, not retrofitted. If a convention below matches the work, apply it — don't ask, just follow it (call out the choice in one line so the user can override).
development
Generally-applicable frontend/UI best practices. Use whenever building, modifying, or reviewing UI — adding a form/button/dialog/modal, wiring keyboard shortcuts, creating any interactive surface that submits a form, or any time TSX/JSX is being written or edited. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).
tools
Generally-applicable backend/data best practices. Use whenever writing or modifying backend/data code — API routes, server actions, DB writes, background jobs, agent tools, import flows, webhooks, paste handlers, or anywhere data enters the system. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).