playwright-interactive
Qué hace
Esta skill permite a un agente abrir y controlar una app en ejecución en una sesión de navegador que sigue abierta entre pasos. Está pensada para desarrolladores que quieren depurar y probar una interfaz mientras la desarrollan.
Cuándo usarla
- ✓Cuando quieres depurar paso a paso una app web local o una app Electron.
- ✓Cuando necesitas comprobar cómo se ve una interfaz después de cada cambio.
- ✓Cuando quieres comprobaciones funcionales y visuales sin reiniciar el navegador cada vez.
Link de la skill
https://github.com/openai/skills/blob/main/skills/.curated/playwright-interactive/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Abre mi app local en el navegador, haz clic en el formulario de registro y dime qué se rompe.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente prepara Playwright en un entorno de código persistente, mantiene vivos los controladores del navegador entre pasos e informa de lo que ve, incluidas las capturas de pantalla.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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 });
Preguntas frecuentes
¿Necesita una configuración especial?
Sí. Hay que activar la función js_repl y tener Playwright instalado en el proyecto.
¿Por qué debo ejecutarla sin el sandbox?
La skill indica que es un requisito temporal mientras se termina el soporte de Playwright dentro del sandbox.
¿También cubre apps Electron?
Sí. Cubre tanto apps web como apps Electron.
Detalles
Descripción original del autor
Persistent browser and Electron interaction through `js_repl` for fast iterative UI debugging.
repo: openai/skills
Popularidad
- Estrellas en GitHub
- 28 mil
- Posición en el ranking
- #9860
- Licencia
- —
- Actualizada
- 28/10/2026
Comentarios
- …
Más skills de este repositorio
aspnet-core
28 milAyuda a tu agente a construir, revisar o actualizar apps web de ASP.NET Core, eligiendo el tipo de app adecuado y siguiendo la guía vigente de Microsoft para .NET.
chatgpt-apps
28 milAyuda a tu agente a construir una app de ChatGPT con un servidor MCP y una interfaz de widget, incluyendo herramientas, recursos de UI y configuración local.
cli-creator
28 milAyuda a tu agente a convertir una API, una especificación o scripts existentes en una herramienta de línea de comandos reutilizable que devuelve JSON estable.
define-goal
28 milAyuda a tu agente a convertir una intención vaga en un objetivo claro y medible, con criterios de éxito, alcance y condición de parada antes de empezar.
Skills parecidas
test-driven-development
311 milEnseña a tu agente a escribir primero una prueba que falle, verla fallar y después escribir el código más pequeño que la hace pasar, antes de construir cualquier función o corrección.
verification-before-completion
311 milEnseña a tu agente a ejecutar comprobaciones reales y leer su resultado antes de afirmar que una tarea, una corrección o una compilación está completa o en buen estado.
migrate-to-shoehorn
310 milSustituye los casts de tipo arriesgados de tus archivos de prueba por la librería shoehorn, para que las pruebas usen datos parciales y sigan pasando las comprobaciones de tipos.