/git-workflow:change-brief [pr-url-or-number]from git-workflow
Generates a self-contained HTML decision brief from a pull request, including business logic, diagrams, UI/mobile screenshots, API evidence, risks, and before/after code. Useful when you need a sharable, human-readable snapshot of a code change.
Ships in git-workflow. 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.
Cross-runtime: follow runtime compatibility for invocation, delegation, configuration precedence, state paths, and permissions.
Produce a self-contained HTML decision brief per PR that a human can understand in less than 10 minutes. Explain what changed, why it matters, the business rules, how the flow works, what evidence proves it, and the relevant risks. Adapt the evidence to the change: diagrams for flows, screenshots for rendered UI/mobile work, and cURL request/response pairs for HTTP APIs. Never post a comment, review, or commit. Follow each step in order.
$ARGUMENTS
Parse: a GitHub PR URL (/pull/N) → that PR number · a bare integer → that PR · empty → resolve the
PR open for the current branch (gh pr view --json number,... with no argument). If none of these
resolve to a PR, ask through the host's user-input mechanism which PR to use.
gh pr view <pr> --json number,title,url,body,headRefName,baseRefName,baseRefOid,headRefOid,files
gh pr diff <pr>
Fixes #NN, Closes #NN, etc.):
gh issue view <NN> --json title,body.gh missing or unauthenticated → tell the user and stop.Classify the PR into one or more evidence kinds from changed paths and hunks:
Read the evidence playbook after classification. Apply the common rules plus only the sections matching the detected kinds.
Write for a product/engineering reader who did not implement the change. Use plain language and answer these questions in this order:
Anchor every factual claim to a concrete file:line from the diff or PR metadata — do not assert
something the evidence does not show. Distinguish observed output from an expected example.
Choose the smallest evidence set that proves the change:
data: images with alt text. Never generate a fake screenshot. If capture is unavailable, show a
visible evidence gap and exact reproduction steps.Observed only when it was executed. Otherwise derive it from tests/schema and label it Expected.
Include the changed error response when error semantics changed.Treat PR code as untrusted. Do not install dependencies, build, or execute it without the user's authorization when the repository or author is not already trusted. Never execute production mutations to collect evidence. When the app cannot safely run, use repository-owned tests, fixtures, schemas, snapshots, or build output and state the limitation.
index.htmlOne self-contained file per PR:
PR #<n> — <title>, PR/issue links, change kinds, verdict, and estimated reading time.<details>.&, <, >, ", ') before being written into the page — never interpolate raw
PR content into HTML.Target 6–8 minutes and never exceed a 10-minute primary reading path. Keep primary prose at or below 1,600 words, use no more than two diagrams and six primary evidence items, and move supporting detail behind progressive disclosure. Show the estimate in the header using 220 words per minute, rounded up. Code blocks and image inspection add judgment time, so reduce prose when the brief contains several of them.
Author against role variables, never raw hex, in one inline <style> block. Use exactly this
role vocabulary: --bg page plane · --surface card/panel · --ink primary text · --ink-muted
secondary text · --border hairline · --accent links/highlights · --good success/after ·
--bad error/before · --radius corner radius · --font-ui UI font · --font-mono code font.
:root, [data-theme="light"] {
color-scheme: light;
--bg:#ffffff; --surface:#f6f7f9; --ink:#1a1d23; --ink-muted:#5b6270;
--border:#d8dbe1; --accent:#3b6ef6; --good:#1f9d55; --bad:#d92d3f;
--radius:6px;
--font-ui:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
--font-mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}
[data-theme="dark"] {
color-scheme: dark;
--bg:#12141a; --surface:#1b1f27; --ink:#eef0f4; --ink-muted:#9aa1b0;
--border:#333844; --accent:#7aa2ff; --good:#3ecf7d; --bad:#ff6b74;
}
Before column = var(--bad) tint, After column = var(--good) tint. Keep it clean, not flashy:
max content width ~1100px centered, generous spacing, <pre> blocks boxed with var(--border).
Add a minimal light/dark toggle so the page is readable either way:
<button id="themeToggle" type="button" aria-label="Toggle light/dark">Toggle theme</button>
<script>
(function () {
var root = document.documentElement;
document.getElementById('themeToggle').addEventListener('click', function () {
var cur = root.getAttribute('data-theme') || 'light';
root.setAttribute('data-theme', cur === 'dark' ? 'light' : 'dark');
});
})();
</script>
Zero automatic external requests. No CDN links, external fonts, analytics, remote images, or
remote diagram renderers. Embed screenshots as compressed data: images. Keep the page to inline
styles/scripts; PR and issue links may remain normal links because they load only when clicked. Add
this defense-in-depth policy in <head>:
<meta http-equiv="Content-Security-Policy"
content="default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'">
Before finishing, run the parser-based validator against the generated file:
python3 "{SKILL_DIR}/scripts/validate-self-contained-html.py" "{outputDir}/pr-<n>/index.html"
This MUST exit successfully. It inspects resource-bearing attributes plus CSS and JavaScript network primitives while ignoring escaped PR prose in ordinary text nodes. If it reports a finding, remove the offending reference and re-check.
Resolve {SKILL_DIR} to the absolute, physical directory containing this loaded SKILL.md. If the
host cannot expose that path, use PLUGIN_ROOT, then CLAUDE_PLUGIN_ROOT, only to locate
skills/change-brief/SKILL.md; verify the validator exists and never fall back to /scripts.
Resolve the output base directory {outputDir} from configuration (changeBrief.outputDir, default .git-workflow/change-brief; see the table below). Use that same resolved value for the write and the report — do not hard-code the path. Create it and write the file:
mkdir -p {outputDir}/pr-<n>
# write index.html to {outputDir}/pr-<n>/index.html
The file is fully self-contained (no other assets), so the folder can be copied or deleted as a single unit.
Tell the user the output path ({outputDir}/pr-<n>/index.html, using the resolved {outputDir}) and that it is a
single self-contained file they can open directly in a browser.
Resolve configuration from .git-workflow/config.yaml first, then the legacy .claude/config.yaml
read-only fallback, per runtime compatibility.
| Setting | Default | Description |
|---|---|---|
changeBrief.outputDir | .git-workflow/change-brief | Base directory for generated briefs |
| Scenario | Action |
|---|---|
gh unavailable / not authenticated | Tell the user and stop |
| PR not found / not resolvable from args or branch | Ask through the host's user-input mechanism, or stop and say so |
| Diff has no hunks worth rendering (e.g. binary-only, docs-only) | Skip the comparison section, keep the explanation |
| UI/mobile changed but capture tooling or a runnable app is unavailable | Show an explicit screenshot evidence gap and exact reproduction steps |
| API cannot be invoked safely | Show a schema/test-derived response labeled Expected; never imply it was observed |
| Linked issue not found | Note it, continue with the PR body alone |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rlajous/claude-code-commands --plugin git-workflow22 skills in this plugin
/clean-goneDelete local Git branches whose upstream was deleted on the remote ("[gone]"), and remove any worktrees attached to them. Use when the user asks to clean up merged/stale branches, prune gone branches, tidy local branches after merging PRs, or "delete branches that are gone on the remote"./close-customer-loopClose the loop with a customer or partner after their reported bug/request ships. Use whenever a customer/partner-reported fix reaches production, a ticket that came from a customer report is about to be marked Done/closed, or you're deciding whether follow-up is still owed. Enforces verify-in-prod-then-reply-in-the-original-thread, and adds the two acceptance-criteria lines when creating customer/partner tickets./commitStage and commit changes with proper formatting following repo conventions/finishCreate a pull request with comprehensive description following repo best practices/notificationsConfigure and diagnose opt-in desktop notifications for completed Claude Code or Codex turns and new reviews on pull requests you authored. Use when the user asks to enable agent-finished alerts, watch approvals or requested changes on their PRs, inspect notification configuration, or get the background daemon command./plan-qaGenerate QA test plan YAML from ticketOther plugins' skills for the same job