skills/process-code-review/SKILL.md
Use when processing pull request code review feedback. Finds the latest PR for a task, resolves review comments, updates review status, and triggers the next review cycle.
npx skillsauth add pekral/cursor-rules process-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.
Constraint:
@skills/pr-summary/SKILL.md on the linked issue / JIRA ticket follows the language of the source assignment. Never mix languages inside the same comment; never use bilingual Kritické (Critical) style parentheses.@rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, and @rules/laravel/livewire.mdcskills/code-review-github/scripts/load-issue.sh <NUMBER|URL> — the single deterministic entry point. Never call gh issue view, gh pr view, or gh api /repos/.../issues/... directly. Read review comments, files, commits, status checks, and closingIssues off the resulting JSON document. If the script is unavailable (missing tool, exit code 2/3) fall back to the GitHub MCP server, and always prefer the MCP fallback for review-thread / line-anchored comments that the script does not return.load-issue.sh returns general comments[] and reviews[] but never the line-anchored review threads nor their resolved/unresolved state. Fetch them deterministically with the GraphQL reviewThreads connection — this is not one of the forbidden REST endpoints (gh issue view, gh pr view, gh api /repos/.../issues/...):
gh api graphql -f query='
query($owner:String!,$repo:String!,$number:Int!,$cursor:String){
repository(owner:$owner,name:$repo){
pullRequest(number:$number){
reviewThreads(first:100, after:$cursor){
pageInfo{ hasNextPage endCursor }
nodes{
id isResolved path line
comments(first:100){ nodes{ author{login} body url createdAt } }
}
}
}
}
}' -F owner=<owner> -F repo=<repo> -F number=<number>
Do not accept a truncated list — the "every unresolved thread" guarantee depends on completeness. When reviewThreads.pageInfo.hasNextPage is true, repeat the query with -F cursor=<endCursor> until it is false; when any thread's comments.nodes reaches the page size, page that thread's comments the same way. If gh api graphql is unavailable, fall back to the GitHub MCP server for the same thread list plus its resolved state.comments[]).reviewThreads query — add every thread where isResolved == false (human reviewer and bot) as a checklist item, and skip every thread where isResolved == true. Record each thread's id so it can be marked resolved once its fix lands (see Resolve addressed reviewer threads below).For every Critical and Moderate finding, extract the reproducer fields published by the CR skills (@skills/code-review/SKILL.md, @skills/code-review-github/SKILL.md, @skills/code-review-jira/SKILL.md, @skills/security-review/SKILL.md):
n/a — <reason> when the Fix narrative is sufficient)Read the reproducer fields off comments[] and body / descriptionText returned by the deterministic loader for the originating tracker instead of re-fetching the issue:
skills/code-review-github/scripts/load-issue.sh <NUMBER|URL>. Never call gh issue view, gh pr view, or gh api /repos/.../issues/... directly.skills/code-review-jira/scripts/load-issue.sh <KEY|URL>. Never call acli directly.Use these to write a failing test before applying the fix:
n/a); rerun the test until it passes.If a CR-skill finding lacks Faulty Example, Expected Behavior, or Test Hint, request a CR rerun rather than guessing — the CR skills are responsible for providing them. Suggested Fix may legitimately be n/a per the CR rules.
Free-form reviewer threads are exempt from the reproducer requirement. Unresolved threads written by human reviewers will not carry the four structured fields. Do not request a CR rerun for them and do not block. Instead, derive the intent from the comment text, apply the minimal best-effort fix that satisfies it, and add or adjust a test at your discretion (a regression test when the comment describes a behavior bug; none when it is a naming / readability / dead-code remark). Keep the change scoped strictly to what the reviewer asked for. The exemption removes only the mandatory reproducer workflow — a behavior-changing best-effort fix still has to satisfy the diff-scoped coverage gate enforced by the Review loop below (@rules/php/core-standards.mdc Testing).
@skills/code-review/SKILL.md). Do not gate on the full-suite coverage percentage during a CR / review loop iteration.php artisan migrateThis is a blocking loop. Do not advance to Finalization, PR update, or Completion until the loop converges. The final report (technical and non-technical) is published only once, after convergence.
iteration = 1 and maxIterations = 5 (safety net to avoid runaway loops).@skills/code-review-github/SKILL.md@skills/code-review-jira/SKILL.md
The review run must not publish to the PR or to the issue tracker — capture findings in memory only. (See Quiet review runs below for how to suppress publishing.)criticalCount and moderateCount in the latest review.criticalCount + moderateCount == 0 → converged, exit the loop.iteration, and go back to step 2.iteration > maxIterations and the loop still has not converged, stop and surface the remaining findings to the user — do not push or publish a partial report. The user must triage the residual findings manually before any final report goes out.code-review-github and code-review-jira honour the suppression: no PR comment, no JIRA comment, no linked-issue summary is posted while the loop is still iterating.criticalCount + moderateCount == 0) is the only iteration whose output is published — that publication is performed by the PR update + Completion steps below, not by the review skill itself.build.xml/phing.xml; fall back to Composer scripts in composer.json)Precondition: the Review loop above must have exited with criticalCount + moderateCount == 0. If the loop hit maxIterations without converging, do not proceed — return the remaining findings to the user for manual triage instead.
@skills/test-like-human/SKILL.md. The user-perspective testing skill runs on demand only — leave it for the user to trigger via /test-like-human after the PR is updated.@rules/git/general.mdc)@rules/reports/general.mdc)Precondition: same as Finalization — convergence required.
cr-status marker namespace, so the status comment lives in its own per-(PR, actor) slot — separate from the CR comment (cr-comment namespace) — and follow-up converge runs edit it in place instead of stacking on top of it. Concretely:
skills/code-review-github/scripts/upsert-comment.sh <PR-NUMBER|URL> - cr-status (body on stdin). The helper appends <!-- cr-status:actor=<gh-login> --> to the body, locates any prior cr-status-namespaced comment by the same actor, and either PATCHes it or POSTs a fresh one. Action (created|updated) is logged on stderr; include it in the in-conversation completion report.skills/code-review-jira/scripts/upsert-comment.sh <KEY|URL> - cr-status. The helper appends {anchor:cr-status-actor-<slug>} and edits / adds the comment via acli (JIRA MCP fallback on exit code 4).cr-comment namespace) stays untouched by this skill; only the actor-owned cr-status comment is edited.After the fixes are committed and pushed (Finalization above), mark every reviewer review thread whose finding was actually fixed as resolved, using the thread id captured during intake:
gh api graphql -f query='mutation($threadId:ID!){ resolveReviewThread(input:{threadId:$threadId}){ thread{ isResolved } } }' -F threadId=<thread-id>
cr-status report instead of resolving it.gh api graphql is unavailable, fall back to the GitHub MCP server's resolve-review-thread operation.Every resolved review point in the PR comment must include a brief justification using this format:
- [x] {short finding title}
- **Why:** {what was wrong / what the reviewer asked for}
- **Reason:** {root cause or rule that was violated}
- **Solution:** {what was changed and why this is the best fit}
Rules:
Precondition: Review loop has converged (criticalCount + moderateCount == 0).
@skills/code-review-github/SKILL.md@skills/code-review-jira/SKILL.mddevelopment
Use when autonomously resolving the oldest open GitHub issue end-to-end. Picks the oldest open issue (optionally filtered by label, default `Resolve_by_AI`), delegates resolution to `resolve-issue`, then runs `code-review-github`, `process-code-review`, and `merge-github-pr` on the resulting pull request. Stops and reports any blocker (merge conflict, failing CI, unresolved Critical/Moderate findings) instead of force-merging.
testing
Use when analyzing a specific security threat from a referenced source (CVE, GHSA, security advisory, blog post, or write-up). Produces a human-readable remediation report with step-by-step instructions an AI agent can follow to eliminate the threat in the current project.
development
Use when preparing data and context before /resolve-issue, TDD, or CR runs. Loads the assignment, extracts every concrete user scenario from the task description and acceptance criteria, maps each scenario to the codebase, seeds the development database with the records needed to reproduce the bug or feature end-to-end, and reports any gap that would force the implementing agent to hallucinate.
development
Use when preparing a concise QA report for an internal tester from a JIRA task and its linked pull requests — focused on what the tester should report back to the dev team — and posting it as a JIRA comment.