en un clic
sam-create-task-demo-video
// Create human-readable task demo videos with Playwright, always convert to MP4, validate playback, upload to GitHub or GitLab, and comment on the PR or MR by default.
// Create human-readable task demo videos with Playwright, always convert to MP4, validate playback, upload to GitHub or GitLab, and comment on the PR or MR by default.
| name | sam-create-task-demo-video |
| description | Create human-readable task demo videos with Playwright, always convert to MP4, validate playback, upload to GitHub or GitLab, and comment on the PR or MR by default. |
Use this skill when the user asks for a human presentation video of a task, feature, regression, or bug fix working from beginning to end.
This skill is for a demo video, not a fast automated test recording. Use Playwright as the camera and browser controller, but optimize the result for human review.
You are a senior QA automation engineer and product-minded software engineer.
Create a clear visual walkthrough that demonstrates the task or bug fix in the same surface a human reviewer would use. The final artifact must be an .mp4 video unless the user explicitly cancels the video request.
.mp4, even when the raw recording is .webm..mp4 opens and shows the intended flow..mp4 and comment on the GitHub PR or GitLab MR by default when a PR or MR can be resolved.Identify the user-visible behavior that must be demonstrated:
If the task involves a bug fix, prefer a before/after structure only when a before state is available without unsafe rollback or extra implementation work. Otherwise, show the corrected behavior and clearly state that the demo proves the fixed state only.
Inspect the repository and current branch to determine:
Use gh for GitHub repositories and glab for GitLab repositories. If the user provided a full PR/MR URL, resolve the platform and target repo from that URL instead of assuming the current checkout.
If Docker, direct startup, port/config changes, linked-service startup, or real dev data access is blocked, record every attempted path and the exact blocker before using the closest safe runnable local/dev environment.
Before recording, create a short script for the video:
Keep the script concrete and reviewer-oriented. Avoid implementation-only language in the video unless the task itself is developer-facing.
Start the app, link UI and backend when the flow crosses that boundary, and record the flow locally with Playwright or the project's equivalent browser automation setup.
If the flow crosses frontend/backend boundaries and those services are not in a single monorepo, start or verify both directly or through Docker/container workflows, configure the frontend to call the local/dev backend, adjust local ports/config as needed, and record only after the linked stack is reachable from the browser.
Recording requirements:
Temporary captions or overlays are allowed if they are injected only in the browser session and do not modify repository files. Captions should label steps, not explain internal implementation.
The final video artifact must be .mp4.
If Playwright creates .webm, convert it to .mp4 with the locally available video toolchain, such as ffmpeg, using a broadly compatible codec. Do not treat .webm as the deliverable.
Name the final file clearly, for example:
.artifacts/demo-videos/<task-or-branch>-demo.mp4playwright-report/<task-or-branch>-demo.mp4If conversion fails, report the exact blocker and keep the raw recording only as diagnostic evidence. Do not upload the raw file as the final demo unless the user explicitly approves the fallback.
Before uploading or reporting completion:
.mp4 to confirm it plays.Do not claim a successful demo video until the .mp4 playback has been verified.
When a PR or MR can be resolved, upload every safe relevant .mp4 and add a
comment by default. This is mandatory for all task demo videos unless upload is
blocked by platform or auth limitations.
GitHub:
gh to find the PR for the current branch when no PR URL is provided..mp4 using the best available GitHub attachment path.gh setup, use an available gh extension or helper that creates GitHub user attachments.https://github.com/user-attachments/assets/<id> URL alone on
its own paragraph with a blank line before and after it. Do not wrap GitHub
user-attachment video URLs in Markdown link or image syntax.gh or gh api and confirm every uploaded
video is present in that raw URL format, not a local path or committed artifact
path.GitLab:
glab to find the MR for the current branch when no MR URL is provided..mp4 with the GitLab Markdown Uploads API through
glab api.markdown field returned by the GitLab upload
response for each video. Do not manually build GitLab upload URLs from url,
full_path, project ids, repository paths, /raw/..., or committed artifact
paths.glab api and confirm every video appears as
.mp4 Markdown using /uploads/..., exactly from the upload response.If upload or commenting is blocked for any safe relevant video, do not fail
silently. Report the exact blocker, the local .mp4 path, the attempted command,
and any command or auth issue that prevented upload.
Never commit video files to the repository unless the user explicitly asks for versioned video artifacts.
Use a concise comment like this:
## Task demo video
Recorded a human-paced demo of the requested task/fix.
- Scenario: <what the video demonstrates>
- Environment: <local/dev/staging and URL if safe>
- Validation: playback verified; final state shows <proof moment>
- Video: <GitHub raw user-attachments URL, or GitLab exact upload markdown>
Limitations: <none, or exact limitation>
Keep the wording honest. Do not say the task has full automated coverage unless automated tests were also implemented and passed.
At the end, report only the useful evidence:
.mp4 path.If the user requested the strongest possible proof, include the app environment and exact flow covered, but keep the summary short.
Run a strategy-confidence loop that finds loopholes, proposes fixes, applies strict maintainability pressure, and repeats until the strategy is factually defensible.
Run a rigorous local code review in the current workspace and return the review in Codex only, including strict maintainability and structural simplification checks. Use when asked to review, audit, inspect, approve, or request changes for local code, a local branch, uncommitted changes, staged changes, a commit range, or specific files without publishing comments to GitHub/GitLab.
Run a rigorous end-to-end GitHub or GitLab PR/MR review and publish it back to the platform, including strict maintainability and structural simplification checks. Use when asked to review, audit, approve, request changes, or comment on a pull request or merge request with strict checks for tests, architecture layers, security, authorization, migrations, performance, accessibility, CI evidence, and review publication.
Run a post-task simplification loop that reviews completed work, removes unnecessary complexity with strict maintainability pressure, and proves behavior stayed correct.
Create comprehensive E2E tests for impacted user flows and edge cases, including Playwright video evidence and PR attachment when requested.
Run a complete autonomous feature-delivery workflow with requirement discovery, existing-code and business-rule analysis, user clarification for unresolved questions, strategy refinement before tests, TDD implementation, validation, and PR/MR evidence when applicable.