Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.
日本語の概要は準備中です。原文の説明を表示しています。
Use when debugging PHP with Xdebug — breakpoints, step-through, dual-container setup, IDE configuration, header-based routing — even when the user just says 'why does this blow up on request X'.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill when:
This skill extends php-coder and php.
docker-compose.yml / compose.yaml for Xdebug containers.dev-xdebug build stage or Xdebug installation.Docs/XDEBUG_SETUP.md or docs/ for setup instructions..env — look for DOCKER_XDEBUG_MODE and DOCKER_XDEBUG_PORT.Many projects use two PHP containers for optimal performance:
| Container | Purpose | When used |
|---|---|---|
*-php | Fast PHP-FPM, no Xdebug overhead | All normal requests |
*-php-xdebug | PHP-FPM with Xdebug enabled | Only debug requests |
NGINX routes requests based on HTTP headers:
| Header | Value | Recommended for |
|---|---|---|
X-Xdebug-Enable | 1 or true | Manual tests, Postman |
X-Debug-Session | PHPSTORM | IDE integration |
XDEBUG-SESSION | any value | Standard Xdebug header |
Important: Use hyphens, not underscores. XDEBUG_SESSION does NOT work — use XDEBUG-SESSION.
Check the X-PHP-Backend response header to confirm which container handled the request:
# Normal request
curl -I http://localhost:8002/ # → X-PHP-Backend: *-php:9000
# Debug request
curl -I -H "X-Xdebug-Enable: 1" http://localhost:8002/ # → X-PHP-Backend: *-php-xdebug:9000
DOCKER_XDEBUG_MODE=develop,debug,coverage # Xdebug modes
DOCKER_XDEBUG_PORT=9003 # IDE listens on this port
| Mode | Purpose |
|---|---|
debug | Step debugging with breakpoints |
develop | Enhanced error messages, var_dump improvements |
coverage | Code coverage for tests |
profile | Performance profiling (generates cachegrind files) |
trace | Function call tracing |
The Xdebug container typically uses pm = ondemand to save resources:
9003localhost, Port: 80 (internal container port, not host port)/var/www/htmlPHPSTORM{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}"
}
}
X-PHP-Backend header if debugging doesn't triggerFor debugging Artisan commands or tests, enter the Xdebug container:
make console-xdebug # Enter Xdebug container
php artisan your:command # Xdebug connects to IDE automatically
After a fix, verify the command without re-attaching the debugger:
# Run the command, capture exit code + command output
php artisan your:command; echo "exit code: $?"
# Pest CLI assertion — expectsOutput / artisan test
vendor/bin/pest --filter='ProcessInvoicesCommand'
Assert on the exit code and command output; never trust "looks fine" from breakpoint inspection alone.
| Problem | Solution |
|---|---|
| Breakpoints not hit | Check IDE is listening, verify path mappings, check X-PHP-Backend header |
| IDE not connecting | make console-xdebug then nc -zv host.docker.internal 9003 — should show "open" |
| Wrong container used | Check response header X-PHP-Backend, verify debug header format (hyphens!) |
| Slow normal requests | Verify normal requests go to fast container (no X-PHP-Backend: *-xdebug*) |
| Xdebug logs | make console-xdebug then tail -f /tmp/xdebug.log |
| Container not running | docker compose ps — both PHP containers should be "Up" |
| Path mapping wrong | PhpStorm: Settings → PHP → Servers → verify local ↔ /var/www/html |
make console # Fast PHP container (no Xdebug)
make console-xdebug # Xdebug container
make rebuild-php-xdebug # Rebuild Xdebug container only
make rebuild-php-all # Rebuild both PHP containers
tail -f /tmp/xdebug.log and docker logs produce far too much
data to read line-by-line. Filter with rg/grep for the relevant
event:
# Only connection / breakpoint events
rg --color=never 'Connect|Step|breakpoint' /tmp/xdebug.log
# Only this request's frames in the laravel log
docker compose logs php-xdebug | rg --color=never "$REQUEST_ID"
XDEBUG_SESSION fails — use XDEBUG-SESSION).dd() or var_dump() — they're forbidden by PHPStan config. Use Xdebug breakpoints.XDEBUG_SESSION cookie/header — without it, breakpoints don't trigger.If the bug repro is unclear (which request, which user, which env, which input shape?), do not start placing breakpoints at random. Ask the user for the failing payload, the exact route, or the Sentry trace. Setting breakpoints based on a guessed flow wastes a session.
->fresh() after update when using same instancenow() timezone mismatchesDB::transaction() with external side effects (emails, API calls)catch (\Exception $e) {})まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.
日本語の概要は準備中です。原文の説明を表示しています。
Use when defining or auditing the activation event — aha-moment selection, retention correlation, falsifiable definition. Triggers on 'what is our aha moment', 'redefine activation'.
日本語の概要は準備中です。原文の説明を表示しています。
Use when capturing an architectural decision — file naming, next ADR number, Status / Context / Decision / Consequences, index regen; fires even without saying 'ADR'.
日本語の概要は準備中です。原文の説明を表示しています。
Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review.
日本語の概要は準備中です。原文の説明を表示しています。
Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.
日本語の概要は準備中です。原文の説明を表示しています。
Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit.
日本語の概要は準備中です。原文の説明を表示しています。