From ai-engineering
Review code changes for security, performance, and correctness. Trigger with a PR URL or diff, "review this before I merge", "is this code safe?", or when checking a change for N+1 queries, injection risks, missing edge cases, or error handling gaps.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-engineering:code-review <PR URL, diff, or file path><PR URL, diff, or file path>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](../../CONNECTORS.md). This skill follows the [SKILL-CONTRACT.md](../../SKILL-CONTRACT.md) — it appends a `machine_output` block.
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md. This skill follows the SKILL-CONTRACT.md — it appends a
machine_outputblock.
Review code changes with a structured lens on security, performance, correctness, and maintainability.
/code-review <PR URL or file path>
Review the provided code changes: @$1
If no specific file or URL is provided, ask what to review.
┌─────────────────────────────────────────────────────────────────┐
│ CODE REVIEW │
├─────────────────────────────────────────────────────────────────┤
│ STANDALONE (always works) │
│ ✓ Paste a diff, PR URL, or point to files │
│ ✓ Security audit (OWASP top 10, injection, auth) │
│ ✓ Performance review (N+1, memory leaks, complexity) │
│ ✓ Correctness (edge cases, error handling, race conditions) │
│ ✓ Style (naming, structure, readability) │
│ ✓ Actionable suggestions with code examples │
├─────────────────────────────────────────────────────────────────┤
│ SUPERCHARGED (when you connect your tools) │
│ + Source control: Pull PR diff automatically │
│ + Project tracker: Link findings to tickets │
│ + Knowledge base: Check against team coding standards │
│ + Code graph: See the blast radius of each changed file │
└─────────────────────────────────────────────────────────────────┘
## Code Review: [PR title or file]
### Summary
[1-2 sentence overview of the changes, focusing on overall quality, architectural alignment, and key patterns detected.]
### Critical Issues (Blockers)
*Note: These are high-priority issues that must be addressed before this pull request can safely merge.*
| # | File | Line | Issue Category | Description & Root Cause | Actionable Code Suggestion / Remediation |
|---|------|------|----------------|--------------------------|-----------------------------------------|
| 1 | [file] | [line] | [e.g., Security] | [Detailed description of bug/flaw] | ```[lang]
// Code fix
``` |
### Suggestions (Nitpicks & Optimizations)
*Note: Structural, performance, or stylistic suggestions to improve long-term maintainability.*
| # | File | Line | Suggestion | Category | Impact/Effort |
|---|------|------|------------|----------|---------------|
| 1 | [file] | [line] | [Description of improvement] | [e.g., Performance] | [Low/Med/High] |
### What Looks Good
- [Positive architectural choices, clean implementations, or thorough test coverage noted in the changes]
### Verdict
[APPROVE] / [REQUEST CHANGES] / [NEEDS DISCUSSION]
This is an assessment skill. After the human-readable review above, append a
machine_output block per SKILL-CONTRACT.md.
Scorecard rubric (each 0-100): 90-100 ship-ready, 75-89 minor issues, 50-74 needs work before merge, below 50 not mergeable.
security — injection, auth, secrets, deserialization exposureperformance — N+1, complexity, resource leaks, missing indexescorrectness — edge cases, concurrency, error handlingmaintainability — naming, SRP, duplication, test coveragemachine_output:
skill: code-review
version: "1.0"
timestamp: <ISO-8601>
status: complete
scorecard:
security: 88
performance: 91
correctness: 84
maintainability: 79
findings:
- id: F1
severity: critical
category: security
location: api/users.js:42
description: SQL built via string interpolation on req.query.id
recommendations:
- id: R1
action: Use a parameterized query for the id lookup
effort: low
addresses: [F1]
artifacts:
- code-review-report
next_actions:
- skill: security-review
reason: Confirm the injection fix and sweep for sibling patterns
- skill: testing-strategy
reason: No regression test covers the malformed-id path
If ~~source control is connected:
If ~~project tracker is connected:
If ~~knowledge base is connected:
If ~~code-graph is connected (e.g. the agent-context spoke):
npx claudepluginhub shubham0086/the-machine-os --plugin ai-engineeringCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.