record-browser-gif
Skill4 starsChanged 13 days agoMITView on GitHub
Record browser or Web UI interaction demos as optimized GIFs using the available browser-control workflow, optional Playwright Videos for higher capture frame rates, and deterministic encoding, then attach the GIF to a pull request with `gh --attach`; publication requires gh v2.99.0 or later, and a GIF over 5 MiB is split into parts. Use when asked to make, record, or generate a GIF that demonstrates a browser workflow, and for every pull request that changes product-user-visible GUI behavior, which MUST include a GIF recorded from the pull request's real server and model flow.
- Reads credentials
- Commits and pushes
17 other projects use a version of this, 13 of them edited; 12 of 12 edited versions we compared changed its rules; 1 new project in the last 4 weeks, against 0 the 4 before.
How people change it
12 of 12 edited versions changed its rules, and some changes recur.
Of the 12 edited versions we compared: 12 made changes of their own.
Rules people drop
- Only when browser control is unavailable, use the repository-declared Playwright dependency in an isolated headless browser and state that fallback in the capture notes. In this repository it resolves from
apps/web/package.json; …dropped by 6 of 12 - Before recording, identify the origin, built or development server, transport, and any mode overrides. …dropped by 5 of 12
- When switching between pull requests, stop the old server by PID or an exact match on its command line. A broad
pkill -fpattern can match and kill the shell that launched it — including your own.dropped by 1 of 12
Rules people add
- A rule we can't quote: its licence doesn't allow itadded by 11 of 12
- A rule we can't quote: its licence doesn't allow itadded by 11 of 12
- A rule we can't quote: its licence doesn't allow itadded by 11 of 12
- A rule we can't quote: its licence doesn't allow itadded by 6 of 12
- A rule we can't quote: its licence doesn't allow itadded by 5 of 12
- A rule we can't quote: its licence doesn't allow itadded by 5 of 12
- A rule we can't quote: its licence doesn't allow itadded by 5 of 12
- A rule we can't quote: its licence doesn't allow itadded by 5 of 12
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- Hejunlong27/AIAuditOxword for word, first seen Nov 29, 2026
- TeFuirnever/azhou-ai-hubtheir own version, first seen Nov 22, 2026
- tkbk-online/skillsedited, first seen Nov 15, 2026
- Fei2411/DeepSeek-Botedited, first seen Nov 8, 2026
- ZeroOnehub/aipm-workbenchedited, first seen Nov 1, 2026
- See-Sol-Lab/DeepSeekGUIedited, first seen Oct 18, 2026
Used with
Projects with it also use dsh-doc-site-sync and dsh-doc-standards.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lucaslusSkilldsh-doc-site-sync
Use when publishing, updating, moving, or removing DeepSeek Harness documentation website pages; editing website/docs.ts mappings or navigation; diagnosing a page missing from the VitePress site; fixing projected documentation links; or running the docs:dev, docs:check, and doc-sync workflow after website-content changes.
Also in 5 projects that use this
lucaslusSkilldsh-doc-standards
Use when writing, moving, reviewing, or auditing documentation in the deepseek-harness repo — choosing hierarchy and detail, separating tutorials from references, checking tutorial progression, trimming doc slop, responding to a verify-doc-budgets failure, or requests like "improve the docs", "audit the docs", "where should this be documented", or "this doc is too long".
Also in 5 projects that use this
Other versions17 projects use a version of this.
Word for word · 2
- deepseek-ai/deepseek-harness★ 289k100% same
- Hejunlong27/AIAuditOx★ 6100% same
Edited · 13
- Fei2411/DeepSeek-Bot★ 9.3k11% same
- See-Sol-Lab/DeepSeekGUI★ 27481% same
- SuperJJ007/papermachine★ 5978% same
- xinyuquan985-coder/deepseek-harness-neon★ 1741% same
- zehuichan/vibe-harness★ 358% same
- ZeroOnehub/aipm-workbench★ 279% same
- Haifai-AI/baby-whale★ 141% same
- lucaslus/dsh-desktop★ 141% same
- SparkElf/deepseek-harness-plus★ 178% same
- SuperMate-Ai/SuperMate-Harness-System★ 141% same
3 more not listed
Wrote their own version · 2
- kevinforge/orbit★ 5same name
- TeFuirnever/azhou-ai-hub★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/notes/AGENTS.mdAGENTS.md
- .agents/notes/archived/AGENTS.mdAGENTS.md
- .agents/notes/implemented/AGENTS.mdAGENTS.md
- benchmarks/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- snapshots/AGENTS.mdAGENTS.md
- vendor/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- agent-experienceSkill
- cordis-styling-nitpickingSkill
- dsh-archive-agent-notesSkill
- dsh-ci-test-reliabilitySkill
- dsh-client-ui-uxSkill
- dsh-code-reviewSkill
- dsh-create-upgrade-guideSkill
- dsh-cua-macos-signingSkill
- dsh-doc-writingSkill
- dsh-error-handlingSkill
- dsh-find-simplificationsSkill
- dsh-merging-stacked-prsSkill
- dsh-official-plugin-artworkSkill
- dsh-pr-descriptionSkill
- dsh-pre-push-checksSkill
- dsh-prose-standardSkill
- dsh-responsive-uiSkill
- dsh-session-projectionSkill
- dsh-speed-up-perfSkill
- dsh-translate-docsSkill
- dsh-trim-cot-leakageSkill
The file
We split this skill into the rules it gives an agent
7 rules. 4 are common, 1 is distinctive, and 2 are very specific to this project.
4
Common
Most of the 13 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 23
Never read or expose credential values.
- Common: line 31
Treat one storyboard as one evidence run: every published frame comes from that server and those state roots, workspace, session, and …
- Very specific: line 32
When switching between pull requests, stop the old server by PID or an exact match on its command line.
- Very specific: line 38
Only when browser control is unavailable, use the repository-declared Playwright dependency in an isolated headless browser and state that …
- Distinctive: line 40
Before recording, identify the origin, built or development server, transport, and any mode overrides.
- Common: line 109
Read the encoder's JSON summary and confirm the output path, source interval and speed (or screenshot count), encoded frame count, …
- Common: line 111
Run git status --short and confirm raw video, QA frames, and the artifact landed only under ignored paths.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Record Browser GIF
Produce a short, truthful UI demonstration as a local GIF, and — only when the task includes attaching it to a pull request — publish it through the attach workflow at the end of this skill. The available browser-control workflow remains preferred. Use Playwright Videos when that workflow supports continuous capture at higher frame rates; use the bundled encoder for trimming, playback speed, final hold, dimensions, and size.
The archived evidence-chain decision records why one storyboard comes from one isolated run and why publication revalidates both the artifact and the demonstrated pull-request head.
Every GUI pull request includes a GIF
A pull request that changes product-user-visible GUI behavior MUST include a demonstration GIF recorded with this skill and embedded in the pull request body via the attach workflow.
The recording itself is part of the evidence: use a real server booted from that pull request's branch tree, a real API key, and real model rounds. Never substitute fixture queries, mock transports, synthetic event injection, or test-only hooks unless the user explicitly asked for a fixture recording. Next to the embed, state the exact demonstrated commit SHA, the tree and origin that served it, any mode flags or browser-state exceptions, and whether a real model round ran, so reviewers know exactly what the recording proves.
Keep recording separate from publication
- Recording produces local video or screenshots; encoding produces one
.gifartifact, or its numbered parts when it exceeds the 5 MiB limit. Neither mutates remote state. - Publication — attaching the GIF to a pull request body with
gh --attach— is the separate final step, performed only when the task includes attaching the GIF to a pull request. It never commits to any branch. - Preserve the requested recording conditions. A real-server or real-API demo must not use fixture queries, mock transports, synthetic event injection, or test-only hooks. If credentials or the server are unavailable, report that limitation instead of substituting a fixture.
- Never read or expose credential values. Use the application's normal configuration path and a benign demonstration prompt.
Stage the application
A GIF for a specific pull request demonstrates that pull request's tree, so stage per pull request:
- Require a clean worktree, record its exact commit with
git rev-parse HEAD, then build that recorded tree — here,pnpm run build && pnpm run build:web. A GIF recorded against another commit's build misattributes the evidence. - Boot one server per port from that tree with fresh scratch
DSH_HOME,DSH_AGENTS_HOME, workspace, and session state. Give the browser a fresh isolated context or profile as well; if the browser workflow cannot create one, clear that origin's cookies and site storage before navigation so persisted client state cannot affect the evidence. Real API credentials can be available in~/.dsh/.credentials.yamleven whenDEEPSEEK_API_KEYand the root.envare absent. With a scratchDSH_HOME, use a recording overlay to set thedsh-credentials-localprovider'spathto that existing file's absolute path. Let the application's normal credential provider resolve the key; never echo it. - Treat one storyboard as one evidence run: every published frame comes from that server and those state roots, workspace, session, and model-backed scenario run. If capture automation fails, discard its frames and rerun from fresh roots; never splice frames from separate runs.
- When switching between pull requests, stop the old server by PID or an exact match on its command line. A broad
pkill -fpattern can match and kill the shell that launched it — including your own.
Record the flow
Follow the available browser-control workflow's setup, interaction, and cleanup instructions. When it exposes recordVideo, enable video on the same controlled context to capture more intermediate frames. Otherwise use screenshot capture within that workflow; video availability does not determine which browser-control workflow to use. Existing user browser state remains an explicit isolation exception.
Only when browser control is unavailable, use the repository-declared Playwright dependency in an isolated headless browser and state that fallback in the capture notes. In this repository it resolves from apps/web/package.json; do not install another driver or open the user's browser.
Before recording, identify the origin, built or development server, transport, and any mode overrides. When a production default opens a native surface that automation cannot drive, select an official browser-operable production backend through normal application configuration and disclose the override.
Store the script, raw video, timing notes, QA frames, and GIF under the repository's gitignored .playwright-mcp/ directory. Create the run directory first.
Capture video
Match viewport and recordVideo.size explicitly: Playwright otherwise scales the video down to fit 800×800, which can make UI text unreadable.
Configure video through the chosen browser-control workflow. The standalone Playwright fallback uses:
const { chromium } = createRequire(join(repo, 'apps/web/package.json'))('playwright')
const browser = await chromium.launch()
const size = { width: 1440, height: 900 }
const context = await browser.newContext({
viewport: size,
recordVideo: { dir: join(runDir, 'videos'), size },
})
try {
const page = await context.newPage()
const video = page.video()
// Navigate and exercise the real application here.
await context.close()
await video.saveAs(join(runDir, 'demo.webm'))
} finally {
await context.close()
await browser.close()
}Import createRequire from node:module and join from node:path; set repo and a fresh runDir to absolute paths in the recording script. Retain the page's video handle before closing it. Await context.close() before video.saveAs() or encoding; closing only the browser does not guarantee the video's flush. Each page has its own video: choose the demonstrated page explicitly and do not concatenate unrelated pages or runs. Failed runs are diagnostic only.
Choose a short story with three to six meaningful states. Wait for unique semantic locators before acting; use exact: true for accessible-name equality and exact-text completion predicates that cannot match a prompt echo. Fixed waits may provide a reading hold after the state is verified, but never establish readiness. When capturing video, preserve animations and scrolling.
When demonstrating a tool call, rejection, or recovery, open its detail or trajectory so the video shows the tool identity, status or stable error code, and downstream result. If a transient running state matters, prompt for a slow foreground operation and observe its concrete DOM marker; continuous video captures its intermediate frames. Give the model a short final sentinel to anchor completion. Stop an unnecessarily long real-API run after the demonstrated state is visible.
Capture no secrets, personal data, unrelated tabs, or notifications. Browser video contains page content, not browser chrome; avoid rendering credential-bearing URLs in the application. Review the whole selected interval, including intermediate states. Keep one viewport throughout.
Encode the GIF
Require python3, ffmpeg, and ffprobe. If a media binary is missing, report the dependency instead of installing software without authorization. Export GIF_SKILL_DIR on its own line before using it; an inline assignment cannot affect argument expansion in the same command.
export GIF_SKILL_DIR=/absolute/path/to/this/skill
python3 "$GIF_SKILL_DIR/scripts/encode_gif.py" \
/absolute/path/to/demo.webm \
/absolute/path/to/demo.gif \
--start 2 --end 32 --speed 2 --final-hold 3 \
--fps 10 --max-width 1200 --colors 128--start and --end select one continuous source interval in seconds. Defaults retain the full video at 1× speed and add a two-second final hold. --speed changes playback speed; disclose it and the selected interval beside the GIF so the demo cannot imply measured response latency. Use observed video times, not guessed wall-clock offsets, and preserve the complete cause and outcome of the demonstrated behavior. The final hold repeats the last selected frame. --fps sets the encoded GIF frame rate; increasing it cannot recover motion that the source recording did not capture. Keep the original WebM for QA; do not splice separate runs or synthesize missing states.
The encoder probes WebM container duration, applies trim and speed before palette conversion, and checks encoded duration, animation, width, and byte size. It refuses an empty or out-of-range interval, a selection shorter than two output frames, mode-inappropriate flags, and accidental overwrite. Reduce --max-width, then --colors or --fps for a large artifact; preserve readable text. Use --force only after resolving the exact output path.
Screenshot capture
When continuous video is unavailable or the user requests a storyboard, follow the available browser-control workflow. Capture three to six verified states from one isolated run with the browser's screenshot API. Save returned image bytes directly under one run directory as 00-initial.png, 01-typed.png, and so on; use identical dimensions and crop. For a transient state, poll its DOM marker and capture within the same browser-script call.
python3 "$GIF_SKILL_DIR/scripts/encode_gif.py" \
/absolute/path/to/frames /absolute/path/to/demo.gif \
--durations 1.5,1.5,1.5,3.5 --fps 10 --max-width 1200 --colors 128One duration applies to every screenshot; otherwise supply one positive duration per frame and hold the settled state longest. Directory input rejects fewer than two frames and mismatched dimensions or duration counts. Video timing flags apply only to video files; --durations and --pattern apply only to screenshot directories.
Verify the artifact
- Read the encoder's JSON summary and confirm the output path, source interval and speed (or screenshot count), encoded frame count, dimensions, duration, and byte size.
- Visually read the encoded GIF itself, not only the source frames. Confirm that the transition is legible, the last state is held long enough, and no sensitive content appears. If the viewer renders only the first frame, decode representative frames from the encoded GIF with
ffmpegand inspect those; the pre-encode screenshots do not prove the encoded order, palette, or final hold. - Run
git status --shortand confirm raw video, QA frames, and the artifact landed only under ignored paths. - Return the absolute GIF path, render it when the client supports local media, and state whether the recording used a real API, fixture, or another transport. When the task does not include attaching the GIF to a pull request, stop here.
Encoder maintenance: run python3 -m unittest discover -s "$GIF_SKILL_DIR/scripts" -p 'test_*.py' -v with the media prerequisites installed. These local media tests do not run in repository CI.
Publish the GIF
Perform this step only when the task includes attaching the GIF to a pull request.
Never commit a GIF to the pull request's own branch or any other branch: every default clone and full-history fetch of the repository downloads media committed to any branch. Publish only with gh --attach, which uploads the GIF to GitHub and rewrites the body reference in one command, so no branch carries the media.
Attach with gh
Before attaching, check gh --version. gh --attach requires gh v2.99.0 or later, a repository on github.com — GitHub Enterprise Server is not supported — and write access to the repository. When gh is older than v2.99.0, stop and tell the developer to upgrade gh to v2.99.0 or later; keep the verified GIF for the retry, and do not install or upgrade gh without authorization. When any other requirement is unmet or the attach fails — authentication, write access, a repository outside github.com, or an upload error — stop and report it to the developer. Never publish the GIF any other way.
Publish GIFs at or below 5 MiB, the encoder's default --max-bytes. When the encoder rejects the output for size, shrink it with --max-width, then --colors or --fps. When the GIF still exceeds 5 MiB at readable text quality, split it instead: encode consecutive, non-overlapping intervals of the same evidence run into numbered parts that each pass the encoder's size check — --start and --end over the one video, or consecutive screenshot subsets selected with --pattern — and verify every part as an artifact. Beside each embed, state its position (such as 2/3) and its source interval or frames.
Write each GIF into the body file as an ordinary local-path reference, using the same path passed to --attach; gh rewrites each reference in place to its uploaded URL, keeping its position and alt text, so the order of references in the body sets the display order of split parts:
The demonstrated pull request is normally the publication target. A tooling pull request may instead embed a clearly labeled example from another pull request; name that source PR and compare its live head in every check below. Never attribute the example to the tooling branch.
Immediately before attaching, re-read the demonstrated pull request's live head — for a new demonstrated pull request, the pushed branch tip — and compare it with the commit recorded next to the GIF. Stop and re-record when it moved. Then attach:
gh pr create --body-file <body.md> --attach <path/to/demo.gif> # new pull request
gh pr edit <pr> --body-file <body.md> --attach <path/to/demo.gif> # existing pull request--attach is repeatable but refuses the same file twice. Publish split parts in one gh pr create or gh pr edit with one --attach per part, so a single pair of live-head checks covers every part. A GIF the body does not reference is appended at the end, where alt text set on the flag (--attach '<path>#<alt text>') applies; a rewritten reference keeps the body's alt text. After attaching, re-read the demonstrated live head and require it to remain at that recorded commit. Re-read the live body and confirm the reference now points at the uploaded URL, render the body through GitHub's Markdown API and confirm the expected <img>, and fetch the uploaded URL once to confirm 200 and image/gif.
Existing assets branches
Earlier pull request bodies embed GIFs from orphan *-assets branches in this repository. Never add to, delete, rewrite, or force-push them: merged pull request bodies reference their URLs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

