본문으로 건너뛰기
Skillpedia
테스트28k · #9860

playwright-interactive

하는 일

이 스킬은 에이전트가 단계 사이에도 열려 있는 브라우저 세션에서 실행 중인 앱을 열고 조작하게 합니다. 개발하는 동안 사용자 인터페이스를 디버그하고 테스트하려는 개발자를 위한 것입니다.

사용하는 경우

  • ✓로컬 웹 앱이나 Electron 앱을 단계별로 디버그하고 싶을 때.
  • ✓변경할 때마다 사용자 인터페이스가 어떻게 보이는지 확인해야 할 때.
  • ✓브라우저를 매번 다시 열지 않고 기능과 시각적 검사를 하고 싶을 때.

스킬 링크

https://github.com/openai/skills/blob/main/skills/.curated/playwright-interactive/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openai/skills/blob/main/skills/.curated/playwright-interactive/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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_repl must be enabled for this skill.
  • If js_repl is 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 for sandbox_mode=danger-full-access). This is a temporary requirement while js_repl + Playwright support inside the sandbox is still being completed.
  • Run setup from the same project directory you need to debug.
  • Treat js_repl_reset as 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

  1. 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.
  2. Run the bootstrap cell once.
  3. Start or confirm any required dev server in a persistent TTY session.
  4. Launch the correct runtime and keep reusing the same Playwright handles.
  5. After each code change, reload for renderer-only changes or relaunch for main-process/startup changes.
  6. Run functional QA with normal user input.
  7. Run a separate visual QA pass.
  8. Verify viewport fit and capture the screenshots needed to support your claims.
  9. 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 var for the shared top-level Playwright handles because later js_repl cells reuse them.
  • The setup cells below are intentionally short happy paths. If a handle looks stale, set that binding to undefined and 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬