Логотип Browser Video Proof

Browser Video Proof

Спільнота
ahmadrosid
browser-video-proof

Produce H.264 MP4 browser video proof for a UI fix, upload it to GitHub user-attachments, and put the URL in a PR description. Use for scroll/ layout/interaction proofs (e.g. /automations expanded-run scrolling), recorded E2E demos, or when a reviewer needs visual evidence on a PR.

Огляд

Видавецьahmadrosid
Репозиторійnakama
Назва навичкиbrowser-video-proof
Зірки
492
Форки
91
Файли в пакеті
Лише інструкції
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: ahmadrosid. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Browser Video Proof у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/ahmadrosid/nakama/tree/main/.agents/skills/browser-video-proof
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ahmadrosid/nakama.git /tmp/nakama
mkdir -p .claude/skills
cp -r /tmp/nakama/.agents/skills/browser-video-proof .claude/skills/browser-video-proof
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Browser Video Proof в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Browser Video Proof, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Browser Video Proof не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Browser video proof for PRs

Record a short, playable browser video that proves a UI fix, attach it to the PR description, and verify the live body. Do not change application code for the recording unless the user explicitly asks.

Reference run: PR #723 (/automations expanded long-run scroll).

Prerequisites

  • gh authenticated with push access to the target repo
  • Bun + repo deps installed in the worktree (bun install)
  • Google Chrome (or Chromium) on the host
  • ffmpeg on PATH (for webm → H.264 MP4)
  • Playwright in an isolated dir under /tmp (do not add it to the repo):
bash
mkdir -p /tmp/<run>/playwright
cd /tmp/<run>/playwright
npm i playwright
npx playwright install ffmpeg

Process

1. Isolate with a git worktree

Keep the main checkout clean.

bash
cd "$(git rev-parse --show-toplevel)"
git fetch origin main
git worktree add -b <branch> .worktrees/<slug> origin/main   # or attach to the fix branch
cd .worktrees/<slug>

Work only inside that worktree for servers and recording.

2. Inspect fixtures and UI first

Before inventing data:

  1. Read the page under test (labels, expand controls, scroll containers).
  2. Check existing test fixtures / factories for the same feature.
  3. Prefer seeding via the public HTTP API. Fall back to a one-off SQLite insert in an isolated NAKAMA_CONFIG_DIR only when no API can create the needed row (e.g. a completed automation run with huge output).

3. Seed deterministic tall content

For scroll / overflow proofs, the fixture must be taller than the pane.

  • Put a unique top marker near the start: SCROLL_PROOF_MARKER_TOP
  • Put a unique bottom marker at the end: SCROLL_PROOF_MARKER_BOTTOM
  • Use enough body text that scrollHeight - clientHeight is large (thousands of px)

Example shape for run output:

markdown
# SCROLL_PROOF_MARKER_TOP — long automation run output

## Section 1
...

## Section 80
...

# SCROLL_PROOF_MARKER_BOTTOM — end of tall content

Never seed into the operator's real ~/.nakama data. Always use a fresh NAKAMA_CONFIG_DIR under /tmp/<run>/.

4. Start isolated local servers

Pick free ports. Do not steal the default stack if something already listens on 4310 / 3000 / 3003.

bash
RUN=/tmp/<run>
API_PORT=4330
WEB_PORT=3014
mkdir -p "$RUN/nakama-data" "$RUN/logs"

# Keep processes alive after the shell exits (plain nohup ... & dies here)
setsid nohup env NAKAMA_CONFIG_DIR="$RUN/nakama-data" NAKAMA_PORT=$API_PORT \
  bun run apps/server/src/index.ts \
  >"$RUN/logs/server.log" 2>&1 < /dev/null &

setsid nohup env VITE_API_URL="http://127.0.0.1:${API_PORT}" \
  bun run --cwd apps/web dev -- --host 127.0.0.1 --port $WEB_PORT \
  >"$RUN/logs/web.log" 2>&1 < /dev/null &

Wait until curl -sf http://127.0.0.1:$API_PORT/health succeeds and the web origin responds. Fresh setup: POST /v1/auth/setup, then create provider / profile / automation (or reuse fixtures) with Cookie + X-CSRF-Token + X-Org-Id.

5. Record with Playwright (H.264 MP4)

Scaffold the recorder under /tmp/<run>/ only. Never commit it.

js
const browser = await chromium.launch({
  channel: "chrome", // if Chrome is installed
  headless: false,
  args: ["--disable-gpu"],
});
const context = await browser.newContext({
  viewport: { width: 1440, height: 900 },
  recordVideo: { dir: rawDir, size: { width: 1440, height: 900 } },
});

Rules:

  1. Drive the real UI path under test (role/text locators).
  2. Make motion visible — mouse wheel or stepped scroll, not a single invisible jump only.
  3. Assert scroll moved (scrollTop delta) and that the bottom marker becomes reachable.
  4. Capture page.video()?.path() before context.close().
  5. Convert: ffmpeg -y -i in.webm -c:v libx264 -pix_fmt yuv420p out.mp4
  6. Write results.json + before/after screenshots under artifacts/e2e-<id>/.

WebM alone is not enough for GitHub playback. Ship H.264 + yuv420p.

6. Validate the video before claiming anything

bash
ffprobe -v error -show_entries stream=codec_name,width,height \
  -show_entries format=duration -of json out.mp4
# Extract early / late frames and look at them
ffmpeg -y -ss 00:00:02 -i out.mp4 -vframes 1 frame-early.png
ffmpeg -y -ss 00:00:08 -i out.mp4 -vframes 1 frame-late.png

Pass only if:

  • codec is h264
  • duration is long enough to see the interaction
  • early frame shows the start state (e.g. top marker / expanded pane)
  • late frame shows scroll progress (bottom marker or advanced sections)
  • results.json reports a real scrollTop delta (or equivalent proof metric)

7. Upload to GitHub user-attachments

Undocumented but token-auth works for images/video when you have push access:

bash
TOKEN=$(gh auth token)
REPO_ID=$(gh api repos/<owner>/<repo> --jq .id)
MP4=artifacts/e2e-<id>/<name>.mp4

UPLOAD_JSON=$(curl -sS -X POST \
  "https://uploads.github.com/user-attachments/assets?name=$(basename "$MP4")&repository_id=${REPO_ID}" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: video/mp4" \
  -H "Accept: application/vnd.github+json" \
  --data-binary @"${MP4}")

VIDEO_URL=$(printf '%s' "$UPLOAD_JSON" | bun -e 'console.log(JSON.parse(await Bun.stdin.text()).url)')
echo "$VIDEO_URL"  # https://github.com/user-attachments/assets/<uuid>

Save the URL. Confirm a HEAD/GET on the asset returns a video content type.

8. Update the PR description

Add a short Browser proof section with the steps shown and the bare https://github.com/user-attachments/assets/... URL on its own line (GitHub embeds the player). Prefer writing the body via a file:

bash
gh api repos/<owner>/<repo>/pulls/<n> --method PATCH --input body.json
# or: gh pr edit <n> --body-file /tmp/pr-body.md

Follow .agents/skills/adhd-pr-description/SKILL.md for the rest of the body.

9. Verify the live PR body

bash
gh api repos/<owner>/<repo>/pulls/<n> --jq .body | rg 'user-attachments/assets/<uuid>|Browser proof'

Do not report success until this check passes.

Example: automations expanded-run scroll

  1. Worktree on the fix branch (or docs-only branch for this skill).
  2. Isolated API 4330 + web 3014, fresh NAKAMA_CONFIG_DIR.
  3. POST /v1/auth/setup → provider → create automation Long output digester.
  4. Insert/complete one run whose output is the long markdown with SCROLL_PROOF_MARKER_TOP / SCROLL_PROOF_MARKER_BOTTOM.
  5. Playwright: open /automations → select the automation → Expand run → wheel-scroll the detail pane until the bottom marker is in view.
  6. Convert to H.264 MP4, inspect frames, upload, patch PR body, verify.

Cleanup

  1. Kill the isolated API/web listeners on the ports you chose.
  2. Leave /tmp/<run>/ and profile artifacts/e2e-<id>/ as local evidence (do not commit videos or recorder scripts).
  3. Remove the worktree when the branch is merged or abandoned: git worktree remove .worktrees/<slug>

Honesty rules

  1. Never claim browser proof without watching frames or ffprobe + screenshots.
  2. Never paste a user-attachments URL you did not upload and re-fetch from the live PR body.
  3. Never treat a green unit test as a substitute for the video when the ask was visual proof.
  4. If scroll did not move, markers are wrong, or the MP4 is empty/corrupt — say it failed. Do not soften.
  5. Do not modify application code “to make the video easier” unless the user asked for a product fix.
  6. Do not touch the operator’s real Nakama config dir.

Поширені запитання

Що робить навичка ШІ Browser Video Proof?

Produce H.264 MP4 browser video proof for a UI fix, upload it to GitHub user-attachments, and put the URL in a PR description. Use for scroll/ layout/interaction proofs (e.g. /automations expanded-run scrolling), recorded E2E demos, or when a reviewer needs visual evidence on a PR.

Навіщо використовувати Browser Video Proof у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Browser Video Proof — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Browser Video Proof у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/ahmadrosid/nakama/tree/main/.agents/skills/browser-video-proof. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Browser Video Proof?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Browser Video Proof?

Зі скількома забажаєте. У TypingMind ви можете використовувати Browser Video Proof із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Browser Video Proof?

Так. На GitHub цю навичку публікує ahmadrosid за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇