dx-code-review
/dx-code-review
Use when asked to review a pull request or merge request, posting findings as inline comments on the request itself. Triggers on "review this PR", "review this merge request", "give me feedback on this PR", "post findings to PR", "add review comments to the pull request", or any request to review a pull request. Reviews a pull request only: it does not review an uncommitted local working branch.
- Author
- transformteamsg ↗
- Repository
- dx-harness ↗
- Licence
- GPL-3.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 8
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
GPL-3.0, otwarta.
What it does and when to use it
Use when asked to review a pull request or merge request, posting findings as inline comments on the request itself. Triggers on "review this PR", "review this merge request", "give me feedback on this PR", "post findings to PR", "add review comments to the pull request", or any request to review a pull request. Reviews a pull request only: it does not review an uncommitted local working branch.
Triggers from the description
Original author description
Use when asked to review a pull request or merge request, posting findings as inline comments on the request itself. Triggers on "review this PR", "review this merge request", "give me feedback on this PR", "post findings to PR", "add review comments to the pull request", or any request to review a pull request. Reviews a pull request only: it does not review an uncommitted local working branch.
How it works
- Getting the pull request
- The standard
- Severity levels
- Analysis
- Review angles
- The review sequence
- Rules
SKILL.md preview
---
name: dx-code-review
description: 'Use when asked to review a pull request or merge request, posting findings as inline comments on the request itself. Triggers on "review this PR", "review this merge request", "give me feedback on this PR", "post findings to PR", "add review comments to the pull request", or any request to review a pull request. Reviews a pull request only: it does not review an uncommitted local working branch.'
---
# Code review
Reviews a pull request with 8 angles across its diff and posts findings as inline comments on the request. Works on GitHub pull requests and GitLab merge requests.
Reads and reports only. Never edits a file, never commits, never issues a merge verdict.
---
## Getting the pull request
- **Link or number provided** → use it, go to the sequence.
- **Nothing provided** → ask, then wait:
> "Which pull request should I review? Paste the link, or give me the number if it is in this repository."
Never fall back to reviewing the working branch. There is no local-branch mode.
Run the sequence in a fresh subagent. Pass it this `SKILL.md`, the link or number, and nothing else.
---
## The standard
Approve better, not perfect. The bar is whether the change leaves the system healthier than it found it.
- **Only 🔴 Important blocks.** Everything else is a suggestion the author may decline without reply.
- **Never issue a merge verdict.** Report the findings and stop. "No blocking findings" is allowed; "good to merge" is not.
## Severity levels
| Level | Blocking | What it means |
|-------|----------|--------------|
| 🔴 **Important** | Yes | A bug that should be fixed before merging. |
| 🟡 **Nit** | No | A minor issue, worth fixing but not blocking. |
| 🟣 **Pre-existing** | No | A bug that exists in the codebase but was not introduced by this PR. |
---
## Analysis
Run on the diff from sequence step 4, then return to the sequence.
### Before step 1: the repository's review instructions
Read `REVIEW.md` at the repository root. Only the root file; ignore any nested one.
- **Present and readable** → apply it for the rest of the run. It can add rules to check and paths to skip.
- **Present but unreadable** → stop the review, name the file and the error, post nothing.
- **Absent** → run as this file describes, and say nothing about it.
Skip rules act on the diff: remove every matching path before step 1, so no angle sees them and they consume no candidate ceiling or nit budget. Record the skipped paths for the summary.
A finding produced by a rule from `REVIEW.md` names that rule.
### The steps
1. Run the issue and test plan check (below). It must complete before the angles.
2. Run all 8 review angles (below) on the diff. Collect candidates with `file`, `line`, `summary`, `failure_scenario`, and a severity from the table above.
- **Raise every candidate the angle finds, then trim.** Do not stop looking at a count. Rank what the angle raised, carry the top 6 forward, and record the angle name and the number trimmed for the summary. The ceiling bounds what is posted, not what is examined: an angle that stops analysing at its sixth candidate loses the seventh defect outright instead of deferring it.
3. Deduplicate:
- **Within the candidate list** — same defect at the same location, keep one.
- **Against the All open threads set** from sequence step 3 — where a thread already covers the same issue at the same `path` and `originalLine`, or the same concern in substance whoever posted it, drop the candidate.
4. **Decide how many findings can post, before verification.** No candidate reaches step 5 unless it can still post.
- **Never cap Important or Pre-existing.**
- **With an overlay, drop every candidate whose pattern it suppresses:** not tagged, not verified, not posted. Count the drops for the summary. Only an overlay row whose `Status` starts with `suppressed` suppresses a pattern. With no overlay, skip this bullet.
- **On a re-review (Any skill thread non-empty), hold back every nit, unverified.** Carry the count to the summary.
- **Otherwise cap nits at 5.** The cap is global, not per-angle, so one angle may use all 5. Rank a candidate that already cites a `file:line` above one that does not, then diff order; keep the first 5 and carry the number held back to the summary.
**Backfill a kept nit that step 5 drops:** pull the next ranked nit in, verify it, and repeat until 5 nits stand or the ranked list is empty.
5. **Verify each surviving candidate in one pass.** Take one candidate, do all three parts below on it, then take the next.
**Part 1. Label it CONFIRMED, PLAUSIBLE, or REFUTED**, and carry the label into the comment.
- **CONFIRMED** requires evidence, not inference: for a behaviour claim, hold the `file:line` that establishes it. A function named `validateInput` is not evidence that it validates.
- **A behaviour claim with no citation is dropped**, not downgraded. It never posts and never reaches the summary counts.
- **PLAUSIBLE by default:** races, nil on rare-but-reachable paths, falsy-zero, off-by-one, regex missing anchor. These post, labelled as plausible. The default yields to evidence: a cited line that settles one makes it CONFIRMED. The shape of the defect never decides the label on its own.
- **A Removed behaviour finding cites the removal in the diff**, not the file.
- **REFUTED only when provably wrong** — cite the line or invariant that rules it out.
- **Drop a REFUTED candidate here**, and run neither part below on it.
Citations are required for behaviour claims only. For Simplification, Reuse, and Altitude, the diff is the evidence.
**Part 2. Validate the suggestion against the repo's manifest**, only where the suggestion names a library, a library API, or a shell command. Skip it for any other suggestion. Where it applies, read the manifest (`package.json`, `go.mod`, `requirements.txt`, `Gemfile`):
- **Found** → check any library named in the suggestion exists at the installed version; revise it, or note the upgrade it needs.
- **None** → note that no manifest was found, and trace any shell command in the suggestion against the failure modes described.
**Part 3. Classify the agent pattern, only where sequence step 4 fetched an overlay.** With no overlay, skip this part, and the finding carries no Recurring pattern line. Where it applies, match the finding's `Pattern name` / `Trigger` against two sources read together:
- the reviewed repository's `review/agent-patterns.md`, fetched in sequence step 4 — **never read from disk**
- this skill's [references/agent-pattern-standard.md](references/agent-pattern-standard.md)
Where both carry the same `AP-NNN`, the repository's row wins. Tag matches `[AI-PATTERN]`.
**This part reads and tags. It writes nothing.**
### Step 1 in detail: the issue and test plan check
Checks the change against the issue it closes and the tests against the stated test plan. Can stop the review, or add an Important finding of its own.
Steps, the shape-to-contract table, and the exact prompts: [references/issue-and-test-plan-check.md](references/issue-and-test-plan-check.md).
---
## Review angles
Eight, run by analysis step 2: Line-by-line, Removed behaviour, Security, Cross-file, Reuse, Simplification, Efficiency, Altitude.
Design is not among them. Send a design question to the design skills.
Checklists, and the severity floor Security sets: [references/review-angles.md](references/review-angles.md). Run all eight.
**Correctness first.** On the lower-altitude angles (Simplification, Reuse, Efficiency, Altitude), raise only genuine problems, not cosmetic preferences.
---
## The review sequence
Source the diff from the forge's CLI. The branch is never checked out and no file is written.
Write every `summary`, `failure_scenario`, and outcome line following [House
style](../../../procedures/house-style.md). The structural format each comment
type takes is fixed by the references below; house style governs the prose
inside it. Run the lint that its Before you post it section names over each
comment body before you post it.
Every posted comment ends with this footer, `{model}` replaced by the current model ID (for example `claude-sonnet-4-6`):
```
---
*🤖 dx-code-review · {model}*
👍 helpful / 👎 not helpful
```
The marker line identifies the comment as this skill's on a later run, which is how a re-review is detected.
The second line goes on an inline finding only, and the summary comment omits it: a summary is not a finding, so there is nothing there to judge. A 👍 or 👎 on the comment is the author's verdict on whether that finding was worth raising, and sequence step 3 of a later run reads it back.
1. Resolve the forge, the repository, and the request number per [../../../procedures/pr-mechanics.md](../../../procedures/pr-mechanics.md) § Resolving the request and its repository. That procedure owns the URL-beats-remote rule, both forge URL shapes, the bare-number case, the `--repo` discipline, and the CLI check. Do not re-derive any of it here.
The commands below are GitHub's. For GitLab, use the equivalents in that procedure's command map and its reviewing section; everything else in this sequence is identical. Report in the platform's own vocabulary.
2. Fetch request metadata. `headRefOid` is `{head_sha}`, used in step 4:
```bash
gh pr view {number} --repo {owner}/{repo} --json number,headRefName,headRefOid,baseRefName,title
```
3. Fetch every existing review thread, for dedup (analysis step 3) and resolution (step 6):
```bash
gh api graphql -f query='
query($owner: String!, $repo: String!, $number: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
body path originalLine
reactionGroups { content users { totalCount } }
}
}
}
}
}
}
}' -f owner="{owner}" -f repo="{repo}" -F number={number}
```
Derive three sets:
- **All open threads** — `isResolved` is false. Used for dedup in analysis step 3.
- **Open skill threads** — of those, `comments[0].body` contains `code-review`. Used for resolution in step 6.
- **Any skill thread** — every thread whose `comments[0].body` contains `code-review`, resolved or not. Non-empty means this is a re-review. Resolved threads count. Used for the re-review rule in analysis step 4.
- **Helpfulness verdicts** — for each skill thread, the `THUMBS_UP` and `THUMBS_DOWN` counts from its first comment's `reactionGroups`. This is the author's verdict on findings this skill posted before. Carry the totals to the summary.
**Report the verdicts and nothing more.** One 👎 silences no pattern and drops no finding. Suppression is the registry's, and it has a threshold.
4. Fetch the diff and the repository's pattern overlay:
```bash
gh pr diff {number} --repo {owner}/{repo}
gh api "repos/{owner}/{repo}/contents/review/agent-patterns.md?ref={head_sha}" -q '.content' | base64 -d
```
Check the overlay fetch's result in order and take the first that fits:
- **Prints the file** → an overlay. Run analysis steps 4 and 5 as written.
- **Fails with `(HTTP 404)`** → no overlay. Skip the suppression bullet in analysis step 4 and Part 3 of analysis step 5.
- **Fails with anything else**, such as `(HTTP 401)`, `(HTTP 403)`, or a network error → stop the review, name the file and the error, post nothing. A request to skip the patterns does not turn this into the 404 branch.
**Never read `review/agent-patterns.md` from disk.**
5. Run the analysis (above) on the diff from step 4.
6. Resolve addressed conversations. For each **open skill thread** the current diff has addressed:
```bash
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}' -f threadId="{thread_id}"
```
7. **Post once.** Post every finding that no analysis step dropped, including one that skips step 5, such as the issue and test plan check's missing-test finding. Post them as a **single review**, not one comment per finding: [references/inline-comment-format.md](references/inline-comment-format.md) for the `gh api` invocation and its fallback.
8. Print the outcome and summary per [references/summary-format.md](references/summary-format.md). Three outcomes: every path skipped, nothing found, findings posted.
---
## Rules
**Code excerpts:** 5–15 lines of context · correct language fence identifier · mark the problem line with `// ←`
**Address the code, never the author:** rewrite any candidate phrased at the developer ("why did you", "you forgot to") before posting. Never submit the original phrasing
**Blocking:** only 🔴 Important blocks. Declining a 🟡 or 🟣 needs no reply
**Problem statements:** name the concrete failure, inputs → wrong output, crash, or data loss. Never "this could be a problem"
**Fix suggestions:** always show corrected code. If no single fix is right, show two options with a one-line tradeoff note
**What looks good:** always include. Specifics only, 2–4 bullets
**Scope:** the nit cap and the re-review rule run at analysis step 4, before verification. Every Important and Pre-existing candidate is verified unless the overlay suppresses its pattern, and every one that survives verification posts
**Repository instructions:** only the root `REVIEW.md` is read. A finding from one of its rules names that rule. Skipped paths leave the diff before any angle sees them, and the summary reports them
**Repository identity:** the reviewed repository comes from the pull request, never the working directory (resolution and the `--repo` discipline live in `pr-mechanics.md`). The pattern overlay is fetched from that repository, never read from disk
**Working tree:** never edit, create, or commit a file, including `review/agent-patterns.md`
**Refuted findings:** drop silently. No strikethrough, no "considered but dismissed", no mention
**Reviewer To-Do:** one bullet per test-plan scenario the issue and test plan check found no automated test for, phrased as an action ("Manually test: ..."). That check is where every bullet comes from, and it adds none for a scenario the branch's coverage declaration records as manual and the request body already names. A manual check a finding wants goes in that finding's suggestion. Include the section whenever it is non-empty; omit the heading entirely when empty
Files in this package (8)
- SKILL.md 14 KB
- evals/evals.json 25 KB
- references/agent-pattern-registry.md 3 KB
- references/agent-pattern-standard.md 4 KB
- references/inline-comment-format.md 4 KB
- references/issue-and-test-plan-check.md 5 KB
- references/review-angles.md 8 KB
- references/summary-format.md 3 KB
Versions
The database has no other skills named dx-code-review.
Database snapshot: 13.11.2026 · package version 0cd7c6d32c23 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pr-review-comments
Guide for submitting/posting inline PR review comments to GitHub. Use this when you need to post code review comments on specific lines of a Pull Request. - 100post-code-review-to-pr
Run a full pull request review and post review comments directly to the current branch's GitHub PR. Requires the gh CLI to be installed and a PR to already exist for the current branch. Use when you want review feedback posted to GitHub as PR comments. For local code review… - 95revdeck
Review a merge/pull request with the local revdeck. Two scenarios: work through and close the findings on your own MR/PR, or review someone else's. Use when asked to work through review comments, respond to findings, fix code according to review, or check an MR/PR/branch/diff. - 96code-review
This skill should be used when the user asks to code-review a GitHub pull request ('review PR #123', 'code review this pull request') with multi-agent confidence-scored analysis; pass --comment to post findings as inline comments on the PR. For reviewing local uncommitted… - 100review-pr
Review an existing GitHub pull request and post inline review comments on its diff. Use when the changes are on an opened PR rather than your local working tree. - 100merge-request-review
Use when reviewing a merge/pull request or a branch diff before merge - "review this MR", "review this PR", "validate this branch diff", "review cette MR", "review cette PR", "valide ce diff de branche", before integrating someone else's work into the mainline.