Install the Playwright CLI skill for Codex and other agents, not only Claude Code
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 80/100
Hướng nghiên cứu
Bắt đầu với config.playwright-cli.yaml để xem hook sau khi khởi động cài đặt skill như thế nào, sau đó đọc README và tests/test.bats để nắm cấu hình và các assertion hiện có. Bổ sung khả năng chọn mục tiêu claude và agents thông qua PLAYWRIGHT_CLI_SKILLS, giữ claude làm mặc định và đảm bảo lỗi của hook không làm dừng quá trình. Công việc hoàn tất khi README mô tả cả hai mục tiêu và các bài kiểm thử bao quát hành vi đã cấu hình lẫn hành vi mặc định, bao gồm các đường dẫn skill dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
ddev add-on get e0ipso/ddev-playwright-cli && ddev restartddev exec ls .agents/skills: there's noplaywright-cli.- 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:
|| truekeeps the hook from breakingddev start, as it does today. - README: document the variable and the two targets.
- Test: extend
tests/test.bats. WithPLAYWRIGHT_CLI_SKILLS="claude agents", assert that.agents/skills/playwright-cli/SKILL.mdexists. With the default, keep the current.claude/skills/playwright-cliassertion and check that.agents/skills/playwright-clidoesn'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.
- Ngôn ngữ chính
- Shell
- Star
- 6
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
bump version [nginx2root]Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Update: sanitize-htmlĐang mở📦 Update Request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
cdnjs/packages#2225 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
good first issue help wanted testing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
[issue]: Ventoy2Disk.sh can leave the end of VTOYEFI unwritten (xzcat | dd without iflag=fullblock)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bot:ai-assisted component:platform-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
midnightntwrk/platform-js#69 ·
Maintainer thường phản hồi trong vòng 1 ngày