agentleFS
hristo2612hristo2612/jinn/.claude/skills/showcase-video-capture/SKILL.md

showcase-video-capture

Skill320 starsChanged 6 months agoMITView on GitHub

Create polished Jinn product showcase videos, GIFs, and README demo assets from isolated mock or sandbox instances. Use when asked to record a Jinn web UI walkthrough, update the README showcase GIF, build a mock gateway or clean test instance, script UI animations, capture Playwright video, convert WebM to MP4/GIF, or document video-capture gotchas for the Jinn platform.

  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

29 rules. About 0 are common, 17 are distinctive, and 12 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill to produce deterministic Jinn showcase media without touching a live operator instance.

    line 8
  2. Very specific:

    Keep the live gateway safe.

    line 12
  3. Distinctive:

    Prefer a mock gateway for README/demo captures.

    line 13
  4. Distinctive:

    Keep all committed fixtures generic.

    line 14
  5. Distinctive:

    Create an isolated capture sandbox.

    line 23
  6. Very specific:

    Use a separate directory such as /tmp/jinn-showcase-* or a repo-external scratch directory.

    line 24
  7. Very specific:

    Use a non-live port such as 7788.

    line 25
  8. Distinctive:

    Verify the port is free before and after:

    line 26
  9. Distinctive:

    Do not run against the live gateway unless the user specifically requests it.

    line 30
  10. Very specific:

    Add a manual trigger endpoint for the demo stream, for example /api/showcase/start-demo, so navigation can happen first and the chat stream …

    line 36
  11. Very specific:

    Use @playwright/test from the repo if plain playwright is not installed.

    line 39
  12. Very specific:

    Run node --check on scripts.

    line 45
  13. Distinctive:

    Run the recorder end to end.

    line 46
  14. Very specific:

    Check ffprobe dimensions and duration.

    line 47
  15. Distinctive:

    Do not auto-start the stream on WebSocket connection if the chat is not the first scene.

    line 85
  16. Very specific:

    Add a route such as GET /api/showcase/start-demo that schedules the stream only when the recorder is on the chat scene.

    line 86
  17. Distinctive:

    Keep mock data plausible and generic.

    line 88
  18. Distinctive:

    Use Playwright to drive the real UI, not screenshots stitched by hand.

    line 99
  19. Very specific:

    Use a finally block to close the browser and kill the mock gateway.

    line 125
  20. Distinctive:

    Add a small in-page cursor overlay if the UI interactions need to read clearly in the final GIF.

    line 126
  21. Distinctive:

    Wait for meaningful UI structure, not only navigation:

    line 134
  22. Distinctive:

    Use fewer scenes and let each one breathe.

    line 144
  23. Distinctive:

    Keep the org readable. 11 specialists plus one executive works well at desktop scale.

    line 150
  24. Distinctive:

    Do not put chat first if the user wants chat last.

    line 162
  25. Distinctive:

    When the user asks to replace the existing showcase:

    line 219
  26. Very specific:

    Run the public-repo leak grep from the Jinn platform instructions.

    line 238
  27. Distinctive:

    Commit without co-author trailers:

    line 240
  28. Distinctive:

    Leave raw videos, alternate GIFs, and recorder scripts out of the commit unless asked.

    line 246
  29. Very specific:

    Port conflict: Check and free the sandbox port before recording.

    line 266

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Showcase Video Capture

Use this skill to produce deterministic Jinn showcase media without touching a live operator instance. The goal is a short, readable product story: a believable org, visible work state, live chat streaming, and a clean final GIF/MP4 suitable for GitHub.

Core Rules

  • Keep the live gateway safe. Do not use port 7777 or the operator's real ~/.jinn unless the user explicitly asks for live-instance work.
  • Prefer a mock gateway for README/demo captures. It is deterministic, fast, and avoids real engines, connectors, credentials, sessions, cron, and private data.
  • Keep all committed fixtures generic. Do not commit personal paths, private project names, real customer data, tokens, or machine-specific paths.
  • Stage only the intended media asset when replacing the README GIF. Leave capture scripts, raw videos, and scratch outputs untracked unless the user asks to keep them.
  • Make the video feel like the product, not a landing page. Show the actual UI, real navigation, plausible session state, and a live streamed final answer.

Recommended Flow

  1. Confirm the target asset and story.
    • README asset is usually assets/jinn-showcase.gif.
  2. Create an isolated capture sandbox.
    • Use a separate directory such as /tmp/jinn-showcase-* or a repo-external scratch directory.
    • Use a non-live port such as 7788.
    • Verify the port is free before and after:
      lsof -nP -iTCP:7788 -sTCP:LISTEN || true
    • Do not run against the live gateway unless the user specifically requests it.
  3. Build a mock gateway for deterministic captures.
    • Serve the built web bundle from packages/jinn/dist/web.
    • Implement just enough API surface for the UI path being captured.
    • Provide mock WebSocket events for chat streaming.
    • Add a manual trigger endpoint for the demo stream, for example /api/showcase/start-demo, so navigation can happen first and the chat stream can be last.
  4. Script the capture with Playwright.
    • Use @playwright/test from the repo if plain playwright is not installed.
    • Record at 1280x720 for MP4.
    • Export GIF at 960x540, 12 fps, with a generated palette.
    • Capture stills for visual QA at representative timestamps.
  5. Validate before handing off.
    • Run node --check on scripts.
    • Run the recorder end to end.
    • Check ffprobe dimensions and duration.
    • Inspect still frames with the local image viewer.
    • Confirm no browser console errors were captured.
    • Confirm the sandbox port is no longer listening.

Mock Gateway Pattern

For a capture-only sandbox, a small Node server is usually enough:

  • Static files:
    • Serve packages/jinn/dist/web.
    • Fallback unknown paths to index.html so client routes load.
  • REST endpoints commonly needed by the web UI:
    • GET /api/status
    • GET /api/instances
    • GET /api/onboarding
    • GET /api/config
    • GET /api/engines
    • GET /api/engine-limits
    • GET /api/sessions
    • GET /api/sessions/:id
    • GET /api/sessions/:id/children
    • GET /api/sessions/:id/queue
    • GET /api/org
    • GET /api/org/employees/:name
    • GET /api/org/departments/:name/board
    • GET /api/cron
    • GET /api/logs
    • GET /api/stt/status
    • GET /api/talk/status
  • WebSocket:
    • Accept /ws.
    • Reply to ping with pong.
    • Broadcast frames as {"event":"session:delta","payload":...,"ts":...}.
  • Demo trigger:
    • Do not auto-start the stream on WebSocket connection if the chat is not the first scene.
    • Add a route such as GET /api/showcase/start-demo that schedules the stream only when the recorder is on the chat scene.

Keep mock data plausible and generic. Example org shape for a balanced 11-specialist showcase:

  • Product: Launch Lead, Research Agent, QA Agent
  • Design: Design Agent, Motion Agent, Mobile Agent
  • Growth: Growth Agent, Support Agent, Content Agent
  • Operations: Ops Lead, Cron Agent

Include an explicit executive/operator node in /api/org when the org map expects one. If the root is only named in hierarchy metadata but not included in employees, layout may degrade or fall back.

Capture Script Pattern

Use Playwright to drive the real UI, not screenshots stitched by hand.

Important setup:

const { chromium } = require("@playwright/test");

const context = await browser.newContext({
  viewport: { width: 1280, height: 720 },
  deviceScaleFactor: 1,
  colorScheme: "dark",
  recordVideo: { dir: rawVideoDir, size: { width: 1280, height: 720 } },
});

await context.addInitScript(() => {
  localStorage.clear();
  localStorage.setItem("jinn-theme", "dark");
  localStorage.setItem("jinn-sidebar-focus-mode", "all");
  localStorage.setItem("jinn-sidebar-older-expanded", "true");
});

Recording gotchas:

  • Playwright writes the raw .webm only after context.close(). Do not look for the video before closing the context.
  • Capture browser console errors during the run and write them to a file only if non-empty.
  • Use a finally block to close the browser and kill the mock gateway.
  • Add a small in-page cursor overlay if the UI interactions need to read clearly in the final GIF.

Selector gotchas:

  • Scope ambiguous labels. getByText("Design Agent") can match sidebar rows and org nodes. Prefer:
    page.locator(".react-flow__node", { hasText: "Design Agent" }).first()
  • Wait for meaningful UI structure, not only navigation:
    await page.locator(".react-flow").waitFor();
    await page.waitForFunction(
      () => document.querySelectorAll(".react-flow__node").length >= 12,
    );

Storyboarding Guidance

Use fewer scenes and let each one breathe.

Good README rhythm:

  1. Org chart, 2-4 seconds.
    • Show the operating model first.
    • Keep the org readable. 11 specialists plus one executive works well at desktop scale.
  2. Kanban, 4-6 seconds.
    • Show active work, review, done, and ownership.
    • Click or hover one high-priority card if the UI supports it.
  3. Chat, 12-16 seconds.
    • Open the main session.
    • Trigger live WebSocket deltas only after arriving on chat.
    • Stream a concise final answer that mentions the visible workstreams.
    • Optionally type a final prompt in the composer but do not send it.

Do not put chat first if the user wants chat last. The UI connects to WebSocket early, so auto-started streams will finish before the final scene. The manual trigger endpoint solves this.

Conversion Commands

Convert raw Playwright WebM to MP4:

ffmpeg -y \
  -i raw.webm \
  -vf "scale=1280:-2" \
  -movflags +faststart \
  -pix_fmt yuv420p \
  showcase.mp4

Convert raw WebM to a compact GIF:

ffmpeg -y \
  -i raw.webm \
  -vf "fps=12,scale=960:-1:flags=lanczos,palettegen=max_colors=160:reserve_transparent=0" \
  palette.png

ffmpeg -y \
  -i raw.webm \
  -i palette.png \
  -lavfi "fps=12,scale=960:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle" \
  -loop 0 \
  showcase.gif

Extract QA frames:

ffmpeg -y -ss 00:00:02 -i showcase.mp4 -frames:v 1 -update 1 frame-02.png
ffmpeg -y -ss 00:00:08 -i showcase.mp4 -frames:v 1 -update 1 frame-08.png
ffmpeg -y -ss 00:00:15 -i showcase.mp4 -frames:v 1 -update 1 frame-15.png
ffmpeg -y -ss 00:00:25 -i showcase.mp4 -frames:v 1 -update 1 frame-25.png

Probe final files:

ffprobe -v error -select_streams v:0 \
  -show_entries stream=width,height,duration,nb_frames \
  -of default=noprint_wrappers=1 \
  showcase.gif

Target sizes:

  • GIF: under 5 MB for README comfort, ideally around 3 MB.
  • MP4: keep as a review artifact even if README uses GIF.
  • Duration: 25-35 seconds is enough for a rich but skimmable showcase.

Replacing The README GIF

When the user asks to replace the existing showcase:

  1. Locate the README asset reference:
    rg -n "showcase|\\.gif|assets/" README.md packages/jinn/README.md
  2. Replace only the tracked asset:
    cp /path/to/new-showcase.gif assets/jinn-showcase.gif
  3. Stage only that file:
    git add assets/jinn-showcase.gif
    git diff --cached --stat
    git diff --cached --name-only
  4. Run the public-repo leak grep from the Jinn platform instructions. A binary-only GIF replacement should produce no textual hits.
  5. Commit without co-author trailers:
    git commit -m "docs: refresh showcase gif"
    git push origin main

Leave raw videos, alternate GIFs, and recorder scripts out of the commit unless asked. They often appear as untracked files from previous capture attempts.

Cleanup Checklist

  • lsof -nP -iTCP:<port> -sTCP:LISTEN || true shows no sandbox server.
  • Browser context is closed so Playwright flushed the video.
  • Temporary palette files are deleted.
  • output/console-errors.txt is absent or reviewed.
  • Local scratch files are either outside the repo or intentionally untracked.
  • The final answer links the GIF/MP4 paths and states what was verified.

Common Failure Modes

  • Stream finishes too early: WebSocket demo starts on first connection. Add a manual start endpoint and call it only on the final chat scene.
  • Selector clicks the wrong thing: Text labels are duplicated across sidebar, chat, and org. Scope selectors to route-specific containers.
  • No video found: The Playwright context was not closed yet.
  • GIF is too large: Lower GIF width to 960, fps to 12, and palette colors to around 160.
  • Org chart is too dense: Reduce the employee count. For README scale, 11 specialists plus the executive is a practical ceiling.
  • Org chart root missing: Include the root/executive in employees, not only in hierarchy metadata.
  • Live data leak risk: Mock all sessions, org names, cron jobs, logs, connectors, and settings with generic names.
  • Port conflict: Check and free the sandbox port before recording; never reuse 7777 for capture sandboxes.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.