session-to-playwright
БесплатноБез исполняемых скриптовНе проверенAdd the witness session recorder to a web app and compile a recorded user session into a Playwright spec that fails until the reported bug is fixed. Use when…
от nirholas★ 289 звёзд на GitHubОб этом скилле
Session to Playwright
@three-ws/witness records user intent (navigation, clicks, typed-field metadata, failed requests, page errors) in about 2 KB per session, with no pixels and no DOM mutation stream, then compiles it into a Playwright spec. No dependencies, no build step.
Install and record
npm install @three-ws/witness
import { witness } from '@three-ws/witness';
witness.start(); // idempotent, one recorder per page
witness.onFailure(() => showFeedbackPrompt()); // ask at the moment of failure
witness.hasFailure(); // true after a failed request or page error
const trace = witness.trace(); // { version, recordedMs, environment, events }
witness.stop(); // restores every patched global
Compile
import { compileToPlaywright } from '@three-ws/witness/compile';
const { filename, source, confidence, steps } = compileToPlaywright(trace, {
title: 'Export does nothing', // test name
baseUrl: 'http://localhost:3000',
reportId: 'FB-123', // linked in a header comment
});
Write source to filename under your Playwright tests directory. The test asserts the failure is gone, so it is red until the bug is fixed. confidence.score (0 to 100) says how well every step is anchored to a stable handle.
Other exports: narrate(trace) (the human step list), failuresIn(trace), entryRoute(trace), replayConfidence(trace).
Selectors
Each element gets the strongest handle verified unique in the live document: data-testid (100), id (95), aria-label (85), role plus name (80), text (70), name (65), placeholder (60), class (40), structural path (10). Add data-testid to the controls in a flow to raise confidence. Helpers are on @three-ws/witness/selector.
Privacy
@three-ws/witness/redact exports redactText, redactUrl, isSensitiveField and summarizeInput. Typed values are summarised by length, not stored, and sensitive fields are never captured. Do not paste real user data into reports.
Worked example
Given a trace where the visitor opened /avatar-studio, clicked Export and saw POST /api/export -> 500, the compiled spec visits the route, clicks getByTestId("export"), and expects the failed-request list to be empty. Run it with npx playwright test, fix the endpoint, run again until green.
Установить session-to-playwright в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл session-to-playwright?
Add the witness session recorder to a web app and compile a recorded user session into a Playwright spec that fails until the reported bug is fixed. Use when turning a bug report into a reproducible failing test.
Как установить скилл session-to-playwright?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-to-playwright запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic