Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/wopal-cn-cnb-code-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cnb-code-review
What's inside
- Skill name
cnb-code-review- Description
- PR 代码评审,检查安全漏洞、Bug 和代码质量。
- License
- MIT
- Instructions
- 127 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (2)
- README.md
- SKILL.md
SKILL.md (first lines)
# PR 代码评审
对 PR 的代码变更进行专业评审,发现安全漏洞、Bug、代码质量和性能问题,并通过 PR Review API 发送行级评论。
## 评审步骤
### 1. 获取 PR 变更
使用 cnb-pr-diff Skill 获取 PR 的代码变更。
**需过滤的非代码文件**(不评审):
- 依赖锁文件:`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `go.sum`, `Cargo.lock` 等
- 图片文件:`*.png`, `*.jpg`, `*.gif`, `*.svg`, `*.ico` 等
- 字体文件:`*.woff`, `*.ttf`, `*.eot` 等
- 二进制文件:`*.exe`, `*.dll`, `*.so`, `*.jar`, `*.pyc` 等
- 压缩文件:`*.zip`, `*.tar.gz`, `*.rar` 等
- 压缩的代码:`*.min.js`, `*.min.css`, `*.map`
- 构建产物目录:`dist/`, `build/`, `out/`, `target/`, `.next/`
- 依赖目录:`node_modules/`, `vendor/`, `.venv/`
**文件限制**:
- 最多评审 30 个文件
- diff 最大 100000 字符(超出则截断)
### 2. 分析代码
**评审重点**(按优先级):
1. **安全漏洞**:SQL 注入、XSS、CSRF、硬编码凭证、敏感信息泄露、不安全加密
2. **潜在 Bug**:空指针、数组越界、并发问题、资源泄漏、异常处理不当
3. **代码质量**:可读性、命名规范、代码重复
4. **性能问题**:N+1 查询、低效算法、不必要的 I/O
**评审原则**:
- 只评审新增代码(diff 中 `+` 开头的行,不含 `+++` 文件头)
- **禁止评审**:删除的代码(`-` 开头)、上下文代码、未修改的代码
- **忽略**:EOF 换行符、行尾空格、缩进风格(应由 linter 处理)
**理解上下文**:
当 diff 上下文不足以理解代码时(如需要看函数定义、类型、依赖关系),使用 Read 工具读取相关源文件理解上下文,并确认准确行号。
### 3. 输出评审结果
**必须严格输出以下 JSON 格式**:
```json
{
"status": "passed | needs_modification | critical",
"issues": [
{
"severity": "critical | warning | info",
"file": "文件路径",
"start_line": 起始行号,
"end_line": 结束行号,
"problem": "问题:描述问题",
"suggestion": "建议:修复建议"
}
]
}
```
**字段说明**:
- `status`: 评审状态
- `passed`: 通过,无问题
- `needs_modification`: 需要修改
- `critical`: 存在严重问题
- `severity`: 问题严重程度
- `critical`: 严重(安全漏洞、崩溃 Bug)
- `warning`: 警告(潜在问题)
- `info`: 建议(代码质量改进)
- `start_line` / `end_line`: 问题代码的行号范围(对应新文件行号)
- `problem` / `suggestion`: 使用 Markdown 格式,提高可读性
- 使用 \`代码\` 标记变量名、函数名
- 使用代码块展示修复示例
**无问题时**:`issues` 为空数组 `[]`
### 4. 发送评审评论
**重要**:API 基础地址从环境变量 `CNB_API_ENDPOINT` 获取(默认 `https://api.cnb.cool`),仓库名从环境变量 `CNB_REPO_SLUG` 获取,PR 编号从环境变量 `CNB_PULL_REQUEST_IID` 获取。
**有问题时**:调用 PostPullReview 接口发送行级评审评论:
```bash
curl -X POST \
"${CNB_API_ENDPOINT:-https://api.cnb.cool}/${CNB_REPO_SLUG}/-/pulls/${CNB_PULL_REQUEST_IID}/reviews" \
-H "Accept: application/vnd.cnb.api+json" \
-H "Authorization: Bearer $CNB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "**评审结果**: 需要修改",
"event": "comment",
"comments": [
{
"body": "问题: ...\n建议: ...",
"path": "文件路径",
"start_line": 起始行号,
"start_side": "right",
"end_line": 结束行号,
"end_side": "right",
"subject_type": "line"
}
]
}'
```
**无问题时**:调用 PostPullComment 接口发送总结评论:
```bash
curl -X POST \
"${CNB_API_ENDPOINT:-https://api.cnb.cool}/${CNB_REPO_SLUG}/-/pulls/${CNB_PULL_REQUEST_IID}/comments" \
-H "Accept: application/vnd.cnb.api+json" \
-H "Authorization: Bearer $CNB_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "**评审结果**: 通过\n\n代码质量良好,未发现明显问题。"
}'
```From wopal-cn/wopal-space-ontology, MIT.
More from wopal-cn/wopal-space-ontology
- 0.609score
cordis-composition-reference
wopal-cn
Use when writing or reading a Cordis bundle patch or agent preset for this harness and you need the Loader YAML dialect (insert, override by id, group…
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
agents-collab
wopal-cn
Foundation rules for how Wopal collaborates with sub-agents such as fae and rook.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
cordis-plugin-development
wopal-cn
Use when designing, reviewing, adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP…
SkillAFreshness: A★ 3Claude Code +9 - 0.605score
automating-mail
wopal-cn
Automates Apple Mail via JXA with AppleScript dictionary discovery.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
editing-cordis-compositions
wopal-cn
Use when creating, changing, or validating an agent preset or other Cordis composition for this harness, including deciding host versus preset placement and…
SkillAFreshness: A★ 3Claude Code +9 - 0.600score
cnb-pipeline
wopal-cn
编写、修改、审查 .cnb.yml 流水线配置,诊断构建失败原因并优化性能。
SkillAFreshness: A★ 3Claude Code +9 - 0.599score
agent-experience
wopal-cn
Use when writing or changing a model-facing tool definition (name, description, parameter schema, or its system-prompt section), and when designing skills…
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
cnb-docs
wopal-cn
查询 CNB 平台官方文档,覆盖代码托管、制品库、AI 助手、云原生构建等。
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
cnb-tapd-resource-fetcher
wopal-cn
获取 TAPD 资源(需求/缺陷/任务/迭代),支持从 TAPD 链接自动解析。
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
cnb-api
wopal-cn
CNB 平台交互命令,支持代码仓库、Issue、PR、CI、制品库读写等操作。
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
cnb-npc-delegate
wopal-cn
当任务复杂或需要特定专长时,主动召唤其他 NPC 协同工作。
SkillAFreshness: A★ 3Claude Code +9 - 0.592score
cnb-pr-summary
wopal-cn
总结 PR 变更内容,概述主要改动点并生成变更说明。
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Sep 15, 2026 (1 month ago)
- Last release
- Oct 24, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/wopal-cn/wopal-space-ontology
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from wopal-cn
- 0.609score
cordis-composition-reference
wopal-cn
Use when writing or reading a Cordis bundle patch or agent preset for this harness and you need the Loader YAML dialect (insert, override by id, group…
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
agents-collab
wopal-cn
Foundation rules for how Wopal collaborates with sub-agents such as fae and rook.
SkillAFreshness: A★ 3Claude Code +9 - 0.609score
cordis-plugin-development
wopal-cn
Use when designing, reviewing, adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP…
SkillAFreshness: A★ 3Claude Code +9 - 0.605score
automating-mail
wopal-cn
Automates Apple Mail via JXA with AppleScript dictionary discovery.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
editing-cordis-compositions
wopal-cn
Use when creating, changing, or validating an agent preset or other Cordis composition for this harness, including deciding host versus preset placement and…
SkillAFreshness: A★ 3Claude Code +9 - 0.600score
cnb-pipeline
wopal-cn
编写、修改、审查 .cnb.yml 流水线配置,诊断构建失败原因并优化性能。
SkillAFreshness: A★ 3Claude Code +9
Cite this page
cnb-code-review skill. Agent Mart. https://agentmart.dev/skills/wopal-cn-cnb-code-review (last updated 2026-10-24)