Record browser or Web UI interaction demos as optimized GIFs using the available built-in browser, state-based frame capture, and deterministic encoding, then publish to a dedicated assets branch when the task includes attaching the GIF to a pull request. 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.
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
The canonical home for this skill is record-browser-gif in river666/deepseek-harness-enterprise
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 assets-branch workflow at the end of this skill. Use the browser-control skill for interaction and the bundled encoder for repeatable timing, dimensions, and size.
The evidence-chain decision owns why one storyboard comes from one isolated run and why publication revalidates both the artifact and the demonstrated pull-request head.
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 assets-branch 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.
.gif artifact only; it never mutates remote state.A GIF for a specific pull request demonstrates that pull request's tree, so stage per pull request:
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.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. Source the root .env for the API key through the application's normal path; never echo the key.pkill -f pattern can match and kill the shell that launched it — including your own.00-initial.png, 01-typed.png, and so on..playwright-mcp/ directory — browser-tool screenshots can only be written under the tool's allowed roots, and relative filenames resolve against the repository root. Create the frame subdirectory first (mkdir -p .playwright-mcp/gif-frames-<label>); writing into a missing directory fails with ENOENT at capture time.exact: true when equality is intended because descendant text or a prompt echo can otherwise create a false match. Do not use a fixed delay as proof that the application reached the state.body.textContent.includes(...), which the echo of the user's own prompt also satisfies.sleep 15 bash command — and polling a concrete DOM marker (a data-* attribute) inside one browser-script call that also takes the screenshot. State polled across separate tool calls is lost, because the turn settles between calls.Use the browser's own screenshot API. When it returns image bytes, save those bytes directly; the encoder detects image content independently of the filename extension.
Require python3, ffmpeg, and ffprobe. If either media binary is missing, report the dependency instead of installing software without authorization.
Export GIF_SKILL_DIR as this skill's absolute directory on its own line before the python command — an inline GIF_SKILL_DIR=... python3 "$GIF_SKILL_DIR/..." assignment fails, because the argument expands before the assignment takes effect:
export GIF_SKILL_DIR=/absolute/path/to/this/skill
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 frame; otherwise provide one comma-separated positive duration per frame, holding the final settled state longest. The encoder rejects fewer than two frames, mismatched dimensions or durations, invalid limits, accidental overwrite, unexpected duration, and output above --max-bytes.
For a large artifact, reduce --max-width first, then --colors or --fps; retain readable text and the final state long enough to inspect. Use --force only after resolving the exact output path.
ffmpeg and inspect those; the pre-encode screenshots do not prove the encoded order, palette, or final hold.git status --short and confirm frames and the artifact landed only under ignored paths.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 branch that merges into a long-lived branch: binary media committed there bloats the repository history for every future clone. GIFs live on a dedicated orphan assets branch — a branch with no parent commit and nothing but media — and one assets branch serves a whole pull request series (named <series>-assets; list existing ones with git ls-remote --heads origin '*assets*').
Before either workflow below pushes, verify that the assets branch contains media only and that the staged GIF's checksum matches the verified local artifact.
For an existing assets branch, work in a shallow single-branch scratch clone so the publication cannot touch your working tree:
git clone --branch <assets-branch> --single-branch --depth 1 <repo-url> /tmp/assets-checkout
cp /absolute/path/to/demo.gif /tmp/assets-checkout/<name>.gif
cd /tmp/assets-checkout
git add <name>.gif
git commit -m "assets: <what it shows> gif (#<pr>)"
git push origin <assets-branch>For a new series, make a fresh shallow scratch clone (git clone --depth 1 <repo-url> /tmp/assets-checkout), create the orphan branch with git switch --orphan <assets-branch>, then add the GIF, commit, and push the same way.
After pushing, use authenticated GitHub API or raw requests to confirm the remote path, byte size, checksum, 200 response, and image/gif content type. An anonymous 404 does not disprove a private-repository asset; authenticate the verification instead. This proves the repository-member review path, not public availability.
Immediately before editing the pull-request body, re-read its live head and compare it with the commit recorded next to the GIF. Stop and re-record when it moved. After the edit, re-read the live head and require it to remain at that recorded commit. Separately, render the body through GitHub's Markdown API and confirm that the expected <img> is present.
Embed the GIF in the pull request body with the raw blob URL; the ?raw=true suffix is required, because the plain blob URL renders GitHub's file page instead of the image:
Never delete or rewrite an assets branch, and never force-push it: merged pull request bodies reference its URLs forever. Append new commits only.
river666/deepseek-harness-enterprise
54e2a39
Canonical home
since Nov 11, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.