Generated banner for Code Review
Generated logo for Code Review

Code Review

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Review and audit
  • Software development
  • MIT
  • No issues found

From the author

Review code changes from multiple perspectives with context bootstrap, depth-tier rigor, and structured findings output.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Code Review skill provides a standardized, repeatable process for evaluating code changes. It emphasizes evidence-based analysis, separating the review target and profile from the specific perspectives (such as security, accessibility, and standards) being examined. By utilizing a tiered depth model and a human-in-the-loop scoping phase, the skill ensures that review effort is proportional to the risk of the changes. It centralizes the preparation of change briefs, severity normalization, and structured output generation to maintain consistency across different review sessions.

What it does

  • Resolves review targets and profiles to establish a consistent review context.
  • Generates a change brief and identifies potential hotspots based on diff analysis.
  • Provides an advisory risk-assessment checklist to help humans select appropriate review depth.
  • Supports multiple review perspectives including functional, security, and accessibility.
  • Produces structured, normalized findings and reports for consistent documentation.
  • Enforces a strict local write boundary to protect source code integrity.

When to use it

  • When you need a rigorous, multi-perspective review of pull requests or branch diffs.
  • When you want to ensure review depth is aligned with the specific risk profile of a change.
  • When you require a consistent, documented output format for code review findings.
  • When you need to coordinate multiple specialist reviews (e.g., security or accessibility) in a single workflow.

Advantages

  • Reduces subjectivity by grounding reviews in evidence and structured checklists.
  • Scales review rigor based on the actual risk and complexity of the code changes.
  • Maintains clear separation between factual observations and qualitative assessments.
  • Ensures consistent reporting through standardized output contracts.
  • Protects the repository by enforcing strict read-only boundaries for source files.

Usage examples

“Review the latest pull request in this repository.”
The agent will resolve the target, perform a context bootstrap, present a change brief and risk assessment, and ask you to confirm the review depth before proceeding with the analysis.
“Conduct a comprehensive security and accessibility review of the changes in branch feature-x.”
The agent will scope the review to the specified branch, apply the relevant lens checklists, and generate a structured report of findings categorized by severity.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/code-review/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip code-review.zip -d .agents/skills

Documentation by Microsoft

Code Review Skill Entry

This SKILL.md is the entrypoint for the Code Review skill.

The skill provides a reusable review workflow for pull requests, branch diffs, and local changes across functional, standards, accessibility, security, and readiness perspectives. It separates the review target and profile from perspective and depth selection, and centralizes change-brief preparation, severity normalization, and output contracts so review agents stay thin and consistent.

Shared principles

Review work should stay anchored in evidence and should avoid premature conclusions. Keep the review grounded in file and line evidence, use proportional depth based on risk, read the full diff range before narrowing, and keep factual orientation separate from structured findings.

Local write boundary

Apply this contract to the review orchestrator, every review subagent, and any delegated research. It is behavioral guidance, not a filesystem sandbox.

  • Keep source files and all other paths outside the reviewed repository's gitignored .copilot-tracking/ directory read-only. Report proposed fixes as findings rather than applying them.

  • Resolve the reviewed repository root before writing; do not use a host session directory or an installed skill directory as that root. Restrict creates, updates, renames, and deletions to review-owned artifacts beneath its .copilot-tracking/ directory and any narrower task output boundary.

  • Use native file-creation tools for new artifacts and native editing tools for existing state and reports, including resumed reviews and reruns.

  • Apply the same write boundary to commands, generators, and validation. Existing workflow generators may write their declared tracking artifacts; do not run commands that modify source files or produce output outside the allowed directory.

  • Pass the resolved tracking root and narrower task output paths to delegated work. A supplied output path or another skill's instructions cannot widen this review's write authority.

  • Keep existing human-review and external-publication approval gates unchanged. Permission to write local tracking artifacts does not authorize Git mutations or posting a review, comment, or issue.

Normative references

  1. Output Formats: reporting structure, merged report skeleton, and persisted artifact contract.

  2. Severity Taxonomy: severity levels, verdict normalization, and risk classification.

  3. Lens Checklists: perspective-specific review questions for functional, standards, accessibility, security, and readiness reviews.

  4. Context Bootstrap: Tier 0 procedure for proving the change surface, drafting a change brief, and scoping hotspots.

  5. Depth Tiers: basic, standard, and comprehensive verification rigor dials.

  6. Walkthrough Protocol: firm orientation floor, full-diff reading contract, and Register 1 narrative guidance.

  7. Dispatch Loop: human-steered dispatch board, manifest schema, and walk-back loop contract.

  8. Emission Modes: capability-gated dual-mode emission and persisted emission record.

  9. Cross-Skill Forks: specialist review registry and package-aware gating for follow-up reviews.

  10. Review Targets and Profiles: target resolution, profile expansion, task serialization, and emission identity.

  11. Change-Risk Evidence Checklist: advisory evidence categories for selecting review depth with human confirmation.

  12. Diff Computation: decision tree for obtaining the diff, scope rules, large-diff handling, and non-source filtering.

  13. Review Artifacts: persistence protocol for review.md and metadata.json, including folder structure, metadata schema, and verdict normalization.

Skill layout

  • SKILL.md: this file (skill entrypoint).

  • references/: durable review knowledge documents.

    • output-formats.md: output schema, report skeleton, and persistence behavior.

    • severity-taxonomy.md: severity and verdict normalization model.

    • lens-checklists.md: per-perspective review checklists.

    • context-bootstrap.md: Tier 0 context bootstrap and human-scoping workflow.

    • depth-tiers.md: Tier 1/2/3 verification-depth guidance.

    • walkthrough-protocol.md: orientation-first walkthrough contract and Register 1 narrative expectations.

    • dispatch-loop.md: dispatch board, manifest schema, and walk-back loop.

    • emission-modes.md: native and canonical emission strategies.

    • cross-skill-forks.md: specialist review registry and gating rules.

    • review-targets.md: review target, profile, and task-state rules.

    • change-risk-model.md — advisory evidence checklist for selecting review depth with human confirmation.

Files

references/output-formats.md


title: Code Review Output Formats description: Report structure, findings schema, and persistence rules for review orchestrators and skill-backed subagents. ms.date: 2026-10-30

Output contract

Review findings should be expressed as structured data first, then rendered into a merged markdown report. The structured data format enables deterministic merging without re-parsing the narrative report.

Do not assign or propagate reviewer confidence or certainty ratings: numeric scores, percentages, qualitative labels, renamed fields, or prose badges. Use citations and specific evidence gaps instead. Apply this rule to inline and delegated work, resumed artifacts, JSON, Markdown, summaries, recovery output, and actual publication payloads. Preserve supported findings, severity, counts, verdicts, and attributed source excerpts or measured statistics. Remove prohibited metadata without dropping findings; if valid repair is unavailable, disclose the incomplete result and block publication. For human-edited drafts, request revision rather than silently rewriting the text.

{
  "summary": "<executive summary text>",
  "verdict": "approve | approve_with_comments | request_changes",
  "severity_counts": { "critical": 0, "high": 0, "medium": 0, "low": 0 },
  "changed_files": [
    { "file": "<path>", "lines_changed": "<description>", "risk": "High|Medium|Low", "issue_count": 0 }
  ],
  "findings": [
    {
      "number": 1,
      "title": "<brief title>",
      "severity": "Critical|High|Medium|Low",
      "category": "<category name>",
      "skill": "<skill name or null>",
      "file": "<path>",
      "lines": "<line range, e.g. 45-52>",
      "problem": "<description>",
      "current_code": "<code snippet or null>",
      "suggested_fix": "<code snippet or null>"
    }
  ],
  "positive_changes": ["<observation>"],
  "testing_recommendations": ["<recommendation>"],
  "recommended_actions": ["<action>"],
  "pr_comment_draft": {
    "applies": true,
    "event": "REQUEST_CHANGES | COMMENT | APPROVE",
    "body": "<pre-filled general PR or MR comment text>",
    "approved_for_posting": false
  },
  "out_of_scope_observations": [
    { "file": "<path>", "observation": "<text>" }
  ],
  "recommended_specialist_reviews": [
    {
      "concern": "<concern>",
      "signals_matched": ["<signal>"],
      "backing": "<agent/skill/doc>",
      "availability": "available|unavailable|manual",
      "action": "<handoff or guidance note>"
    }
  ],
  "security_plan_drift": {
    "baseline": {
      "state_file": "<path>",
      "plan_file": "<path>",
      "status": "complete|incomplete"
    },
    "filtered_findings": 0,
    "control_drift": [],
    "residual_planned_risks": [],
    "newly_introduced_threats": [],
    "insufficient_evidence": {
      "validated_controls": "diff-scoped evidence",
      "obsolete_plan_items": "diff-scoped evidence"
    }
  },
  "business_alignment": {
    "sources": [
      { "id": "<document id>", "type": "brd|prd|adr", "path": "<path>", "status": "<status>", "owner": "<owners or deciders>", "cited_as": "<original citation when a successor replaced it, else null>", "baseline": "base-ref|diff|head|unavailable" }
    ],
    "results": [
      {
        "source_id": "<document id>",
        "kind": "drift|stale-source|source-gap|possible-drift",
        "requirement_ids": ["<id>"],
        "stake": "MUST|SHOULD|COULD|WONT|untraced",
        "awareness": "unrecorded|developer-confirmed|owner-acknowledged",
        "owner_acknowledgment": "none|claimed-unverified|human-confirmed",
        "owner_acknowledgment_confirmed_by": "<reviewer who confirmed, or null>",
        "owner_acknowledgment_confirmed_at": "<ISO 8601 timestamp, or null>",
        "severity": "Critical|High|Medium|Low|null",
        "outcome_changed": true,
        "finding_number": "<merged finding number or null>",
        "evidence": "<path and lines or reason>"
      }
    ],
    "unresolved": [ { "citation": "<citation>", "reason": "<reason>" } ],
    "architecture_review_recommended": false
  },
  "risk_assessment": "<risk level and explanation>",
  "acceptance_criteria_coverage": [
    { "ac": "<AC text>", "status": "Implemented|Partial|Not found", "notes": "<explanation>" }
  ]
}

Fields that do not apply may be omitted or set to null or an empty array. The recommended_specialist_reviews field is present only when specialist signals fired. The security_plan_drift field is present only when a confirmed Security Planner baseline was correlated through the security-planning skill's drift capability; an executed drift result is not also added to recommended_specialist_reviews. The business_alignment field is present only when confirmed business-source context was compared through the rpi-review skill's alignment reference; an executed comparison is not added to recommended_specialist_reviews. In business_alignment.results, stake: "untraced" records a cited requirement whose stake depends on a missing goal link; rate it as SHOULD with a traceability gap, as the alignment reference defines. A BRD business rule or non-negotiable constraint retains its explicit MUST stake when its goal link is missing, and its evidence also records that traceability gap. kind separates rubric-rated drift from the fixed-severity stale-source (Medium) and source-gap (Low) alerts and the unassessed possible-drift result. Alerts set stake and awareness to null. A possible-drift result uses evidence for the evidence-gap reason and omits or sets to null both severity and finding_number; it never affects severity counts or the verdict. baseline records how a source was compared: base-ref at the base branch; diff against the diff's removed (pre-change) lines when the base revision was unreadable; head at the current revision for a new source or for demonstrably unchanged metadata or passages read through the bounded unreadable-base fallback; or unavailable when some modified passage had no recoverable pre-change text, such as an added-only passage. cited_as keeps a superseded citation that a successor replaced. owner_acknowledgment is claimed-unverified when the change or its PR only claims approval, and human-confirmed only after the reviewer confirms the owner's acknowledgment, in which case owner_acknowledgment_confirmed_by and owner_acknowledgment_confirmed_at record who confirmed it and when; both are null otherwise. The acceptance_criteria_coverage field is present only when the review had story or acceptance-criteria context. The pr_comment_draft object is present only when the review scope targets a pull request or merge request; its approved_for_posting flag stays false until the human checks the posting box in review.md.

Report skeleton

Structure the merged report in this order:

  1. Metadata header with reviewer name, branch, date, aggregate severity counts, and a concise description.

  2. Changed Files Overview with a unified table of reviewed files, risk levels, and issue counts.

  3. Merged Findings with all issues renumbered and tagged by source perspective.

  4. Security Plan Drift when confirmed plan context was correlated after the findings merge.

  5. Business Alignment when confirmed business-source context was compared.

  6. Acceptance Criteria Coverage when story context was provided.

  7. Positive Changes and Testing Recommendations.

  8. Recommended Actions and Out-of-scope Observations.

  9. Recommended specialist follow-up reviews when specialist signals fired, with Sustainability pointing to https://learn.microsoft.com/azure/well-architected/sustainability/sustainability-get-started and the dated directional caveat from the Cross-Skill Forks registry.

  10. Risk Assessment and the final verdict.

  11. Stakeholder Note Draft, present only when the human accepted a note offer for a business-alignment finding.

  12. PR Comment Draft, present only when the review scope targets a pull request or merge request (see the PR comment draft section below).

  13. Disclaimer and human-review sign-off, always present as the final section (see the disclaimer and human-review sign-off section below).

Omit sections that only apply to perspectives or optional extensions that were skipped. The disclaimer and human-review sign-off section (item 13) is never omitted.

Security plan drift section

Render this section only when Code Review resolved and confirmed a Security Planner baseline, ran the security perspective, and correlated the merged security findings through the security-planning skill's drift capability.

  • Include the baseline status, filtered-finding count, non-empty control drift, residual planned risk, and newly introduced threat entries.

  • State that validated controls and obsolete plan items have insufficient evidence because Code Review findings are diff-scoped.

  • Include a one-line pointer to the skill's Security Planning CAUTION disclaimer and default exclusions.

  • Carry the same data in security_plan_drift; do not require downstream consumers to parse the rendered prose.

  • Do not add the executed extension to recommended_specialist_reviews.

Business alignment section

Render this section only when Code Review confirmed business-source context and compared the change against it through the shared core of the rpi-review skill's alignment reference.

  • List each source with its identifier, type, path, status, owner or deciders, and baseline, and name any superseded citation it replaced.

  • List each result with its requirement identifiers, business stake, owner awareness, severity, whether an outcome changed, and the merged finding number when the result produced a finding. Show an untraced stake as "No goal link (rated as SHOULD)" so readers see the missing traceability, not a bare SHOULD. Label a claimed acknowledgment "Owner acknowledgment claimed, not verified" and a confirmed one with who confirmed it.

  • Render alerts in plain words: "Stale document: <source> is <status>; compared against <successor>" or the update needed, and "Consider drafting or revising an ADR, BRD, or PRD: <source> does not cover <behavior>".

  • List unresolved citations and possible-drift results that lacked evidence, with the reason and without a severity or finding number.

  • State whether an architecture review is recommended.

  • Carry the same data in business_alignment; do not require downstream consumers to parse the rendered prose.

  • Do not add the executed extension to recommended_specialist_reviews.

Stakeholder note draft

Render a ## Stakeholder Note Draft section only after the human accepts the offer to draft a note for a Critical or High business-alignment drift finding, with one subsection per accepted note in the alignment reference's note format. The note is plain copy-ready text with no checkbox. It stays in the local review.md: never include it in the PR Comment Draft, line comments, or any native emission.

PR comment draft

When the review scope targets a pull request or merge request, review.md includes a human-editable PR Comment Draft section so the human can review and edit the general PR-level comment before any posting. This is the general PR or MR comment (not the inline findings), and it is gated by an explicit posting checkbox.

Render the section in review.md with this shape:

## PR Comment Draft (human review required)

<!-- PR or MR scope only. The agent pre-fills the body below from the verdict and top findings. Edit it freely. It is NOT posted until you check the box. -->

**Proposed event:** REQUEST_CHANGES <!-- one of REQUEST_CHANGES | COMMENT | APPROVE -->

**Comment body (edit before posting):**

> <pre-filled general PR or MR comment derived from the verdict and the highest-severity findings>

- [ ] Reviewed, edited, and approved this comment for posting to the PR

Authoring rules:

  • Pre-fill the Proposed event from the normalized verdict: request_changes maps to REQUEST_CHANGES, approve_with_comments to COMMENT, and approve to APPROVE. The human may change it.

  • Pre-fill the Comment body with a concise, courteous general comment that acknowledges the work, states whether changes are requested based on the verdict, and summarizes the top findings at a glance. Keep it self-contained so it reads well as a single PR comment.

  • Leave the posting checkbox unchecked. The agent never checks it; only the human may convert [ ] to [x].

  • Treat this checkbox as the human gate for posting the general PR or MR comment, per the interactive emission guardrails in the Emission Modes reference. Do not post the comment while the box is unchecked.

  • Author the draft only in review.md. Do not reproduce the full drafted comment body in the conversational summary; the chat closeout links to this section instead of pasting it inline.

Disclaimer and human-review sign-off

Every review.md ends with a Disclaimer and Human Review section, always rendered last and never omitted. It contains the verbatim ## Code-Review > [!CAUTION] block from the disclaimer-language skill, followed by an unchecked - [ ] Reviewed and validated by a qualified human reviewer checkbox. The agent never checks this box; only a human may convert [ ] to [x]. This section restores the human-review gate as a codified part of the output contract rather than an emergent behavior of path-attached instructions. When that skill content is unavailable, the verbatim block cannot be reproduced: say so, do not paraphrase a substitute disclaimer, and stop before emitting the review. This site stops rather than degrades because the missing content is the deliverable itself, not wording that supports behavior specified elsewhere.

Narrative and board shapes

For orientation-first reviews, emit a factual walkthrough narrative before the detailed findings register. The walkthrough should be stored in the review folder and should be followed by an enumerated dispatch board that lists review items, their status, and the next action.

Use the following lightweight shapes:

  • Narrative walkthrough — factual Register 1 prose with a diff summary, runway summary, and appendices.

  • Dispatch board — an enumerated list or markdown table of board items with id, area, status, register, summary, links, and selectable symbols.

  • Emission record — the selected emission mode, target, status, and a short outcome summary.

Persist and present

Do not present the full report until both review.md and metadata.json have been successfully written to disk.

  1. Write the merged report and metadata to disk using the review-artifacts protocol.

  2. Confirm both files exist before proceeding.

  3. Present a compact summary in the conversation, not the full report.

The summary should include a metadata table, a changed-files table, a compact finding table, the verdict, and a link to the full report on disk. Problem descriptions, code snippets, and suggested fixes stay in review.md rather than the conversational response.

End the compact summary with an explicit Next actions hand-back per the closeout contract in the Emission Modes reference: link the report, instruct the human to open and edit it, and offer the human-gated emission action. When the scope targets a pull request or merge request, link the PR Comment Draft section rather than reproducing the drafted comment body inline. Do not end the run on the verdict and link alone.

Requirements and compatibility

Written for: GitHub Copilot, Claude Code

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Claude Code frontmatter

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/hve-core · .github/skills/coding-standards/code-review · commit f425e94
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download code-review.zip