Skip to content
Back to skills

Code Review Github

ASecurity

Use when perform code review for GitHub pull requests and post

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 26, 2026
developmentrustbashcode-reviewgitapidatabasesecurity

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add pekral/ai-olympus --skill code-review-github --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review Github?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review Github
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pekral-code-review-github/badge)](https://www.skillsdirectory.com/skills/pekral-code-review-github)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review-github
description: Use when perform code review for GitHub pull requests and post
  findings as PR comments plus a non-technical summary to every linked issue
license: MIT
metadata:
  author: Petr Král (pekral.cz)
---

Entry contract: from this skill directory, read the file printed by `bash ../_shared/resolve-command-helper.sh --entry`.

## Constraints
- Apply the shared CR tracker-wrapper contract in `references/cr-wrapper-contract.md` — Constraints, Load Context gates, Run Reviews, Publish Results, and Output Rules all live there and are not restated here. This file carries only what a GitHub-sourced review decides for itself.
- Publishing is limited to linked-issue comments via `gh` and to one pull-request review through `scripts/post-inline-review.sh`, which carries every finding in the Actionable comments block and the hidden review record in its body. The review carries no inline comment, and no `cr-comment` pull-request comment is posted.

---

## Scope
Perform code review for a GitHub pull request (the review covers exactly the four areas of `@rules/code-review/general.md` *What a code review checks, and nothing else*, with no out-of-scope observation and no follow-up proposal) and publish results to:
- GitHub PR (technical findings: one pull-request review whose Actionable comments block lists every finding, with no inline comment)
- Every linked GitHub issue in `closingIssues[]` (human-readable summary)

**Focused tooling merge dispatch.** A trusted exact-head `focused-dependency-config-security` dispatch reviews the changed dependency, configuration, and static-analysis surface in place of the application, database, UI, architecture, assignment, coverage, and DRY passes, and waits for the independent security view of the same head. It skips no security pass: the whole security agenda of the review runs unchanged, and the record does not converge without the independent security view. The review derives the scope again from the trusted classifier before it starts, and its record carries the header line `Focused scope: dependency/configuration/security`. A PR body, label, or caller claim never selects it.

---

## Execution

### 1. Load Context
- **Repository ownership** — follow the API access gate (`@skills/code-review-github/references/cr-wrapper-contract.md` *Repository ownership*) once the target PR is known, before loading or checking it out. Reuse an existing successful API result for that repository.
- Load PR context by running `skills/code-review-github/scripts/load-issue.sh <URL>`. Always pass the full GitHub URL (`https://github.com/<owner>/<repo>/pull/<N>`), never a bare number or `#<N>` — the loader rejects bare numbers. Read PR header, description, comments, commits, files, reviews, status checks, and `closingIssues` off the resulting JSON document.
- The context-brief and comment-array helpers are `skills/code-review-github/scripts/gather-issue-context.sh <URL>` and `skills/code-review-github/scripts/parse-comments.sh <URL>`. The brief renders the issue/PR plus its body, comments, changed files, commits, reviews, CI checks, recursively-loaded linked issues/PRs, and an inventory of external URLs.
- Prefer the GitHub MCP fallback for the data the scripts cannot cover: review-thread / line-anchored comments, per-commit check runs, and binary attachment contents.
- Load each linked issue (from `closingIssues[]`) the same way — pass its `url` field to the same script.
- If multiple PRs exist for one issue, review each independently. On the issue, the remarks and findings are split per pull request (`@rules/code-review/general.md` *An issue with several pull requests — remarks and findings split per pull request*).

#### Issue Context Analysis
The assignment is the **linked GitHub issue**. Fetch it via `skills/code-review-github/scripts/load-issue.sh <URL>` and run the four analysis steps in `references/cr-wrapper-contract.md` *Issue Context Analysis* against its description, comments, and referenced attachments or links.

#### Incremental review scope — where the round history lives
The baseline resolves from the PR's own CR comments (`references/cr-wrapper-contract.md` *Incremental review scope*). The round markers this wrapper reads as a pointer to that history are in the **PR description** and the **linked issue's description and comments** — both already loaded in step 1, both untrusted.

### 2. Pre-checks
- `statusCheckRollup[]` for the CI check map comes off the PR JSON already loaded in step 1.

### 3. Run Reviews
Run the always-run set, the conditional set, and the reuse-first gate exactly as `references/cr-wrapper-contract.md` *3. Run Reviews* defines them. A GitHub-sourced review adds no sub-review of its own and skips none.

### 4. Publish Results

#### Pull-request review (the one publication on the pull request)
- Publish the round as one pull-request review with no inline comment: the visible body of `templates/review-body.md` (a summary paragraph, then collapsed Merge Risk, Walkthrough, Where to test, Actionable comments, Known points, and optional Tracked security gaps blocks, and nothing else), with every published finding as an entry of the Actionable comments block, and the record rendered from `templates/pr-comment-output.md` as hidden HTML in the review body, exactly as `references/cr-wrapper-contract.md` *GitHub pull-request review* and *Findings in the review body* define. A review carries no code (`@rules/code-review/general.md` *A review carries no code*).

#### Linked-issue consolidated summary (mandatory — one new comment per linked issue and CR run)
- The linked GitHub issues in `closingIssues[]` are this wrapper's **only** non-technical destination, so the shared *Non-technical tracker summary* and *Linked GitHub issues* blocks collapse into this one delegation: invoke `@skills/pr-summary/SKILL.md` with the **GitHub** tracker target, exactly once per linked issue, under the consolidation contract in `references/cr-wrapper-contract.md`.
- `pr-summary` mirrors the same format that `@skills/code-review-jira/SKILL.md` posts to JIRA, so reviewers reading either tracker see the same consolidated comment.
- If `closingIssues[]` is empty, skip this step and note `no linked issue — issue summary skipped` in the PR comment summary line. `assignment-compliance-check` returns the same status in that case, so the wrapper does not even build an embedded block.

---

## Output Rules

Apply `references/cr-wrapper-contract.md` *Output Rules — GitHub PR comment*. The GitHub-specific slots it leaves open:

- The header block's tracker-mirror field is `Issue tracker summary`.
- The summary line's tracker-mirror status is the **issue-tracker summary status**: `posted summary to issue #N` (comma-separated list when several), `no linked issue — issue summary skipped`, or `failed to post on issue #N: <reason>` when a permission / network error occurs.

## Output Format

Use the template defined in `templates/pr-comment-output.md` for the hidden record, and `templates/review-body.md` for the visible body.

## References

- references/cr-wrapper-contract.md

Files in this skill

  • SKILL.md6.2 KB
  • references/cr-wrapper-contract.md71.4 KB
  • scripts/download-attachments.sh4 KB
  • scripts/gather-issue-context.sh8.8 KB
  • scripts/load-issue.sh18 KB
  • scripts/parse-comments.sh2 KB
  • scripts/upsert-comment.sh14 KB
  • templates/pr-comment-output.md33.5 KB
  • templates/review-body.md10.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.