ui-evidence
Capture, prepare, and publish screenshots or video that prove a UI change in a GitHub pull request or issue. Use for visual comparisons, interaction recordings, reviewer callouts, or requests to attach UI evidence.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ui-evidence
- description
- Capture, prepare, and publish screenshots or video that prove a UI change in a GitHub pull request or issue. Use for visual comparisons, interaction recordings, reviewer callouts, or requests to attach UI evidence.
- compatibility
- Requires Node.js. Capture uses agent-browser with Chrome; motion capture requires agent-browser 0.38.1+ and FFmpeg. Preparation uses FFmpeg, ffprobe, and ImageMagick. Publishing uses authenticated gh 2.99.0+ with repository push access.
02 资源文件 27
- 参考文档agents/openai.yaml226 B
- 资产文件assets/DejaVuSans-LICENSE.txt8.6 KB
- 资产文件assets/DejaVuSans.ttf741.9 KB
- 参考文档references/annotation-spec.md3.9 KB
- 参考文档references/before-after.md4.1 KB
- 参考文档references/comparisons.md11.5 KB
- 参考文档references/example-comparison.md10.1 KB
- 参考文档references/example-recording.md9.3 KB
- 参考文档references/motion.md14.4 KB
- 参考文档references/publishing.md7.0 KB
- 参考文档references/recipes.md10.8 KB
- 脚本scripts/anchors.mjs11.3 KB
- 脚本scripts/annotate.mjs17.2 KB
- 脚本scripts/before-capture.mjs13.0 KB
- 脚本scripts/capture.mjs19.9 KB
- 脚本scripts/compare.mjs34.6 KB
- 脚本scripts/comparison-layout.mjs35.9 KB
- 脚本scripts/magick-args.mjs2.6 KB
- 脚本scripts/manifest.mjs10.8 KB
- 脚本scripts/motion-annotations.mjs25.8 KB
- 脚本scripts/preflight.mjs10.8 KB
- 脚本scripts/prepare-gif.mjs123 B
- 脚本scripts/prepare-motion.mjs37.6 KB
- 脚本scripts/provenance.mjs26.9 KB
- 脚本scripts/publish.mjs26.4 KB
- 脚本scripts/recipe.mjs12.9 KB
- 脚本scripts/regions.mjs6.5 KB
03 SKILL.md 正文
UI evidence
Show the reviewer what changed and how to inspect it. This skill owns evidence
selection, preparation, review, and publication. agent-browser owns browser
state, capture, pointer feedback, and direct interaction. Substitute this file's
directory for <skill-root>.
Choose the evidence
Name the visible claims and the states that prove them. Cover the surfaces the user requested. One coherent image or clip can prove related claims. For an interaction, show its starting state on the changed revision, before the first input (the focused control, for keys), then each state the claim names, in order, in the same view as the result; a base-revision capture does not replace any of them. Before capturing, list those states in order, starting from the view before the first step the task names, even a step that only opens a sheet, menu, or editor, and before any default value changes. Make that first state a changed-revision capture that shows the default the task changes, such as the selected option and the values it sets, and deliver it; the base revision is the separate, optional "before" of before/after, even when it shows the same action. When the claim is that the UI returns to where it began, as with cancel, undo, close, or reset, the start and end captures together are the proof. When the task names more than one step, or the flow passes through a transient state such as a progress message, highlight, toast, or animation, record one clip from that first state through the settled state after any transient clears, and deliver it even when the states look few or a still seems to show them; stills miss the states between the ones you list. Embed any stills in that same order, starting state first, and do not let stills replace the clip. Use one viewport and one crop for every state, sized to hold the whole affected area in its largest state, including any count or summary elsewhere on the page that the claim names; open each cropped file and confirm that every item the caption names is fully visible. See Show the interaction from its start.
| Medium | Use |
|---|---|
| Screenshot | Layout, copy, focus, persistent state, precise before/after |
| MP4, default for motion | Interaction, drag, scrolling, transitions, loading; reviewers can pause and seek |
| GIF, opt-in | A tiny loop whose essential states and timing remain readable |
| Neither | No material visible difference; explain any visible claim left without evidence |
Prepare the capture
Read the installed browser workflow with agent-browser skills get core before
using browser commands. Reuse a dev server after confirming it serves the
intended worktree, route, and fixture. Finish heavy builds or tests before a
motion take. Use sanitized fixture data.
Create one absolute directory outside the source tree for this run. Pass full paths to the browser, whose daemon may have a different working directory.
EVIDENCE_DIR="$(mktemp -d "${TMPDIR:-/tmp}/ui-evidence.XXXXXX")"
export AGENT_BROWSER_SESSION="$(basename "$EVIDENCE_DIR")"
node "<skill-root>/scripts/preflight.mjs"
Preflight checks only the selected operation: default screenshot capture,
--motion, --prepare, --annotate, --compare, or --publish. Use --format gif for GIF
preparation or WebM capture, and add --annotations to --prepare for timed
annotations or a storyboard. Report missing tools and the suggested fix; ask
before system packages, global modules, browser downloads, or global upgrades
unless already authorized.
Capture and prepare
For static evidence, wait for the intended state, fonts, and unrelated motion to settle. Keep the animation under test intact. Suppress only known development overlays. Capture enough context for the claim:
agent-browser open '<url>'
agent-browser set viewport 1280 800
agent-browser screenshot "$EVIDENCE_DIR/after.png"
Use selector screenshots for a simple element crop and diff screenshot for a
quick baseline comparison. For a base revision, read
before-after.md. For a published before/after
comparison, enlarged detail crops, or numbered callouts across both versions,
read comparisons.md before compare.mjs. For
callouts on a single screenshot, use regions.mjs and read
annotation-spec.md before annotate.mjs.
Browser --annotate numbers interactive refs for diagnostics; it does not
replace reviewer callouts or redaction.
When the same state will be captured more than once, such as before and after
versions or a refresh after follow-up commits, write a capture recipe and run
capture.mjs; read recipes.md. Its local manifest
reports which evidence is fresh, stale, or needs review.
For any recording, read motion.md. It covers rehearsing direct actions, structured batches, assertions, native cursor feedback, raw inspection, MP4/GIF preparation, and final-output review. The supported recorder captures the ready active page without resetting its context. For an explanatory clip or a step sequence, its "Explain the action and result" section adds timed step numbers, captions, key indicators, and an optional storyboard in the same preparation run.
For a complete run from capture to publication dry run, follow example-comparison.md or example-recording.md.
Crop to the containing component with the layout around it, such as the heading above a card, so the reviewer sees where the change lives. Redact unrelated identifying data before upload. The change must be readable at the PR's width of about 880 px. Never place two full-width screenshots side by side, as in a Markdown table; see Lead with a readable detail. Start clean and annotate only what helps a reviewer find or understand a change; an image with no callouts is a complete result. Choose the annotation ranks the marks from pin to outline or spotlight to measurement. Add a final-state screenshot only when independently useful. Start with a soft budget of six assets and two clips; preserve requested coverage and collapse secondary evidence when more is needed.
Write the section
Show the change; do not retell the pull request description. Give each asset
one or two sentences, or a few short bullets: what changed, where, and what to
look at, by callout number when there are pins. Label each version
truthfully by revision or state. For a copy change, quote the old and new
wording with its direction, for example "Save" -> "Save changes", so the
reviewer can tell which panel is new. Leave out the restated task or PR, praise,
capture method, viewport, and tables or paragraphs repeating what the media
show. State a limitation only when it is specific and true.
Embed each clip as a standalone  with blank lines around it, so
the reviewer can play it in place. The publisher replaces only that form with a
hosted video and refuses a link such as [Watch](clip.mp4). See
Choose a readable layout.
Review and publish
Review every final screenshot and the complete motion evidence with sampled frames. State what the available tools actually let you inspect; a sheet or frame count alone does not prove smooth motion or absence of a brief disclosure. Re-record when moving sensitive content cannot be safely redacted. Local review sheets and previews stay local unless explicitly requested as published evidence.
An invocation to attach evidence to a specified PR or issue authorizes capture, preparation, uploads, and that target update. Use a destination already established in the conversation without requesting approval again. Local preview requests authorize preparation only. Ask only for a missing destination or a specific sensitive disclosure decision that cannot be resolved by sanitizing the evidence.
Read publishing.md for supported markup, upload behavior, managed blocks, and failure recovery. Name the GitHub repository explicitly, even when publishing from a worktree:
node "<skill-root>/scripts/preflight.mjs" --publish
node "<skill-root>/scripts/publish.mjs" --repo owner/project \
--target pr:123 --section "$EVIDENCE_DIR/section.md" --dry-run
node "<skill-root>/scripts/publish.mjs" --repo owner/project \
--target pr:123 --section "$EVIDENCE_DIR/section.md"
Completion requires reviewed outputs and authenticated readback confirming every intended hosted reference on the target. Saved references do not establish browser rendering. Qualify a new video publishing path through real playback when practical; signed-in browser inspection is not a routine publication gate.
If later commits change the captured UI, run manifest.mjs status when a
manifest exists, refresh only stale or unresolved evidence, and replace the
managed block. Without a manifest, refresh the affected assets and note the
captured revision and dirty state. Leave unaffected evidence intact.
04 同仓库更多 Skills
flow-walk
Fresh-eyes walk of one user flow in the running app, judging ease: friction, copy weight, confusing hierarchy and what can be removed. Use before code review when a change alters what a user sees or decides, and when asked to "walk this flow", "try this as a user" or get "fresh eyes" on a screen. The builder hands one user goal to a tester who knows nothing about the change, then sorts the report. It takes no acceptance criteria and keeps no run folder, only the report; checking acceptance criteria against requirements with retained evidence is the uat skill's job, and correctness belongs to tests and code review.
wrong
Wrong name fixture.
sample
Sample skill for a fixture.
sample
Sample skill for a fixture.
sample
Sample skill for a fixture.
sample
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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