code-review
/code-review
This skill should be used when the user asks for a code review of a change — a pull request, merge request, branch, commit range, working-tree change, or pasted diff — covering correctness, security, performance, structure, and repository-specific rules. Trigger on phrases like "review this PR", "review this MR", "code review", "review my changes", "review this diff", "look over this branch", "is this ready to merge", "any issues with these changes", "merge-readiness check", or "give me feedback on this change", for GitHub, GitLab, or a local repository. For a security-only deep audit of a fea
- Author
- E1i2e1122 ↗
- Repository
- daiv ↗
- Licence
- Apache-2.0
- Last repository change
- 04.11.2026
Assessment and security
- Files in this package
- 7
- Scripts
- 0
- HTML comments
- 4
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- SKILL.md zawiera komentarze HTML (4). Nie widać ich w podglądzie Markdown, a model je czyta.
What it does and when to use it
This skill should be used when the user asks for a code review of a change — a pull request, merge request, branch, commit range, working-tree change, or pasted diff — covering correctness, security, performance, structure, and repository-specific rules. Trigger on phrases like "review this PR", "review this MR", "code review", "review my changes", "review this diff", "look over this branch", "is this ready to merge", "any issues with these changes", "merge-readiness check", or "give me feedback on this change", for GitHub, GitLab, or a local repository. For a security-only deep audit of a fea
Triggers from the description
Original author description
This skill should be used when the user asks for a code review of a change — a pull request, merge request, branch, commit range, working-tree change, or pasted diff — covering correctness, security, performance, structure, and repository-specific rules. Trigger on phrases like "review this PR", "review this MR", "code review", "review my changes", "review this diff", "look over this branch", "is this ready to merge", "any issues with these changes", "merge-readiness check", or "give me feedback on this change", for GitHub, GitLab, or a local repository. For a security-only deep audit of a fea
How it works
- 1. Resolve the review context
- 2. Find the previous platform review
- 3. Prepare one canonical diff
- 4. Select and dispatch subagents
- 5. Aggregate the reports
- 6. Return the report
- Non-negotiables
SKILL.md preview
--- name: code-review description: This skill should be used when the user asks for a code review of a change — a pull request, merge request, branch, commit range, working-tree change, or pasted diff — covering correctness, security, performance, structure, and repository-specific rules. Trigger on phrases like "review this PR", "review this MR", "code review", "review my changes", "review this diff", "look over this branch", "is this ready to merge", "any issues with these changes", "merge-readiness check", or "give me feedback on this change", for GitHub, GitLab, or a local repository. For a security-only deep audit of a feature or codebase area rather than a multi-dimension review of a specific change, use the `security-audit` skill instead. --- # Code Review Run a comprehensive review using multiple specialized agents, each focusing on a different aspects. The final message is the only deliverable. Never create a platform discussion, review, comment, or note yourself. When the request came from a pull-request or merge-request comment, the platform layer posts your final message automatically. ## 1. Resolve the review context Use the same workflow for GitHub pull requests and GitLab merge requests. - **Platform review:** the request arrived from a PR or MR comment. Use the platform context and read tools to identify the change and previous DAIV reviews. Include the review marker, run number, and footer in the final message. - **Interactive review:** any chat or CLI request, including a PR or MR the user merely pointed at, a local change, or a pasted diff. Return the report directly without a marker or footer. Choose the review scope in this order: 1. Use an explicit diff, commit range, branch range, path set, PR, or MR named by the user. 2. Treat a pasted diff as the authoritative change when repository refs are unavailable. 3. For a platform review, use the PR or MR base and head. 4. Otherwise review the current working-tree change, including staged, unstaged, and new files. Ask when the intended scope is ambiguous. Resolve refs to commit SHAs before using them in shell commands. ## 2. Find the previous platform review For a platform review, load the appropriate GitHub or GitLab read tool and list all comments or notes, following pagination. Do not use any write action. DAIV review comments contain: ```text <!-- daiv:code-review run=N head=<full-sha> --> ## Code Review #N ``` A marker counts only when: - the comment was authored by DAIV's account; - it matches the marker grammar exactly, with a 40-character hexadecimal head SHA; - the comment contains at least one review section or a `No findings` result. Ignore every other marker. The next run number is the highest valid run plus one. The previous review is the newest valid comment among those with the highest run number. Its marker supplies the previous reviewed head. - With no valid previous review, review the full current change as run 1. - If comments cannot be read, review the full current change as run 1 and mention that previous reviews could not be checked. - If the current head equals the previous reviewed head, return `Already reviewed at <short-sha> — no new commits since review #N.` and stop without a marker. - Otherwise review only the changes since the previous reviewed head, restricted to paths in the current PR or MR. - If the previous head is missing, is not an ancestor of the current head, or cannot produce a trustworthy incremental diff, review the full current change and mention the fallback. ## 3. Prepare one canonical diff Create one canonical diff for the resolved scope before dispatching subagents. Write it to a unique file in the current run scratchpad and retain its line count. Pass the same immutable file to every subagent, apart from the slices described below. All subagents must review that same change. For platform reviews: - First review: use the full base-to-head PR or MR diff. - Re-review: use the previous reviewed head to current head range, restricted to paths in the current PR or MR. For working-tree reviews, ensure the canonical diff contains staged changes, unstaged changes, and complete unified patches for untracked files. When the canonical diff is longer than 1,000 lines, also split it into slices for `cr-correctness` and `cr-structure`: one slice per 1,000 lines, at most four, each holding whole file patches in diff order with roughly equal line counts. Write each slice to its own file and retain its line count. The slices together must contain every line of the canonical diff exactly once. When test files changed, also write a test slice for `cr-tests`: the whole patches of the changed test files only, in diff order. Retain its line count. If shell access is unavailable, obtain the changed hunks from the platform read tool and provide that canonical diff to the subagent. Do not substitute complete new-side files: that would include pre-existing code outside the review scope. If no trustworthy changed-hunk diff can be obtained, explain that the review could not be completed and stop without a marker. Preserve paths without shell interpolation; use NUL-delimited changed-path lists when supported so spaces, renames, and unusual filenames remain intact. Do not load a large full diff into the parent context. Build a concise applicability summary from: - the PR or MR title and description, when available; - changed paths and file statuses; - the diffstat; - hunk headers and a small changed-code preview only when needed. ## 4. Select and dispatch subagents Select applicable subagents from the concise summary. Identify the kinds of files and changes involved, then run every plausibly relevant reviewer. | Subagent | Dispatch when | |---|---| | `cr-correctness` | behavior, source, tests, configuration, schemas, migrations, dependencies, CI, or infrastructure changed | | `cr-structure` | source structure, public interfaces, types, modules, data models, or multi-file design changed | | `cr-tests` | test files changed | | `cr-security` | authentication, authorization, input, trust boundaries, secrets, dependencies, configuration, CI, deployment, file access, commands, or data exposure may be affected | | `cr-performance` | database access, collections, loops, network or file I/O, caching, serialization, async work, concurrency, or resource use may be affected | | `cr-custom-rules` | `.agents/review-rules.md`, `AGENTS.md`, or `.agents/AGENTS.md` exists locally or in the reviewed repository; provide each source as an accessible absolute path or inline content | Bias toward inclusion when applicability is uncertain. For documentation or asset-only changes, run only `cr-custom-rules` when rules exist; otherwise report that nothing applicable changed. Dispatch applicable subagents in parallel when supported, with one task per `cr-*` subagent, except that a sliced diff gets one `cr-correctness` task and one `cr-structure` task per slice. Fall back to sequential dispatch if necessary. Derive a concise statement of the change's intent from the user's explicit request or, when unavailable, the PR or MR title and description. Do not invent intent. Each subagent prompt should contain only: - the exact review scope; - the stated change intent, when available; - the canonical diff path and line count, or the canonical diff content when no file is available; a slice task gets its slice's path and line count instead, as its canonical diff, and `cr-tests` gets the test slice's; - the head SHA when available; - the changed paths, including those outside a slice task's slice; - the rule-source paths or inline contents for `cr-custom-rules`. The line count is a completeness aid. Subagents may inspect a large diff in bounded chunks; do not require one tool call to return the entire file. IMPORTANT: Do not restate the subagent output format. Never substitute a missing `cr-*` subagent with `general-purpose` or another agent type. ## 5. Aggregate the reports After agents complete, sumarize: `### Critical:` (must fix before merge), `### Important:` (should fix), `### Suggestion:` (nice to have), or `### Question:`. Aggregate by: - dropping findings with confidence below 40, no changed-line location, malformed evidence, or generic style, formatting, whitespace, or import-order nits; - keeping every other finding: do not drop, demote to a question, or move into prose a finding that passes these filters; - Accept a new-side location, or a deleted-side location when the deletion itself introduces the issue; - preserving a style-related finding when `cr-custom-rules` cites an explicit repository rule requiring it; - deduplicating the surviving findings with the same underlying issue, keeping every affected site the detectors named; - keeping the higher subagent-provided severity when duplicates disagree; - keeping relevant questions separate from findings; questions do not require a confidence score or location, although they should include a location when one is applicable; - removing the internal `Confidence` field. Aggregate silently. Which subagents ran, which succeeded, what each returned, and how many findings survived are working notes, not report content: they appear in the message only as the `_Review unavailable for: <dimensions>._` line. Keep a `cr-custom-rules` finding's `Rule:` citation. If one or more applicable subagents were unavailable, briefly name those dimensions in the final report. Unavailable means dispatched without a usable report; a subagent whose dispatch condition did not hold, such as `cr-custom-rules` without a rule source, is not applicable and is not named. If every applicable subagent was unavailable, explain that the review could not be completed and return no marker. ## 6. Return the report For a platform review, the message begins with the marker — its first character is the `<` of `<!--`: ```markdown <!-- daiv:code-review run=N head=<full-sha> --> ## Code Review #N _Review unavailable for: <dimensions>._ <!-- omit when all applicable subagents returned usable reports --> ### Critical Issues **1. <one-line title>** — [`path/to/file.py:42`](<blob-link>) <details> <summary>Details</summary> **Rule:** `review-rules.md: <rule>` <!-- custom-rule findings only --> Why this is a problem, followed by a concrete fix. </details> ### Important Issues ... ### Suggestions ... ### Questions ... ### Recommended Actions 1. <merge-blocking actions first, followed by the remaining important actions> --- _Reply to this comment and mention `@<bot-username>` to ask about a finding or have DAIV apply a fix._ ``` Report rules: - Omit empty sections. - Number entries sequentially within each section. - Put each entry's location on its title line, as the template shows. When the issue occurs at several sites, list every one there, comma-separated. Code cited only for contrast, such as a sibling that does it correctly, belongs in the details, not on the title line. - After the last section, add only what the template shows: the platform footer. Put any concern worth raising in a section entry; do not add closing prose, side notes, or a summary of checks that came back clean. - Include Recommended Actions only when Critical or Important findings exist. - When usable reports completed but no findings or questions survive aggregation, use `No findings — no reported issues met the review threshold.` - When no findings survive and some subagents were unavailable, use `No findings — none confirmed by the detectors that completed.` Keep the `No findings` prefix: Step 2 treats a comment without it as an invalid marker and re-reviews the whole change. - Link new-side locations to the head blob when possible. - Link deleted-side locations to the platform diff when possible and label them `(deleted)`. - Otherwise use plain `path:line` references. - Use DAIV's actual account username from the runtime context. - In interactive mode, use `## Code Review`; omit the marker, run number, and footer. ## Non-negotiables - Return the report only as the final message. - Never create or post a discussion, review, comment, or note through a GitHub or GitLab tool. - Never restart the skill after a tool or detector failure; continue with the usable results. - In platform reviews, re-read your first line before returning. If it is not the marker, delete everything above it.
Files in this package (7)
- SKILL.md 12 KB
- agents/cr-correctness.md 6 KB
- agents/cr-custom-rules.md 6 KB
- agents/cr-performance.md 5 KB
- agents/cr-security.md 6 KB
- agents/cr-structure.md 6 KB
- agents/cr-tests.md 5 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · E1i2e1122/daiv | 100 | Apache-2.0 |
| microsoft/aspire | 100 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| dotnet/runtime | 100 | MIT |
| drosam/agents | 100 | MIT |
| ggml-org/llama.cpp | 100 | MIT |
| ShamelesAbyss/Nyx | 100 | Apache-2.0 |
| dzhng/jevgrep | 100 | MIT |
| iuliandita/skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 80e84b9a07f2 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90review
Review a branch, diff, or pull request in this repository before merge. Use when asked to review changes or a PR, self-review work before opening or marking a PR ready, or check a change for correctness, backward compatibility, security, tests, docs, and changesets. - 100review-pr
Review a pull request for code quality and security issues. Use when the user wants to review a PR, check PR code changes, or audit a pull request. Triggers on: "review PR", "review pull request", "check this PR", "the `review-pr` skill". - 100audit-code-review
Review a PR or diff for correctness, security, and maintainability. Use for a pull request, a named change set, or "review my changes". Repo-wide anti-patterns → audit-code-quality. Bulk transforms → audit-codemod-safety. - 90om-code-review
Use when a diff, branch, or PR needs a correctness and security review, e.g. 'review this diff'. Run validation and the built-in plus repository checklist, check breaking changes and quality, and return severity-ranked findings with an approve/request-changes verdict. Powers… - 90review-a-pull-request
A careful code review of a change, a branch or a pull request: correctness, tests, security, readability, with findings ordered by how much they matter. Use when the owner asks you to review code, a diff, a branch or a PR. - 95pr-review
Review a PR for correctness, security, code quality, and testing issues. TRIGGER when user asks to review a PR, check PR quality, or give feedback on a PR.