跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

change-brief

Turn a pull request into a concise, self-contained HTML decision brief with business logic, diagrams when useful, conditional UI/mobile screenshots, API cURL request/response evidence, risks, verification, and representative before/after code. Use when the user asks to "explain this change as HTML", "before/after html", "change brief", "html explainer for a PR", "explain what changed", or wants a shareable, human-readable snapshot of a code change. Args a PR number/URL, or nothing to use the current branch's PR.

rlajous · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add rlajous/claude-code-commands --skill change-brief

技能说明


name: change-brief description: Turn a pull request into a concise, self-contained HTML decision brief with business logic, diagrams when useful, conditional UI/mobile screenshots, API cURL request/response evidence, risks, verification, and representative before/after code. Use when the user asks to "explain this change as HTML", "before/after html", "change brief", "html explainer for a PR", "explain what changed", or wants a shareable, human-readable snapshot of a code change. Args a PR number/URL, or nothing to use the current branch's PR. argument-hint: "[pr-url-or-number]" disable-model-invocation: false allowed-tools: Read, Grep, Glob, Bash user-invocable: true

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

$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.

Step 1 — Resolve the change

gh pr view <pr> --json number,title,url,body,headRefName,baseRefName,baseRefOid,headRefOid,files
gh pr diff <pr>
  • Pull each linked issue referenced in the PR body (Fixes #NN, Closes #NN, etc.): gh issue view <NN> --json title,body.
  • gh missing or unauthenticated → tell the user and stop.
  • PR not found → say so and stop.

Classify the PR into one or more evidence kinds from changed paths and hunks:

  • UI/web/mobile — rendered components, screens, styling, navigation, or interaction.
  • HTTP API — routes, controllers, request/response schemas, OpenAPI, or HTTP integration tests.
  • Business logic/data — rules, permissions, state transitions, calculations, persistence, jobs.
  • Workflow/infrastructure — build, deployment, configuration, scripts, or developer tooling.
  • Documentation-only — prose or examples without runtime behavior changes.

Read the evidence playbook after classification. Apply the common rules plus only the sections matching the detected kinds.

Step 2 — Build the human story

Write for a product/engineering reader who did not implement the change. Use plain language and answer these questions in this order:

  • Executive answer — what changed, who is affected, why it matters, and the current verdict.
  • Problem and root cause — what was wrong and the specific code reason.
  • Business logic — actor, trigger, inputs, decision rules, invariants, side effects, failure behavior, and what explicitly does not change. Use a compact decision table when rules branch.
  • Fix and flow — how the implementation now behaves from entry point to observable outcome.
  • Risk, rollout, and rollback — realistic failure modes, compatibility impact, deployment or migration needs, security/privacy, data, performance/cost, accessibility, observability, and the shortest safe rollback path. Include only relevant dimensions; write “None identified” only with evidence.
  • Verification — automated tests, observed runtime evidence, CI, and any unverified gaps.

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.

Step 3 — Gather evidence and comparisons

Choose the smallest evidence set that proves the change:

  • Add one diagram when three or more steps, components, states, or decision branches materially benefit from visualization. Use accessible inline SVG or semantic HTML/CSS, never a remote renderer. Label nodes with concrete components and outcomes, not generic “system” boxes.
  • For UI/web/mobile changes, capture real before/after screenshots at the same state and viewport. Mobile work uses a representative device viewport or simulator. Embed screenshots as compressed data: images with alt text. Never generate a fake screenshot. If capture is unavailable, show a visible evidence gap and exact reproduction steps.
  • For HTTP API changes, show a copyable cURL request and its status plus response body. Use a local, test, or explicitly approved environment; redact credentials and sensitive data. Label a response 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.
  • For each major behavior change, render one focused two-column before/after block from the diff: removed lines on the left, added lines on the right, and shared context in both. Prefer proof over exhaustive hunks. Put the complete changed-file inventory and secondary details in an appendix.

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.

Step 4 — Build index.html

One self-contained file per PR:

  • Header: PR #<n> — <title>, PR/issue links, change kinds, verdict, and estimated reading time.
  • Executive answer: the decision-relevant summary must fit without scrolling on a laptop.
  • Business behavior: before/after
阅读完整来源 ↗