Developer like execution

From event4u-app/agent-config · View interactive version

Developer like execution is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when implementing, debugging, refactoring, or reviewing code — enforces the think → analyze → verify → execute workflow — even when the user just says 'implement X' without naming it.

How to use this skill

Skill file

developer-like-execution

When to use

Do NOT use when only explaining concepts or writing pure reference documentation without execution.

Goal

Act like a real developer: think before acting, analyze before coding, verify before concluding.

Avoid unnecessary trial-and-error. Minimize output, token usage, and irrelevant data.

Develop against expected behavior, ideally test-first.

Core principles

Tool priority

Use the smallest, most targeted tool that gives the needed evidence.

If a tool is available as MCP server, prefer it over manual alternatives.

Verification tool mapping

| What changed | Primary tool | MCP alternative |

|---|---|---|

| Backend/API endpoint | curl -s \| jq | Postman MCP (if configured) |

| Frontend/UI | Manual browser check | Playwright MCP (navigate + snapshot) |

| Execution flow/debugging | Print statements, logs | Xdebug MCP (breakpoints, variable inspection) |

| CLI commands/jobs | Run command, check exit code | — |

| Database | SQL query, migration status | — |

| External APIs | Http::fake() in tests | Postman MCP for manual checks |

Xdebug workflow (when available)

If Xdebug is available (as MCP or IDE integration):

  1. Set breakpoints at the suspected code path
  2. Trigger the request (curl, browser, test)
  3. Inspect variables at breakpoint — don't guess values from reading code
  4. Step through to verify actual execution flow vs. assumed flow
  5. Check: is the data what you expected? Is the branch taken what you expected?

Use Xdebug before adding print statements or debug logging.

It's faster and leaves no cleanup work.

Playwright for frontend verification

When UI changes are involved:

  1. Navigate to the affected page
  2. Take a snapshot of the rendered state
  3. Verify the expected elements are present and interactive
  4. Check console/network for errors
  5. Compare before/after if refactoring

Prefer targeted output

Avoid large output by default

Do NOT:

Procedure

1. Understand the task

2. Check whether requirements are complete

Before acting, verify:

If important information is missing:

3. Analyze BEFORE acting

CODE0, call

retrieve(types=["domain-invariants"], keys=<touched paths>, limit=3).

A matching domain-invariant is a hard constraint — violating it = regression,

surface the conflict to the user before proceeding. For architectural rationale

(why the current shape exists), check the ADR index

CODE0; plan around it, do

not silently overturn it. Cite matching ids / ADR numbers in the plan.

See CODE0

for the schema.

4. Define expected behavior first

Prefer test-driven or test-first development whenever practical.

Before changing code, define:

Prefer: write or update failing test first → implement against it → run tests again.

If full TDD is not practical: at least write down the expected output before coding.

5. Use targeted tools like a real developer

Backend examples
# Route lookup — pick the project's framework
php artisan route:list --json | jq '.[] | select(.uri == "api/users") | {method, uri, name, action, middleware}'   # Laravel
bin/console debug:router --format=json | jq '.[] | select(.path == "/api/users")'                                  # Symfony
bin/rails routes -g users                                                                                          # Rails
curl -s http://localhost:3000/__routes | jq '.[] | select(.path == "/api/users")'                                  # Express custom-introspection
curl -s http://localhost:8000/openapi.json | jq '.paths["/api/users"]'                                             # FastAPI

# Config inspection
php artisan config:show app | grep env       # Laravel
bin/console debug:config framework            # Symfony
bin/rails runner 'puts Rails.application.config_for(:database)'  # Rails

# API inspection — extract only what you need
curl -s http://localhost/api/users | jq '.[0] | {id, email, status}'
curl -s http://localhost/api/users/1 | jq '{id, name, roles: [.roles[].name]}'

# Recent logs — targeted, not full dump
tail -n 200 storage/logs/laravel.log | rg "payment|timeout"             # Laravel
tail -n 200 log/development.log | rg "payment|timeout"                   # Rails
docker compose logs api --since 5m --no-color | rg "payment|timeout"     # any container stack
journalctl -u myapp --since "5 min ago" | rg "payment|timeout"           # systemd

# DB-state probe — targeted single record, not full table
php artisan tinker --execute="User::where('email','x@y')->first(['id','email','status'])"   # Laravel
bin/rails runner "p User.where(email: 'x@y').first&.slice(:id,:email,:status)"               # Rails
bin/console doctrine:query:sql "SELECT id,email,status FROM users WHERE email='x@y' LIMIT 1" # Symfony
psql -d mydb -c "SELECT id,email,status FROM users WHERE email='x@y' LIMIT 1"                 # raw SQL fallback
Debugging with Xdebug

When available (MCP or IDE), prefer over print/log debugging:

1. Set breakpoint at suspected method
2. Trigger request: curl -s http://localhost/api/endpoint
3. Inspect variables at breakpoint
4. Step through execution to verify actual flow
5. Remove breakpoint when done — zero cleanup
Frontend verification with Playwright

When UI is affected, verify with Playwright (MCP or direct):

General shell filtering

Use rg over broad grep, jq for JSON, cut/awk/sort/uniq to reduce noise.

Never load full output into context when a filter gives you the answer.

6. Form a plan

7. Implement

8. Write or update tests

Tests are mandatory when behavior changes or bugs are fixed.

Prefer: failing test first → implementation → passing test.

Test types: unit (isolated logic), feature/integration (behavior), UI (frontend), regression (bugs).

If a test cannot be added: state exactly why and explain what verification replaces it.

9. Verify with real execution (MANDATORY)

Never trust "it should work" — execute and observe.

| What | How | MCP alternative |

|---|---|---|

| Backend/API | curl -s \| jq, test endpoint | Postman MCP |

| Frontend/UI | Browser check | Playwright MCP (navigate + snapshot) |

| Execution flow | Logs, print debug | Xdebug MCP (breakpoints, step-through) |

| CLI/Jobs | Run command, check exit code | — |

| Database | Query result, migration status | — |

| Skills/rules | Lint, structure check | — |

If a debugging/testing tool is available as MCP server — prefer it over manual alternatives.

10. Validate

Output format

  1. Task understanding
  2. Analysis summary
  3. Planned change
  4. Test strategy
  5. Implemented change
  6. Verification result
  7. Risks, open questions, or follow-up

Gotchas

Do NOT

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.