К основному содержанию
скилл CX Codex

live-preview — скилл для Claude Code: что делает и как установить

Скилл live-preview делает скриншоты компонентов в процессе сборки, а не по готовности. Ловит регрессии вёрстки и невидимые блоки до того, как они уйдут дальше.

MIT ★ 937 обновлён 2026-10-29

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local
Открыть на GitHub

Что делает live-preview

Скилл запускается по триггерам (preview, screenshot, visual check) или вручную. Проверяет, какие файлы .tsx, .jsx, .vue, .svelte или .html изменились, определяет их маршруты, запускает dev-сервер и снимает скриншоты через Playwright (npx playwright screenshot [url] [output.png] --full-page). Сохраняет снимки в .planning/screenshots/, проверяет, что компонент рендерится, данные подгружены, layout не сломан. Если находит пустой экран или сбой — диагностирует, правит, перепроверяет. Максимум две попытки на компонент.

Без Playwright скилл покажет, что проверить вручную, и предложит поставить npm i -D playwright. Если не изменились view-файлы, выходит сразу: «No view-layer files modified. Nothing to preview.» В Codex регистрирует снимки как артефакты (node scripts/codex-app-artifacts.js record --workflow live-preview --kind screenshot). При интеграции с Archon блокирует переход к следующей фазе, пока не исправлены все критические сбои.

Какие задачи решает

  • предотвратить отправку невидимых компонентов в продакшн
  • проверить рендеринг после правок в .tsx или .vue
  • зафиксировать layout-регрессии до коммита
  • автоматизировать визуальную проверку в процессе сборки
  • сохранить скриншоты как артефакты для ревью

Примеры запросов агенту

  • Сделай скриншот страницы /dashboard после правок в Dashboard.tsx
  • Запусти визуальную проверку изменённых компонентов
  • Проверь, что ProfileCard.tsx рендерится корректно

Как установить live-preview

1Через маркетплейс плагинов

/plugin marketplace add SethGammon/Citadel
/plugin install citadel@citadel-local

Команда ставит плагин citadel целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add SethGammon/Citadel --skill live-preview -a claude-code

3Вручную: положить файлы

~/.claude/skills/live-preview/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/live-preview/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о live-preview

Как установить live-preview в Claude Code?

Сначала /plugin marketplace add SethGammon/Citadel, затем /plugin install citadel@citadel-local. Для ручной установки: npx skills add SethGammon/Citadel --skill live-preview -a claude-code, файл окажется в ~/.claude/skills/live-preview/SKILL.md.

Что делает live-preview?

Снимает скриншоты компонентов во время сборки, проверяет, что они рендерятся без пустых экранов и layout-сбоев, и правит критические ошибки до перехода к следующей задаче.

Что нужно для работы live-preview?

Playwright для скриншотов (рекомендуется npm i -D playwright), запущенный dev-сервер и изменённые view-файлы. Без Playwright скилл выдаст инструкцию для ручной проверки.

Исходный текст

SKILL.md · MIT
---
name: live-preview
license: MIT
description: >-
  Mid-build visual verification loop. Takes screenshots of components during
  construction, not just after. Catches visual regressions and invisible features
  before they compound. Requires Playwright or similar screenshot tool.
user-invocable: true
auto-trigger: false
trigger_keywords:
  - preview
  - screenshot
  - visual check
  - does it render
last-updated: 2026-03-21
---

# /live-preview — Build-Verify-Fix Loop

## Prerequisites

This skill requires a screenshot tool. Supported:
- **Playwright** (recommended): `npx playwright screenshot [url] [output.png]`
- **Puppeteer**: via a small script
- **Any tool that takes a URL and produces a screenshot**

If no screenshot tool is available, this skill will tell you what to install and exit.

## When to Use

- Any time .tsx, .jsx, .vue, .svelte, or .html files are modified
- After component creation or replacement
- During visual redesign campaigns
- When Archon or Marshal delegate UI work

## Protocol

### Step 1: DETECT

Determine what needs visual verification:

1. Check which files were modified in the current session/phase
2. Filter to view-layer files (.tsx, .jsx, .vue, .svelte, .html, .css)
3. **If no view-layer files found**: exit early with message
   "No view-layer files modified. Nothing to preview." Skip Steps 2-5.
   This is expected for non-UI repos (CLI tools, libraries, agent harnesses).
4. Map each modified file to a route or URL where it renders:
   - If the project has a route manifest or sitemap, use it
   - If the project has a dev server, identify which routes render the modified components
   - If you can't determine the route, ask the user

### Step 2: CAPTURE

For each route/URL that needs verification:

1. Ensure the dev server is running (start it if not)
2. Take a screenshot:
   ```bash
   npx playwright screenshot http://localhost:{port}/{route} .planning/screenshots/{route-slug}.png --full-page
   ```
3. If Playwright isn't available, try:
   ```bash
   # Check for playwright
   npx playwright --version 2>/dev/null
   # If not found, inform the user:
   # "live-preview needs Playwright for screenshots. Install with: npm i -D playwright"
   ```

### Step 3: VERIFY

For each screenshot:

1. Read the screenshot (vision). Check:
   - Does the component render? (not blank, not invisible)
   - Does it show real data or placeholder/empty states?
   - Are there obvious layout breaks (overlapping elements, overflow, missing sections)?
   - Does it match the intended design direction?
2. Record the result:
   - PASS: renders correctly, matches expectations
   - FAIL: describe what's wrong
   - BLANK: nothing rendered (critical failure)

### Step 4: FIX (if failures found)

For each FAIL or BLANK:

1. Diagnose: is it a data issue, a rendering issue, or a missing import?
2. Fix the root cause (not a band-aid)
3. Re-capture and re-verify
4. Maximum 2 fix attempts per component. If still failing, log it and move on.

### Step 5: ARTIFACT

Save verification artifacts:

1. Screenshots go to `.planning/screenshots/{campaign-slug}/` (if in a campaign)
   or `.planning/screenshots/` (if standalone)
2. In Codex, also register screenshots for the app artifact/browser workflow:
   ```bash
   node scripts/codex-app-artifacts.js record --workflow live-preview --kind screenshot --path ".planning/screenshots/{route-slug}.png" --status pass
   ```
3. Verify registered artifacts:
   ```bash
   node scripts/codex-app-artifacts.js verify --require-artifacts
   ```
4. Write a verification summary:
   ```markdown
   ## Visual Verification: {date}

   | Route | File Modified | Result | Notes |
   |-------|--------------|--------|-------|
   | /dashboard | Dashboard.tsx | PASS | Renders correctly |
   | /settings | SettingsPanel.tsx | FAIL → PASS | Fixed missing import, re-verified |
   | /profile | ProfileCard.tsx | BLANK → PASS | Component wasn't mounted, fixed export |
   ```

## Integration with Archon

When Archon delegates a build phase that modifies view files:

1. After the sub-agent completes, Archon invokes /live-preview on the modified routes
2. If any route is BLANK or FAIL, the phase is NOT marked complete
3. The fix cycle runs before proceeding to the next phase
4. This is part of Archon's Step 4 (Self-Correction) quality spot-check

## What This Prevents

- **Invisible features** (postmortem #17) — compiles but renders nothing
- **Layout regressions** — change in one component breaks another's layout
- **Empty states shipped as features** — data not connected, UI renders skeleton
- **"Works on my machine"** — screenshots are artifacts anyone can review

## Fringe Cases

- **Dev server is not running**: Offer to start it. Output: "Dev server not detected on localhost:{port}. Start it with `npm run dev` or equivalent, then re-run /live-preview." Do not attempt screenshots against a dead server.
- **Port is not 3000**: Check common alternatives (3001, 5173, 4173, 8080) before asking. Read `package.json` scripts for a `--port` flag or `PORT` env variable.
- **Screenshot tool unavailable** (Playwright not installed): Output what to check manually — list the modified routes, describe what each should render, and suggest installing Playwright: `npm i -D playwright`. Exit gracefully without crashing.
- **`.planning/screenshots/` does not exist**: Create the directory before writing artifacts. Never error on a missing output directory.
- **No view-layer files modified**: Exit immediately with "No view-layer files modified. Nothing to preview." This is expected and correct for non-UI repos.

## Contextual Gates

**Disclosure:** "Taking screenshots for visual verification. Images saved to `.planning/screenshots/`."
**Reversibility:** green — screenshots only; saves to `.planning/screenshots/`. No source files modified.
**Trust gates:**
- Any: full screenshot capture, verify, and fix workflow.

## Quality Gates

- Every modified view file must have a corresponding screenshot
- BLANK results are critical failures (never acceptable)
- Screenshots must be saved as artifacts (not just checked and discarded)
- Fix attempts capped at 2 per component (prevent infinite loops)

## Exit Protocol

```
---HANDOFF---
- Live Preview: {N} routes verified
- Results: {pass}/{total} passed
- Failures: {list of routes that failed and what was wrong}
- Screenshots: .planning/screenshots/{path}
- Reversibility: green — delete .planning/screenshots/ to remove artifacts; no source files modified
---
```

© SethGammon · MIT · SethGammon/Citadel

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
screenshot bobmatnyc Скилл screenshot для Claude Code помогает проверять изменения интерфейса по скриншотам на desktop, tablet и mobile. Оформляет результаты UI-проверки для pull request. CX Codex +1 396установок frontend-visual-qa daymade Скилл frontend-visual-qa для Claude Code проверяет отрисованный интерфейс в браузере и проходит пользовательские сценарии. Запускается для визуального аудита сайтов, дашбордов и других уже собранных интерфейсов. CX Codex +1 664установок playwright-visual-testing manutej Скилл playwright-visual-testing помогает проверять веб-интерфейсы через Playwright MCP: делать снимки страниц, проходить пользовательские сценарии и искать визуальные изменения. CX Codex +1 1 400установок playwright-screenshot-inspector curiositech Скилл playwright-screenshot-inspector для визуального тестирования веб-интерфейсов: запускает Playwright в headless-режиме, делает скриншоты и анализирует их через мультимодальную модель. CX Codex +1 262установок smartui-skill TestMu AI Скилл настраивает визуальные регрессионные тесты SmartUI для сравнения скриншотов. Подходит для проверки страниц и компонентов в разных браузерах и viewport. CX Codex +1 237установок setup-visual-testing davila7 Слэш-команда setup-visual-testing разворачивает визуальное регрессионное тестирование: снимки компонентов и страниц, адаптивные брейкпоинты, проверка доступности. CX Codex +1 300установок

Из того же набора55

Весь набор →
loop Скилл loop для Claude Code и Codex, который запускает действие несколько раз подряд и проверяет результат каждый раз, пока не пройдёт проверка или не кончатся попытки. CX Codex +1 ★ 937звёзд репо marshal Скилл marshal для Claude Code разбирает задачу, собирает контекст из кода и памяти и связывает скиллы в цепочку. Работает за одну сессию и спрашивает, только если не может продолжить. CX Codex +1 ★ 937звёзд репо test-gen Скилл test-gen генерирует и прогоняет тесты под существующий фреймворк проекта с проверкой типичных сценариев, краевых случаев и ошибок. CX Codex +1 ★ 937звёзд репо design Скилл design собирает дизайн-манифест из стилей проекта или ответов на вопросы. Хук после правок отмечает отклонения в CSS и компонентах. CX Codex +1 ★ 937звёзд репо architect Скилл architect превращает PRD или описание задачи в архитектурный план с деревом файлов, моделью данных и фазами сборки. CX Codex +1 ★ 937звёзд репо cost Скилл cost показывает расход токенов и стоимость сессий, кампаний и периодов. Помогает понять, куда уходит бюджет и как меняется темп расходов. CX Codex +1 ★ 937звёзд репо merge-review Скилл merge-review проверяет очередь слияний от fleet-агентов, находит пересечения файлов между ветками и предлагает безопасный порядок merge перед тем, как принимать изменения в main. CX Codex +1 ★ 937звёзд репо deploy-steward Скилл deploy-steward для Claude Code по очереди вливает готовые PR в main, проверяет CI, запускает деплой и создаёт задачи на починку при сбоях. CX Codex +1 ★ 937звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой