원클릭으로
code-review
Use when senior PHP code review focused on architecture, business logic, and risk detection. Read-only.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when senior PHP code review focused on architecture, business logic, and risk detection. Read-only.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | code-review |
| description | Use when senior PHP code review focused on architecture, business logic, and risk detection. Read-only. |
Perform structured code review focused on:
__invoke request handlers, API Resources / DTOs serialized into responses, FormRequests, status-code / response() / abort() calls, Idempotency-Key handling), walk it against the API contract pillars. The dedicated walk lives in @skills/api-review/SKILL.md (Specialized Reviews → Always run); severities follow that rule's CR Severity Rules section.require / require-dev entry to composer.json, walk the Activity + Compatibility gates from that rule against the PR description / commit body. A missing selection note is a Critical finding; an adopted archived / abandoned / branch-pinned package is a Critical finding on the spot; a single-maintainer adoption without bus-factor flag is a Moderate finding.@rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, and @rules/laravel/livewire.mdcgit add, git commit, git push, git reset, git checkout -- …, etc.). Checking out the relevant branch and git pull to read the latest code are required (the mandatory Branch checkout gate below); mutating the working tree or pushing to the remote is not. Output is the review markdown only.code-review-github / code-review-jira for publishing on the GitHub PR stays in canonical English per the rule's Exception — technical CR findings on the GitHub PR (severity labels, structured field labels, rule references, and code identifiers are all in English). The non-technical mirror that the wrappers delegate to @skills/pr-summary/SKILL.md follows the language of the source assignment — that is the wrapper's responsibility, not this skill's.git fetch, git checkout <branch>, and git pull when the branch tracks a remote (skip the pull for a local-only branch that has no upstream, e.g. the read-only fallback review of a branch that maps to no PR) — so the review always runs against the actual current codebase on disk (the checked-out working tree), never against a remote diff in isolation. Confirm local HEAD matches the change branch's head commit. If the branch cannot be checked out (missing ref, detached HEAD, or local changes that would be overwritten), stop and report it instead of reviewing from a diff. Every subsequent step reads the checked-out files so findings reflect the real state of the code.The CR wrappers publish the review through an always-new comment per CR run (both GitHub and JIRA — see @skills/code-review-github/SKILL.md and @skills/code-review-jira/SKILL.md). Every run POSTs a fresh comment so the chronological sequence of comments is the audit trail; history never lives in a tracker's edit history. Do not load prior CR findings from PR comments and do not author a Previous CR Status section in the output — the always-new-comment convention makes it redundant.
Before reviewing code, load and analyze the full issue context:
skills/code-review-jira/scripts/load-issue.sh <KEY|URL> and read all fields off the resulting JSON document — never call acli directly. Fall back to the JIRA MCP server only when the script is unavailable or for data outside its scope (changelog, available transitions, friendly custom-field names). For Bugsnag errors, call skills/code-review-bugsnag/scripts/load-issue.sh <URL|TRIPLE> (requires BUGSNAG_TOKEN) and read the error class, message, context, latestEvent.stacktrace, comments[], and linkedIssues[] off the JSON — never call api.bugsnag.com directly. Fall back to a Bugsnag MCP server only when the script is unavailable.Every CR run must explicitly verify both directions of the relationship between the diff and the linked assignment, then surface a single conformance verdict. When no tracker is linked (closingIssues[] empty for a GitHub PR, no JIRA / Bugsnag reference), skip the gate and state assignment conformance: no linked issue on the summary line.
@skills/assignment-compliance-check/SKILL.md and @skills/analyze-problem/SKILL.md (assignment-conformance scope) in Specialized Reviews; do not re-derive or duplicate their findings here — consume their result. Any unmet requirement (in production code or in test logic) is already a Critical finding raised there.file:line, the change in one sentence, and "no assignment requirement traces to this change". Severity: Moderate by default; escalate to Critical when the untraceable change alters observable behavior, touches a security / payment / auth surface, or adds a dependency. The Suggested Fix is to remove the change from this PR and, when it has independent value, move it to its own issue / PR. Do not duplicate a finding Simplicity First already raised for the same block — keep it here as the assignment-traceability finding and cite Simplicity First instead of emitting a second entry. The two lenses are not the same: Simplicity First owns unrequested complexity, while this gate owns traceability — a change can be perfectly simple yet still trace to no requirement (e.g. a one-line drive-by rename), and that case is this gate's to raise, not Simplicity First's.assignment conformance: conformant (every requirement implemented and every change traces to the assignment), or assignment conformance: N gap(s). The verdict is computed at Output assembly — after the Specialized Reviews have produced their results and after the Critical Findings Verification (issue #537) step has dropped any refuted Criticals — so it counts only gaps that survive into the published review and never contradicts the Counts line. N is the count of Critical assignment gaps (unmet requirements from step 1) plus out-of-scope findings (step 2), regardless of which surface publishes each one — step-1 gaps may appear on the linked-tracker compliance block while step-2 findings sit in the PR comment's severity buckets, but both count toward N. The verdict is always rendered on the summary line so a reader sees the conformance result without scanning the body; the individual findings live in their normal severity buckets.Two-part CR output (issue #737). This skill's walk-throughs above (Core Analysis through the Coverage gate) are the Technical review, published on the PR comment per Output Rules. The Functional review — a full acceptance-criteria checklist with a Goal met: Yes/No verdict — is built by @skills/assignment-compliance-check/SKILL.md and published on the linked-tracker comment via @skills/pr-summary/SKILL.md; it renders on every run with a linked tracker, including the affirmative report when every criterion is Met (the sole exception to this skill's omit-when-clean convention). The one-line verdict mirrors onto this skill's Summary line as assignment conformance: conformant / N gap(s) / no linked issue. Full contract: @rules/code-review/general.mdc Two-part CR output — Technical & Functional review.
Run this section only when the diff integrates with, modifies, or depends on a third-party API or external service (HTTP clients, vendor SDK calls, webhooks, OAuth flows, payload schemas, queue/event consumers backed by external systems).
@rules/php/core-standards.mdc); only when the diff exposes an out-of-scope structural shortcoming in how the project consumes the API (e.g. missing webhook signature verification across other consumers) raise it under Refactoring Proposals.@rules/code-review/general.mdc Core Analysis Walk-through). Apply every bullet there to the diff and raise one finding per violation at the severity it declares: Reuse of existing logic, Action scope, Speculative interfaces, Simplicity First, method-parameter-count (>4 → DTO), public-method raw-array-vs-DTO, new static-analysis / linter suppression, Strict rule compliance (mandatory walk-through), Architecture conformance (Laravel) (issue #530), Test organization (issue #528), per-row DB operations in loops, variable ordering / lazy evaluation, object caching, new storage reuse analysis, SQL index reuse / performance non-regression, refactoring quality + test-coverage contract, data-validation encapsulation, pass-through Action, repository scope, inline Eloquent / read-write layer separation, Action-returns-HTTP-response, inline data mapping → Data Builder, inline validation guards / throw_if / throw_unless / enum-mode match() → Data Validator, only-Laravel-and-arch-layers class inventory, Request → DTO transformation belongs in the FormRequest, not the controller, Data Modification (DRY), Entry-point error handling for known failures (Laravel), and Self-Documenting Code — Comment & Doc Hygiene.Apply this subsection only when the source issue is flagged as highest priority, so the bug fix can deploy as fast as possible without sacrificing the Critical / Moderate gate.
priority: highest, priority/highest, priority-highest, p0, urgent, or blocker.priority field equals Highest or Blocker.Always run:
MODE=cr as a pre-flight before any other specialized review — audits whether the dev database currently holds the fixture data the assignment scenarios need, and surfaces every scenario the diff should cover but the codebase / dev DB cannot reproduce. The CR uses its gap report to ground the rest of the review in real data; an empty gap report means later findings (assignment compliance, security, refactoring) are made against scenarios that genuinely exist, not against guesses. Surface the gap count in the PR comment summary line and treat any behavioral gap the skill reports as a Critical CR finding (the diff cannot satisfy a scenario the codebase does not support).@rules/code-review/general.mdc Two-part CR output): the full acceptance-criteria checklist with a Goal met: Yes/No verdict. The skill does not publish anywhere itself — it returns either the assembled ## Assignment Compliance markdown block, rendered on every run that has a linked tracker (including the affirmative report when every criterion is Met), or the status no linked issue — assignment compliance skipped (when no linked tracker exists). The CR wrapper passes the returned block as an embedded block to @skills/pr-summary/SKILL.md only when a block is returned so each linked tracker (GitHub issue or JIRA ticket) receives one consolidated comment per CR run (per issue #498); on the skip status the wrapper embeds nothing and surfaces the status on the PR comment summary line. Do not embed the block into the PR comment — that comment carries the Technical review only.@skills/assignment-compliance-check/SKILL.md already raises in its ## Assignment Compliance block — when both would surface the same gap, keep the technical Critical finding here (with reproducer fields, folded into the standard severity buckets) and let the compliance block carry only the non-technical mirror.@rules/api/general.mdc). The skill self-scopes: when the diff touches no HTTP API surface (routes, controllers / __invoke request handlers, API Resources / DTOs in responses, FormRequests, status-code handling, Idempotency-Key logic) it returns no findings. When it does, fold the Critical / Moderate / Minor findings (with their reproducer fields) into the standard severity buckets — do not duplicate a finding the Strict rule compliance walk already raised for @rules/api/general.mdc.MODE=cr — read-only refactoring lens scoped to the PR diff, run on every CR. The lens walks the skill's complete guideline set (its Refactoring Guidelines, its Laravel Context, and the behavior-preservation clauses of its Execution section) against the lines the PR actually touched — DRY duplication and oversized methods are the common case, not the boundary of the walk. Every item the lens returns is rendered in the published report. The guidelines that are walked, the routing of each returned item (severity bucket vs. Refactoring (DRY / tech debt) / Refactoring proposals), and the de-duplication + no-drop contract are all owned by @rules/code-review/general.mdc Refactoring & Tech Debt (DRY) Analysis — diff-scoped detail — follow it there rather than restating it here. MODE=cr guarantees the lens never modifies code, writes tests, commits, runs fixers, or chains another review — it returns proposals only. Do not propose changes that fall outside the diff.Run conditionally:
@rules/refactoring/general.mdc) → run the full refactoring skill set read-only. Detect this when the PR restructures existing code without adding a feature or changing observable behavior (extracted methods / classes, moved orchestration, renamed-for-clarity, dedup, layer reshuffles). When it fires, additionally invoke @skills/refactor-entry-point-to-action/SKILL.md with MODE=cr (and run the class-refactoring lens above at full depth) to surface the entry-point → Action proposals. Both skills run read-only — no code changes, no commits, no fixers, no review chaining — MODE=cr enforces this. Fold their output into the Refactoring (DRY / tech debt) section (in-scope items) and Refactoring proposals section (out-of-scope items) of the review; this skill never modifies code.@skills/mysql-problem-solver/SKILL.md is mandatory. Trigger this skill whenever the diff touches any of: raw SQL strings, Eloquent / query-builder calls (DB::, ->where(, ->join(, ->whereHas(, ->withCount(, ->orderBy(, ->groupBy(, ->chunk(, ->cursor(, paginate(, simplePaginate(), Eloquent relationship definitions, with( / load( eager loads, model scopes, ModelManager / Repository methods, database migrations (Schema::, up() / down()), seeders, factories that materialise rows, DynamoDB / NoSQL access. Pass the diff scope to mysql-problem-solver and capture its findings — they must appear in the published CR review under the dedicated ## Database Analysis section described in Output Rules, never silently absorbed into the generic Critical / Moderate / Minor buckets.Run this section over the PR diff only — never over untouched code.
The diff-scoped steps (per-block evaluation against @skills/class-refactoring/SKILL.md with MODE=cr, Livewire / Blade layout splitting, ->when() conditional query composition with the byte-for-byte semantics-preserving templates, and the in-scope vs. Refactoring Proposals routing) live in @rules/code-review/general.mdc Refactoring & Tech Debt (DRY) Analysis — diff-scoped detail. Apply them to the changed lines only — never over untouched code.
@rules/code-review/general.mdc Validation & Coverage Gate. Every acceptance criterion without a dedicated use-case test, and every uncovered changed line, is a Critical finding.Run this step after every preceding analysis step has produced its findings and before the Output assembly. Walk every Critical finding through @skills/analyze-problem/SKILL.md to confirm it reflects a real problem before it blocks the PR; the binary keep / drop procedure (Confirmed → keep verbatim, Refuted → drop entirely, never silently downgrade, Moderate / Minor exempt) is defined in @rules/code-review/general.mdc Critical Findings Verification (issue #537) — procedure.
Summary line are always rendered. The Summary line always carries the assignment conformance verdict from the Assignment Conformance Gate (assignment conformance: conformant / N gap(s) / no linked issue) so the reader sees whether the changes match the assignment without scanning the body. The Coverage: header line, the ## Coverage section, and the coverage … slot in the summary line are all conditional — render them only when the coverage gate produced something to report (uncovered changed lines or unavailable / non-runnable tooling, both Critical findings). When every changed line is at 100% coverage and the tool ran successfully, drop all three coverage surfaces; the Counts line is the clean signal. Every other section — Findings (including each severity sub-heading), Refactoring (DRY / tech debt), Refactoring proposals, Database Analysis, and any specialized-review sub-section — appears only when it has at least one item. Never emit None. / Not applicable. / n/a / 100% placeholders for empty sections or omitted coverage surfaces; drop the whole heading and body instead. History across CR runs is preserved by the tracker's edit history on the upserted comment — never re-create a Previous CR Status section in the body.## Architecture section (issue #530). On Laravel projects the architecture walk-through described in Core Analysis runs on every CR run, but the ## Architecture heading is rendered only when the walk produces at least one finding. When findings exist, render them under the heading with the standard Critical / Moderate / Minor severity grouping and the reproducer fields. When the walk produces zero findings, omit the heading entirely — never render a walked, 0 findings status line, a clean placeholder, or any other "the check ran" confirmation. The principle is the same as for every other section: report only items that still need action; an empty section is dropped. On non-Laravel projects (laravel/framework not in composer.json require), the ## Architecture section is omitted entirely — the section is Laravel-only by design.@rules/php/core-standards.mdc and, for Laravel projects, @rules/laravel/architecture.mdc. Use n/a — <reason> only when a snippet adds no value over the one-line Fix description (e.g. naming-only changes, dead-code removal, pointers to an existing helper whose name already says enough).@skills/process-code-review/SKILL.md can convert each finding into a reproducer test and apply the fix without re-deriving context.@skills/code-review-github/SKILL.md, @skills/code-review-jira/SKILL.md) must delegate the single consolidated comment on every linked issue in the originating tracker (GitHub issue, JIRA ticket, or both) to @skills/pr-summary/SKILL.md — the CR wrappers never author their own non-technical template. pr-summary produces a uniform "Summary of changes + How to test" comment understandable by non-technical project managers, rendered as GitHub Markdown for GitHub issues and JIRA Wiki Markup for JIRA tickets per @rules/jira/general.mdc. @skills/assignment-compliance-check/SKILL.md returns the Functional review markdown block on every run that has a linked tracker — including the affirmative Goal met: Yes checklist on a clean run — and the CR wrapper passes it as an embedded block to pr-summary, which appends it after How to test so the linked-tracker audience reads exactly one comment per CR run (per issue #498). Only when the compliance check returns the no linked issue — assignment compliance skipped status does the wrapper embed nothing. Technical findings still go directly on the PR comment.@rules/code-review/general.mdc Output Rules — Security & Translation Walks and raise one finding per match: Safe validation & error texts (issue #540), Malicious code & supply-chain indicators (issue #549), Malicious file upload content (issue #680), Translation completeness, Test isolation — no real HTTP, no real system processes, and the Database Analysis section rendering rule. Severities are declared there.templates/review-output.md.@skills/test-like-human/SKILL.md. The user-perspective testing skill runs on demand only (via /test-like-human or an explicit follow-up); CR-track skills must never chain into it.Use when reviewing HTTP API design in a PR or change set — endpoints, routes, HTTP methods, status codes, idempotency, and input validation. Treats the API as a consumer-facing contract and flags resource-orientation, method-semantics, status-code, and trust-boundary violations. Read-only.
Use when checking that the pull request implementation actually fulfills the business requirements stated in the linked issue or task. Returns a plain-language markdown block that is the Functional review half of the two-part CR output (`@rules/code-review/general.mdc` Two-part CR output — Technical & Functional review): a full checklist of every extracted acceptance criterion with its status (Met / Not met / Partial / Divergent) and an explicit Goal met: Yes/No verdict, rendered on every run that has a linked tracker — including the fully affirmative report when every requirement is satisfied. No local file is created and the block is not embedded in the GitHub PR comment.
Use when run code review for a Bugsnag error and publish results to the linked GitHub PR and the Bugsnag error
Use when perform code review for GitHub pull requests and post findings as PR comments plus a non-technical summary to every linked issue
Use when run code review for JIRA issues and publish results to GitHub PR and JIRA
Use when summarizing current PR changes for the development and product team. Analyzes all commits in the current branch, explains the purpose of changes, and produces a clear human-readable report that can be posted either as a GitHub PR comment (Markdown) or as a JIRA comment (Wiki Markup).