Install the Playwright CLI skill for Codex and other agents, not only Claude Code

Abierto Apto para principiantes
#7 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
80/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
playwright, shell
Área
devtools

Línea de trabajo

Empieza por config.playwright-cli.yaml para ver cómo el hook posterior al inicio instala la skill; después, lee el README y tests/test.bats para conocer la configuración y las aserciones existentes. Añade compatibilidad para elegir los destinos claude y agents mediante PLAYWRIGHT_CLI_SKILLS, manteniendo claude como valor predeterminado y haciendo que los fallos del hook no sean fatales. La tarea estará completa cuando el README documente ambos destinos y las pruebas cubran el comportamiento configurado y el predeterminado, incluidas las rutas de skill esperadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Is there an existing issue for this?
  • I have searched the existing issues
Is your feature request related to a problem?

Problem

The post-start hook in config.playwright-cli.yaml runs playwright-cli install --skills without a value:

- exec: "which playwright-cli > /dev/null 2>&1 && playwright-cli install --skills || true"

Playwright CLI treats that as claude:

$ playwright-cli install --help
  --skills  install skills, possible values: claude (default), agents.

So the skill only lands in .claude/skills/playwright-cli/. Codex, and other agents that read .agents/skills/, never get it, although the CLI and Chromium are installed and work for them.

Steps to reproduce

  1. ddev add-on get e0ipso/ddev-playwright-cli && ddev restart
  2. ddev exec ls .agents/skills: there's no playwright-cli.
  3. In Codex inside the web container, the skill isn't listed (codex debug prompt-input "hi" doesn't mention it).

Running ddev exec playwright-cli install --skills agents by hand writes .agents/skills/playwright-cli/, and Codex picks it up.

Versions: add-on v1.2.3, @playwright/cli 0.1.24, Codex CLI 0.169.0, DDEV ≥ 1.25.

Current workaround

A project-owned .ddev/config.playwright-cli-codex.yaml:

hooks:
  post-start:
    - exec: "which playwright-cli > /dev/null 2>&1 && playwright-cli install --skills agents || true"

DDEV runs the hooks from every config.*.yaml file, so the add-on's own hook still runs too.

Describe your solution

Let projects choose the targets with an environment variable, keeping today's behavior as the default:

#ddev-generated
hooks:
  post-start:
    # Install the Playwright CLI skill for each target in PLAYWRIGHT_CLI_SKILLS
    # ("claude", "agents"; default "claude"), if the CLI is available.
    - exec: 'which playwright-cli > /dev/null 2>&1 && for target in ${PLAYWRIGHT_CLI_SKILLS:-claude}; do playwright-cli install --skills "$target"; done || true'
web_environment:
  - PLAYWRIGHT_MCP_CONFIG=/var/www/html/.ddev/playwright-cli/cli.config.json

A project opts in with:

ddev dotenv set .ddev/.env.web --playwright-cli-skills="claude agents"
ddev restart

Setting web_environment in a project config.*.yaml file would work too.

  • Default unchanged: existing projects don't suddenly get an .agents/skills/ folder they would need to ignore in Git.
  • Failures stay non-fatal: || true keeps the hook from breaking ddev start, as it does today.
  • README: document the variable and the two targets.
  • Test: extend tests/test.bats. With PLAYWRIGHT_CLI_SKILLS="claude agents", assert that .agents/skills/playwright-cli/SKILL.md exists. With the default, keep the current .claude/skills/playwright-cli assertion and check that .agents/skills/playwright-cli doesn't exist.
Describe alternatives

No response

Additional context
  • Always install both targets: no configuration, but every project gets .agents/skills/playwright-cli/ and has to ignore it in Git.
  • Detect the agents in use from folders such as .codex/ or .agents/: works without configuration, but it's implicit and easy to get wrong.
Lenguaje dominante
Shell
Estrellas
6
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.