Install
$ agentstack add skill-pekral-cursor-rules-code-review-github ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Code Review (GitHub)
Purpose
Run a full code review for GitHub pull requests and publish findings directly to the PR.
Constraints
- Apply @rules/git/general.mdc
- Apply @rules/reports/general.mdc. The technical CR PR comment this skill posts on the GitHub PR (Status / Counts / Findings / Refactoring / Coverage / Summary) stays in canonical English per the rule's Exception — technical CR findings on the GitHub PR. The non-technical mirror delegated to
@skills/pr-summary/SKILL.mdfor everyclosingIssues[]linked GitHub issue follows the language of the source assignment. Never mix languages inside the same comment; never use bilingual Kritické (Critical) style parentheses. - Read-only skill — never modify code, never stage / commit / push changes, and never run any git write operation (
git add,git commit,git push,git reset,git checkout -- …, etc.). Checking out the relevant branch andgit pullto read the latest code are required (the mandatory Branch checkout gate below); mutating the working tree or pushing to the remote is not. Publishing is limited to PR / linked-issue comments viagh. - Output findings only (no praise)
Execution
1. Load Context
- Load PR context by running
skills/code-review-github/scripts/load-issue.sh— the single deterministic entry point. Never callgh issue view,gh pr view, orgh api /repos/.../issues/...directly. Read PR header, description, comments, commits, files, reviews, status checks, andclosingIssuesoff the resulting JSON document. - For a single ready-to-read context brief — the issue/PR plus its body, comments, changed files, commits, reviews, CI checks, recursively-loaded linked issues/PRs, and an inventory of external URLs, rendered as Markdown — run
skills/code-review-github/scripts/gather-issue-context.shinstead of hand-assembling the JSON. To read only the comments as a structured array, useskills/code-review-github/scripts/parse-comments.sh. Both build onload-issue.sh, so the same exit codes and MCP fallback apply. Attachment content and the inventoried URLs are not fetched by the scripts — read them with your own tools when a finding depends on them. - Load each linked issue (from
closingIssues[]) the same way — pass its number or URL to the same script. - If the script is unavailable (missing tool, exit code 2/3) fall back to the GitHub MCP server. Always prefer the MCP fallback for data the script cannot cover: review-thread / line-anchored comments, per-commit check runs, and binary attachment contents.
- If multiple PRs exist for one issue, review each independently
- Branch checkout gate (mandatory, always). Before running any review step, check out the PR branch (
headRefNamefrom the loaded JSON) and pull the latest commits —git fetch origin,git checkout,git pull— so the review always runs against the actual current codebase on disk (the checked-out working tree), never against theghremote diff in isolation. Confirm localHEADequals the PR head SHA from the loaded context. If the checkout fails (missing ref, detachedHEAD, or local changes that would be overwritten), stop and report it instead of reviewing from the diff. Every sub-review then reads the checked-out files.
Issue Context Analysis
Before reviewing code, load and analyze the full linked issue:
- Fetch the complete GitHub issue via
skills/code-review-github/scripts/load-issue.sh— description, all comments, and any referenced attachments or links come off the resulting JSON document. - Extract from the issue:
- Requirements and acceptance criteria — what the code must do
- Expected behavior — how the feature or fix should work
- Edge cases and constraints — mentioned by the reporter or in comments
- Test data — any sample inputs, payloads, or scenarios provided in the issue
- Use this context to evaluate whether the implementation fully satisfies the issue — not just whether the code is technically correct.
- If the issue contains test data or test scenarios, verify they are covered by existing or new tests. Flag missing test coverage as a finding.
Reviewer Comment Fulfillment Gate (mandatory)
Every CR run is also a verification that the reviewer feedback already on the PR was actually carried out. After loading all PR comments, the next CR iteration must confirm that each reviewer's comment is satisfied by the current diff and that the applied change corresponds to what the reviewer asked for — not merely that no new Critical / Moderate findings appeared. This is the gate that closes the loop with @skills/process-code-review/SKILL.md: the previous round applies fixes, this gate verifies they match the instructions before the run can converge.
- Load every reviewer comment. Read the PR's general comments and review summaries off the JSON loaded in step 1, and fetch the line-anchored review threads (resolved and unresolved) with the GraphQL
reviewThreadsconnection documented in@skills/process-code-review/SKILL.md(Load unresolved reviewer threads). Page untilreviewThreads.pageInfo.hasNextPage == falseand page each thread'scommentsthe same way — a truncated list breaks the "every reviewer comment" guarantee. Include human reviewers and review bots; exclude this skill's own status posts (the `/` marker bodies). - Keep only actionable instructions. Discard greetings, plain approvals (
LGTM,:+1:), and questions already answered in a later reply on the same thread. The remaining set is the reviewer instructions this PR must satisfy. - Verify each instruction against the checked-out diff. For every instruction, read the code path it targets on the checked-out branch and classify it:
- Fulfilled — the current diff implements exactly what the reviewer asked; the corresponding review thread is resolved or ready to be resolved.
- Not fulfilled — no change implements the instruction, or the change does not match what was asked (partial fix, wrong target, or a different change that does not satisfy the reviewer's intent).
- Rejected / deferred with a recorded reason — the PR author replied on the thread (or the PR description states) why the instruction is not applied; treat as resolved for this gate and carry the reason into the summary, do not raise a finding.
- Raise one finding per not-fulfilled instruction. Severity Critical (the PR carries unaddressed review feedback). Cite the reviewer comment URL, the
file:linethe instruction targets, the instruction in one sentence, and the four reproducer fields — Faulty Example (the current code that still violates the instruction), Expected Behavior (the state the reviewer asked for), Test Hint, Suggested Fix (the change that satisfies the instruction). A free-form reviewer instruction that implies no behavior change (naming, dead code, readability) carries the Suggested Fix only and may usen/a —for the snippet, mirroring the reproducer exemption in@skills/process-code-review/SKILL.md. - Record the fulfillment verdict on the summary line:
reviewer comments: M/N fulfilled(M = fulfilled or rejected-with-reason, out of N actionable). WhenM == Nthe gate is clean; whenM **Inline dispatch.** Each sub-review below runs **inline in this wrapper's context** — invoke each skill directly (@skills//SKILL.mdwith anyMODE=crflag), passing the PR URL / number and the branch already checked out, and declare the publishing contract for this CR run (quiet vs publish; see step 4). Each invoked skill must return its findings as the canonical markdown block (## Assignment Compliance` block, Critical / Moderate / Minor lists with reproducer fields, refactoring proposals). The CR wrapper then assembles the outputs into the final PR comment + linked-issue summary. Run the sub-reviews one at a time — do not dispatch them as parallel subagents.
> > The mysql-problem-solver / race-condition-review / refactor-entry-point-to-action conditionals follow the same rule: when their trigger fires, invoke them inline after the always-run set, still one at a time.
- Always run (inline, one at a time):
- @skills/assignment-compliance-check/SKILL.md — non-technical business-logic vs assignment check. The skill does not publish anywhere itself — it returns either the assembled
## Assignment Compliancemarkdown block (only when at least one Critical gap exists), the statusno critical gaps — assignment compliance block omitted(when the implementation satisfies every stated requirement), or the statusno linked issue — assignment compliance skipped(whenclosingIssues[]is empty). The CR wrapper passes the returned block as an embedded block to@skills/pr-summary/SKILL.mdonly when a block is returned so the linked-issue audience reads one consolidated comment per CR run (per issue #498) — on either 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 — keep the PR comment focused on technical findings and surface the consolidated-comment status in the summary line. - @skills/code-review/SKILL.md
- @skills/analyze-problem/SKILL.md — always run, scoped to assignment conformance, invoked inline and read-only (analysis-only — no plan artifact, no code / git writes). Compares the loaded issue requirements / acceptance criteria / expected behavior against what the PR diff actually implements and raises every unmet requirement as a Critical finding with reproducer fields. Canonical definition lives in
@skills/code-review/SKILL.mdSpecialized Reviews → Always run; it is distinct from the per-Critical-finding verification (issue #537) and must not duplicate gaps already raised byassignment-compliance-check. - @skills/security-review/SKILL.md
- @skills/class-refactoring/SKILL.md with
MODE=cr— read-only refactoring lens scoped to the PR diff. Surface DRY duplication and tech-debt-reducing changes that apply to lines actually touched by the PR.MODE=crguarantees no code changes, commits, fixers, or review chaining. Do not propose changes outside the diff.
- Run conditionally:
- Diff is a refactoring (behavior-preserving structural change per
@rules/refactoring/general.mdc) → run the full refactoring skill set read-only. When the PR restructures existing code without adding a feature or changing observable behavior, additionally invoke@skills/refactor-entry-point-to-action/SKILL.mdwithMODE=crto surface the entry-point → Action proposals. Both refactoring skills run read-only — no code changes, no commits, no fixers, no review chaining —MODE=crenforces this. Fold their output into the Refactoring (DRY / Tech Debt Reduction) section (in-scope) and Refactoring Proposals section (out-of-scope) of the PR comment. - Database operations detected in the diff →
@skills/mysql-problem-solver/SKILL.mdis mandatory. Trigger pattern list is owned by@skills/code-review/SKILL.mdSpecialized Reviews (raw SQL, Eloquent / query-builder calls, eager loads, model scopes, ModelManager / Repository methods, migrations, seeders, DynamoDB / NoSQL access). Capture its findings and surface them in the published PR comment under the dedicated## Database Analysissection (see Output Rules) — never silently fold them into the Critical / Moderate / Minor buckets. - Shared state → @skills/race-condition-review/SKILL.md
- Third-party API or service changes → ensure the Third-Party API & Service Analysis step from
@skills/code-review/SKILL.mdis executed for the diff
Refactoring & Tech Debt (DRY) Analysis (PR diff only)
- Restrict the analysis to lines added or modified in the PR — never review untouched code.
- For each changed block, apply
@skills/class-refactoring/SKILL.md(run withMODE=cr— read-only) and look for:
- duplicated logic that already exists elsewhere (DRY) — verify the change reuses existing logic instead of introducing a parallel implementation, per
@rules/code-review/general.mdcReuse Existing Logic section - data shaping repeated across Actions/Services/controllers/jobs/listeners/Livewire/commands
- oversized methods, deep nesting, mixed responsibilities introduced or amplified by the change
- when the PR is itself a refactoring (see the conditional trigger in Run Reviews), also fold in the entry-point → Action proposals from
@skills/refactor-entry-point-to-action/SKILL.mdrun withMODE=cr
- Each finding must include the file path, the affected line range, and a concrete refactoring that reduces tech debt.
- In-scope refactorings go into the Refactoring (DRY / Tech Debt Reduction) section of the PR comment template. Out-of-scope structural problems still belong in Refactoring Proposals.
4. Post Results
> Quiet mode (loop iterations from @skills/process-code-review/SKILL.md): when the caller explicitly requests "do not publish; return findings as in-memory markdown for this loop iteration only", skip the entire Post Results step — do not post the PR comment, do not post the linked-issue summary. Return the assembled review markdown to the caller and stop. Only the very last (publishing) call from process-code-review after convergence runs Post Results in full.
Always-new comment (per CR run)
- Every CR run posts a fresh PR comment. The helper never edits a prior comment in place — each run produces its own self-contained entry so reviewers see one comment per run, in chronological order. The hidden marker `` is still appended to the body for traceability (auto-appended by the helper), but it no longer drives an upsert lookup.
- Publish via
skills/code-review-github/scripts/upsert-comment.sh -(body on stdin). The helper detects the current actor (gh api user --jq .login), appends the marker, and POSTs a new comment. The published URL is emitted on stdout; the action (created) on stderr — log it in the PR comment summary line. - If the helper exits with code 2 (missing tool) or 3 (API failure), fall back to the GitHub MCP server's
addIssueComment— also as a fresh post. Never quote / reply to an earlier CR comment and never callupdateIssueCommentto edit one in place; the always-new-comment convention replaces the previous in-place edit flow.
Format
- Critical → Moderate → Minor → Refactoring (DRY / Tech Debt Reduction)
- Include file + line in the finding body
- Include actionable fix
- Post all findings inside the single PR comment — never as line-anchored review comments.
- If no findings:
- post the header block (Status / Counts / Last updated / Issue tracker summary) and the final
Summaryline only. TheCoverage:header line, the## Coveragesection, and thecoverage …slot in the summary line are all dropped when every changed line is at 100% coverage and the tool ran successfully — only render them when the coverage gate produced uncovered changed lines (Critical findings) or unavailable / non-runnable coverage tooling (Critical finding). Omit every other section entirely. Do not append a "No findings identified" line — the Counts lineCritical 0 · Moderate 0 · Minor 0 · Refactoring 0already signals the clean state and the omitted sections confirm there is nothing to fix.
Linked-issue consolidated summary (mandatory — single comment per linked issue)
- After posting the PR comment, delegate the single consolidated summary on every linked issue listed in
closingIssues[]of the JSON loaded in step 1 to@skills/pr-summary/SKILL.md. This CR skill must not author its own non-technical template — the goal is a uniform "Authors / Available behind / Summary of changes / How to test" output across both trackers that non-technical project managers understand
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: pekral
- Source: pekral/cursor-rules
- License: MIT
- Homepage: https://pekral.cz
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.