Preface¶
Code Review is an unavoidable part of software development. The code you write yourself often looks more and more pleasing to the eye; when colleagues submit PRs, the feedback styles of Reviewers also vary—some only focus on security, some emphasize readability, and some habitually write a casual “suggested optimization” and move on. After bringing AI programming assistants into the review process, the problems do not automatically disappear: the model may speak in generalities, or the output format may differ each time, making it difficult for the team to沉淀 review conclusions.
If you are already using AI programming tools like Cursor, Claude Code, or GitHub Copilot, you can actually use the Agent Skill mechanism to write “how to review, what to review, and how to output” into a SKILL.md, allowing the assistant to work according to a fixed process. The code-review we will introduce today is an official example Skill from the awesome-agent-skills repository—it has a simple structure and is cross-platform, making it perfect as a “first Code Review Skill” to experience.
What is This¶
code-review is an intelligent code review Skill. Its core function is to help AI evaluate code quality, identify potential problems, and provide improvement suggestions in a unified format.
It comes from the JackyST0/awesome-agent-skills project on GitHub. This repository specifically collects Agent Skills applicable to tools such as Cursor, Claude Code, GitHub Copilot, Windsurf, OpenAI Codex, etc., and provides 5 ready-to-use example templates in the examples/ directory, with code-review being one of them. The Skill is licensed under CC0-1.0 and can be freely copied and modified.
Unlike casually asking “help me check the code”, this Skill hardcodes trigger conditions, review steps, and output templates in SKILL.md. After installation, when you say phrases like “review the code”, “check code quality”, “find problems”, or “ask for improvement suggestions”, the AI will follow the process defined by the Skill instead of speaking freely.
Core Features and Highlights¶
1. Clear Trigger Scenarios¶
The Skill specifies four types of typical requests in the When to Use section:
- Review code
- Check code quality
- Find problems in the code
- Request code improvement suggestions
Both Chinese and English descriptions are included to facilitate correct identification by Agents in multilingual environments.
2. Five-Step Review Process¶
The official SKILL.md splits the review process into four steps (Read → Inspect → Suggest → Report), with inspection dimensions covering:
| Dimension | Description |
|---|---|
| Syntax Errors | Basic correctness |
| Logical Issues | Edge cases, missing branches, etc. |
| Security Risks | Common security vulnerabilities |
| Performance Issues | Optimizable hotspots |
| Code Style | Naming, formatting, readability |
This is more controllable than “letting AI speak freely” and easier to align with the team’s existing Review specifications.
3. Standardized Output Report¶
After the review is completed, the Skill requires output according to a fixed Markdown template, including:
- Summary: A one-paragraph summary
- Issues Found: A checklist with checkboxes
- Suggestions: Numbered list of actionable items
- Score: 1–10 points for each of code quality, readability, and maintainability
The team can directly paste this report into PR comments or use it as a starting point for review records.
4. Cross-Platform Compatibility¶
The Skill is based on the universal SKILL.md format. The same file can be placed in the Skills directories of platforms such as Cursor, Claude Code, and Copilot without needing to maintain a separate set of rules for each tool.
5. Complete Built-in Example¶
The official documentation provides an input and output example of a small Python function, allowing you to immediately verify whether the Skill is working after installation.
Installation and Activation¶
Platform and Directory Comparison¶
According to the official documentation of awesome-agent-skills, the Skills directories for each platform are as follows:
| Platform | Global Directory | Project Directory |
|---|---|---|
| Cursor | ~/.cursor/skills/ |
.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
.claude/skills/ |
| GitHub Copilot | ~/.copilot/skills/ |
.github/skills/ |
| Windsurf | ~/.windsurf/skills/ |
.windsurf/skills/ |
| OpenAI Codex | ~/.codex/skills/ |
.codex/skills/ |
| OpenCode | ~/.config/opencode/skills/ |
.opencode/skills/ |
| OpenClaw | ~/.openclaw/skills/ |
skills/ |
Global directories apply to all projects; project directories only apply to the current repository, and project-level Skills have higher priority, making them suitable for teams to submit review specifications to Git for sharing.
Method 1: One-Click Installation (Recommended)¶
The repository provides an installation script, which can be directly executed on macOS / Linux:
# Interactive installation
curl -sL https://raw.githubusercontent.com/JackyST0/awesome-agent-skills/main/install.sh | bash
# Non-interactive: Install only code-review to Cursor
curl -sL https://raw.githubusercontent.com/JackyST0/awesome-agent-skills/main/install.sh | bash -s -- -p cursor -s code-review
The -p parameter specifies the platform (cursor, claude, copilot, windsurf, codex, etc.), and the -s parameter specifies the Skill name. Windows users can use the PowerShell version of the installation script:
irm https://raw.githubusercontent.com/JackyST0/awesome-agent-skills/main/install.ps1 | iex
Method 2: Manual Installation¶
git clone https://github.com/JackyST0/awesome-agent-skills.git
cp -r awesome-agent-skills/examples/code-review ~/.cursor/skills/
Taking Cursor as an example, the directory structure after installation should be similar to:
~/.cursor/skills/code-review/
└── SKILL.md
Method 3: Project-level Installation (Git Submodule)¶
If you want the team to share the same set of review specifications, you can execute the following in the project root directory:
mkdir -p .cursor/skills
cd .cursor/skills
git submodule add https://github.com/JackyST0/awesome-agent-skills.git
# Or only copy the examples/code-review subdirectory to .cursor/skills/code-review
Verify the Installation¶
ls ~/.cursor/skills/code-review/SKILL.md
Try this in the AI chat:
Please help me review the quality of this code
If the Skill is loaded correctly, the reply should follow the structure of the “code review report” in the official example, rather than an unformatted free text.
Typical Usage Examples¶
Official Example: Reviewing a Python Function¶
Input Code:
def calc(x,y):
return x+y
Typical Output Structure Guided by the Skill:
## Code Review Report
### Summary
A simple addition function with naming and formatting issues.
### Issues Found
- [ ] Function name `calc` is not descriptive
- [ ] Missing type hints
- [ ] Missing docstring
- [ ] Missing spaces around operators
### Suggestions
1. Rename the function to `add_numbers`
2. Add type hints: `def add_numbers(x: int, y: int) -> int:`
3. Add a docstring to explain the function's purpose
4. Follow PEP 8 formatting specifications
### Score
- Code Quality: 6/10
- Readability: 7/10
- Maintainability: 5/10
Several Usage Patterns in Actual Practice¶
Review Selected Code or Pasted Snippets:
Please review the code below, focusing on security risks and performance issues:
[Paste Code]
Combined with PR / Diff Scenarios:
This is the diff for this change, please output a review report in code-review format and give a maintainability score.
Specify Language or Specifications:
Please use the code-review skill to review this Go code, following the golangci-lint configuration in the project.
You can add team-specific rules in the forked SKILL.md (such as mandatory SQL injection checks, mandatory alignment with internal API specifications), and project-level Skills will override global Skills with the same name.
Applicable Scenarios and Notes¶
Who It Is Suitable For¶
- Individual Developers: Let the AI self-check according to a fixed checklist before submitting, reducing low-level problems.
- Small Teams: Put
SKILL.mdinto the repository to unify the review output format. - Readers New to Agent Skills: The code-review only has one
SKILL.mdwithout additional script dependencies, making it suitable for understanding the basic structure of Skills before expanding.
What Scenarios It Is Suitable For¶
- Local review at the function or module level
- Learning the comparison between “good code” and “code that needs improvement”
- As the first AI pre-review before PR Review
Limitations and Notes¶
- Example Skill, Not a Security Audit Tool: The official positioning is a teaching-oriented example, and it cannot replace professional SAST/DAST or manual security audits.
- Review Depth Depends on the Model and Context: The Skill specifies the process and format, but the depth of problems that can be discovered still depends on the model’s capabilities and the provided code context.
- If It Does Not Work After Installation: Check whether the directory name is
code-review, whetherSKILL.mdexists, whether the file permissions are normal, and restart the IDE if necessary. - Difference from Skills Such as parallel-code-review: There are also parallel multi-Agent review skills in the community; code-review is a single-Agent, lightweight, standardized introductory version, and the two can be used in combination according to needs.
- Free to Customize: Under the CC0 license, you can copy it to
.cursor/skills/code-review/and then modify the “inspection dimensions” and “score items” to fit the team’s specifications.
Summary¶
code-review writes “how to review code and how to write reports” into a universal SKILL.md, which can be triggered on demand after being installed into tools such as Cursor, Claude Code, and Copilot. It does not aim to replace manual reviews, but instead provides the AI assistant with a repeatable and沉淀able review path—for developers who want to standardize the AI-assisted Code Review process, it is a zero-dependency, easy-to-start starting point.
Official Repository and Skill Source Code:
- Project Homepage: https://github.com/JackyST0/awesome-agent-skills
- code-review Example: https://github.com/JackyST0/awesome-agent-skills/tree/main/examples/code-review
- User Guide: https://github.com/JackyST0/awesome-agent-skills/blob/main/docs/how-to-use.md