playwright-interactive
하는 일
이 스킬은 에이전트가 단계 사이에도 열려 있는 브라우저 세션에서 실행 중인 앱을 열고 조작하게 합니다. 개발하는 동안 사용자 인터페이스를 디버그하고 테스트하려는 개발자를 위한 것입니다.
사용하는 경우
- ✓로컬 웹 앱이나 Electron 앱을 단계별로 디버그하고 싶을 때.
- ✓변경할 때마다 사용자 인터페이스가 어떻게 보이는지 확인해야 할 때.
- ✓브라우저를 매번 다시 열지 않고 기능과 시각적 검사를 하고 싶을 때.
스킬 링크
https://github.com/openai/skills/blob/main/skills/.curated/playwright-interactive/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 로컬 앱을 브라우저에서 열고 가입 양식을 눌러 보고 무엇이 깨지는지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 지속되는 코드 환경에 Playwright를 설정하고, 단계 사이에 브라우저 핸들을 유지하며, 스크린샷을 포함해 보이는 내용을 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Playwright Interactive Skill
Use a persistent js_repl Playwright session to debug local web or Electron apps, keep the same handles alive across iterations, and run functional plus visual QA without restarting the whole toolchain unless the process ownership changed.
Preconditions
js_replmust be enabled for this skill.- If
js_replis missing, enable it in~/.codex/config.toml:
[features]
js_repl = true
- You can also start a new session with
--enable js_repl(equivalent to-c features.js_repl=true). - After enabling
js_repl, start a new Codex session so the tool list refreshes. - For now, run this workflow with sandboxing disabled: start Codex with
--sandbox danger-full-access(or the equivalent config forsandbox_mode=danger-full-access). This is a temporary requirement whilejs_repl+ Playwright support inside the sandbox is still being completed. - Run setup from the same project directory you need to debug.
- Treat
js_repl_resetas a recovery tool, not routine cleanup. Resetting the kernel destroys your Playwright handles.
One-time setup
test -f package.json || npm init -y
npm install playwright
# Web-only, for headed Chromium or mobile emulation:
# npx playwright install chromium
# Electron-only, and only if the target workspace is the app itself:
# npm install --save-dev electron
node -e "import('playwright').then(() => console.log('playwright import ok')).catch((error) => { console.error(error); process.exit(1); })"
If you switch to a different workspace later, repeat setup there.
Core Workflow
- Write a brief QA inventory before testing:
- Build the inventory from three sources: the user's requested requirements, the user-visible features or behaviors you actually implemented, and the claims you expect to make in the final response.
- Anything that appears in any of those three sources must map to at least one QA check before signoff.
- List the user-visible claims you intend to sign off on.
- List every meaningful user-facing control, mode switch, or implemented interactive behavior.
- List the state changes or view changes each control or implemented behavior can cause.
- Use this as the shared coverage list for both functional QA and visual QA.
- For each claim or control-state pair, note the intended functional check, the specific state where the visual check must happen, and the evidence you expect to capture.
- If a requirement is visually central but subjective, convert it into an observable QA check instead of leaving it implicit.
- Add at least 2 exploratory or off-happy-path scenarios that could expose fragile behavior.
- Run the bootstrap cell once.
- Start or confirm any required dev server in a persistent TTY session.
- Launch the correct runtime and keep reusing the same Playwright handles.
- After each code change, reload for renderer-only changes or relaunch for main-process/startup changes.
- Run functional QA with normal user input.
- Run a separate visual QA pass.
- Verify viewport fit and capture the screenshots needed to support your claims.
- Clean up the Playwright session only when the task is actually finished.
Bootstrap (Run Once)
var chromium;
var electronLauncher;
var browser;
var context;
var page;
var mobileContext;
var mobilePage;
var electronApp;
var appWindow;
try {
({ chromium, _electron: electronLauncher } = await import("playwright"));
console.log("Playwright loaded");
} catch (error) {
throw new Error(
`Could not load playwright from the current js_repl cwd. Run the setup commands from this workspace first. Original error: ${error}`
);
}
Binding rules:
- Use
varfor the shared top-level Playwright handles because laterjs_replcells reuse them. - The setup cells below are intentionally short happy paths. If a handle looks stale, set that binding to
undefinedand rerun the cell instead of adding recovery logic everywhere. - Prefer one named handle per surface you care about (
page,mobilePage,appWindow) over repeatedly rediscovering pages from the context.
Shared web helpers:
var resetWebHandles = function () {
context = undefined;
page = undefined;
mobileContext = undefined;
mobilePage = undefined;
};
var ensureWebBrowser = async function () {
if (browser && !browser.isConnected()) {
browser = undefined;
resetWebHandles();
}
browser ??= await chromium.launch({ headless: false });
자주 묻는 질문
특별한 설정이 필요한가요?
네. js_repl 기능을 켜야 하고 프로젝트에 Playwright가 설치되어 있어야 합니다.
왜 샌드박스 없이 실행해야 하나요?
샌드박스 안의 Playwright 지원이 마무리되는 동안의 임시 요구 사항이라고 설명합니다.
Electron 앱도 다루나요?
네. 웹 앱과 Electron 앱을 모두 다룹니다.
상세 정보
작성자의 원본 설명
Persistent browser and Electron interaction through `js_repl` for fast iterative UI debugging.
repo: openai/skills
인기도
- GitHub 스타
- 28k
- 순위
- #9860
- 라이선스
- —
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
aspnet-core
28k에이전트가 적절한 앱 유형을 고르고 .NET의 최신 Microsoft 지침을 따라 ASP.NET Core 웹 앱을 만들거나 검토하거나 업그레이드하도록 돕습니다.
chatgpt-apps
28kMCP 서버와 위젯 UI를 결합한 ChatGPT 앱을 만들도록 돕습니다. 도구 설계, UI 리소스, 메타데이터, 로컬 설정을 다룹니다.
cli-creator
28kAPI 문서, 명세, 기존 스크립트를 어느 폴더에서나 실행되고 안정적인 JSON을 반환하는 재사용 가능한 명령줄 도구로 바꾸도록 돕습니다.
define-goal
28k막연한 의도를 성공 기준, 범위, 중단 조건이 있는 명확하고 측정 가능한 목표로 바꾸도록 에이전트를 돕습니다. 작업을 시작하기 전에 정리합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.