skills/php/bill-php-code-review/SKILL.md
Use when conducting a thorough PHP PR code review across backend/server projects. Classify changed areas conservatively, select the right specialist review passes for the diff, including real test-value review when tests change. Produces a structured review with risk register and prioritized action items. Use when user mentions PHP review, review PHP PR, PHP code review, or asks to review .php files.
npx skillsauth add sermilion/mobile-development-plugin bill-php-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an experienced software architect conducting a code review.
This is the current PHP review implementation behind the shared bill-code-review router.
Your first job is to inspect the diff safely so the right review depth is applied.
If .agents/skill-overrides.md exists in the project root and contains a ## bill-php-code-review section, read that
section and apply it as the highest-priority instruction for this skill. The matching section may refine or replace
parts of the default workflow below.
If an AGENTS.md file exists in the project root, apply it as project-wide guidance.
Precedence for this skill: matching .agents/skill-overrides.md section > AGENTS.md > built-in defaults. Pass
relevant project-wide guidance and matching per-skill overrides to every delegated or inline specialist review pass.
Determine the review scope:
git diff --cached; index only)git diff; working tree only)git diff --cached + git diff) only when the caller explicitly asks for all local changesInspect the changed files and repo markers before applying review heuristics.
Resolve the scope before reviewing. If the caller asks for staged changes, inspect only the staged diff and keep unstaged edits out of findings except for repo markers needed for classification.
When the caller already passed the detected stack, skip reading stack-routing.md. For standalone invocation, read it before classifying.
Before selecting specialist review passes or formatting the final report, read review-orchestrator.md unless the caller already passed the shared review contract.
Before delegating specialist review passes, read only your current runtime's section in review-delegation.md.
| Signal in the diff | Specialist review to run |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| Layering changes, module ownership, ports/adapters, read gateways, outbox, listeners, projectors, boundary-crossing composition | bill-php-code-review-architecture |
| Conditional logic, state transitions, retry-sensitive logic, time/date logic, nullability, behavior drift in refactors | bill-php-code-review-platform-correctness |
| Routes/controllers/actions, requests, resources, serializers, status codes, OpenAPI/schema changes, validation/error payloads, server-rendered payload contracts | bill-php-code-review-api-contracts |
| Repositories, ORM models, SQL, query builders, migrations, locking, transactions, projections, bulk writes | bill-php-code-review-persistence |
| Jobs, consumers, schedulers, retries, queues, caches, external clients, fallback behavior, logging/metrics/tracing | bill-php-code-review-reliability |
| Auth/authz, trust-boundary code, secrets, uploads, signed URLs, template rendering, JS or DOM injection risks, deserialization, sensitive logs, workflow or script credential handling | bill-php-code-review-security |
| Test files changed, contract tests, deterministic retry/idempotency tests, weak/tautological tests, missing regression proof | bill-php-code-review-testing |
| Changed tests look suspiciously weak, tautological, or coverage-padding | bill-unit-test-value-check |
| Hot paths, N+1, repeated downstream calls, serialization waste, feed/backfill loops, rendering waste, unbounded buffers or batch work | bill-php-code-review-performance |
Always include:
bill-php-code-review-architecturebill-php-code-review-platform-correctnessInspect each changed file or tightly related change cluster separately and add the agents from the routing table that match its signals.
If different parts of the diff touch different review surfaces:
bill-php-code-review-testingSelect inline or delegated using review-orchestrator.md.
inline only when the PHP review scope stays small and low-risk under the shared execution-mode contractdelegated when the diff is large, the risk profile is high, multiple review surfaces are meaningfully involved, or the safest choice is unclearWhen execution mode is delegated, build a per-specialist file list before launching subagents:
bill-php-code-review-architecture always receives all changed filesbill-php-code-review-platform-correctness with all changed files as the default secondThis is a lightweight file-level classification (names + imports), not a full review.
If execution mode is inline:
If execution mode is delegated:
Review session ID: <review-session-id>
Review run ID: <review-run-id>
Detected review scope: <staged changes / unstaged changes / working tree / commit range / PR diff / files>
Detected stack: <stack>
Signals: <markers>
Execution mode: inline | delegated
Applied learnings: none | <learning references>
Specialist reviews: <selected specialists>
Reason: <why these specialists were selected>
Every finding in ### 2. Risk Register must use this exact bullet format (do NOT use markdown tables):
- [F-001] <Severity> | <Confidence> | <file:line> | <description>
Severity: Blocker | Major | Minor. Confidence: High | Medium | Low.
For telemetry ownership, triage ownership, and the orchestrated flag contract, follow telemetry-contract.md.
For action items, verdict format, merge rules, and review principles, follow review-orchestrator.md.
bill-feature-implement, bill-feature-verify, or another orchestration skill, do not pause for user selection. Return prioritized findings so the caller can auto-fix P0/P1 items and decide whether to carry Minor items forward.bill-quality-check as final verification when the project uses a routed quality-check path and this review is being run standalone.development
Use when running a governed editorial assignment desk from Readian recommendations through candidate selection and source-backed story packs.
testing
Use when reviewing unit tests in a file, current changes, or a commit to flag low-value, tautological, or coverage-only tests that do not validate real behavior. Use when user mentions check test quality, review tests, tautological tests, weak tests, or coverage-padding.
data-ai
Use when removing an existing skill or platform skill set and cleaning up agent installs, manifests, and supporting links.
development
Use when you want a generic quality-check entry point that detects the dominant stack in scope and delegates to the matching stack-specific quality-check skill. Use when user mentions run checks, validate, lint, format, quality check, or run quality.