Skip to content

chore: 添加 /review skill,多 agent 并行代码审查 - #6

Merged
lishuceo merged 2 commits into
mainfrom
chore/review-skill
Feb 17, 2026
Merged

chore: 添加 /review skill,多 agent 并行代码审查#6
lishuceo merged 2 commits into
mainfrom
chore/review-skill

Conversation

@lishuceo

Copy link
Copy Markdown
Owner

Summary

  • 新增 .claude/skills/review/SKILL.md,输入 /review 启动多 agent 并行代码审查
  • 三个审查维度并行:安全 (🔒)、逻辑正确性 (🐛)、架构质量 (🏗️)
  • 无参数审查本地未提交变更或最近 commit,传 PR 编号/URL 审查 PR
  • 置信度 ≥75 才报告,内置误报过滤规则,参考项目 GitHub Action 标准

Test plan

  • /review 审查本地变更
  • /review <PR号> 审查指定 PR

🤖 Generated with Claude Code

安全/逻辑/架构三维度并行审查,支持本地变更和 PR review。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Feb 17, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 2m 14s —— View job


Code Review: .claude/skills/review/SKILL.md

  • Gather context and read changed files
  • Review SKILL.md for issues
  • Post review summary

Verdict: ⚠️ Issues Found

Findings

🟡 Warning

  • .claude/skills/review/SKILL.md:35TeamCreate is not a real Claude Code tool or feature. The skill instructs Claude to "使用 TeamCreate 创建审查团队", but no such mechanism exists. The correct approach is to use the Task tool with subagent_type — when multiple Task calls are issued in a single message, they execute in parallel automatically. As written, this line will either be ignored or confuse the model during execution. (Confidence: 90) — See inline comment

Overall Assessment

The skill is well-designed in concept — the three review dimensions (security, logic, architecture) are practical, the confidence scoring system with a ≥50 reporting threshold is sound, and the false positive filters are a good addition. The frontmatter fields (disable-model-invocation, argument-hint) are all valid.

The one actionable issue is the TeamCreate reference on line 35, which should be replaced with a Task tool-based approach to ensure the parallel agent spawning actually works as intended.


## 多 Agent 并行审查

使用 TeamCreate 创建审查团队,启动 **3 个并行 agent**,每个专注一个维度。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning (Confidence: 90)

TeamCreate is not a real Claude Code tool or feature. This reference will either be ignored or cause confusion during execution.

The correct mechanism for spawning parallel agents from within a skill is the Task tool with subagent_type. When multiple Task tool calls are made in a single message, they run in parallel automatically.

Suggested change
使用 TeamCreate 创建审查团队,启动 **3 个并行 agent**,每个专注一个维度。
使用 Task 工具启动 **3 个并行 agent**(在同一条消息中发起多个 Task 调用即可并行),每个专注一个维度。

- 移除 disable-model-invocation 让 skill 出现在可用列表中
- 补充 untracked 文件发现逻辑,审查范围更完整
- 增加初始仓库(0/1 commit)的边界处理
- 增加无效参数校验和用法提示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Feb 17, 2026

Copy link
Copy Markdown

Claude finished @lishuceo's task in 1m 9s —— View job


Code Review: .claude/skills/review/SKILL.md

  • Gather context and read changed files
  • Review SKILL.md for issues
  • Post review summary

Verdict: ⚠️ Issues Found

Findings

🟡 Warning

  • .claude/skills/review/SKILL.md:44TeamCreate is not a real Claude Code tool or feature. This was flagged in the previous review and remains unfixed after commit f967fc6. The correct approach is to use the Task tool with subagent_type — multiple Task calls in a single message execute in parallel automatically. (Confidence: 90) — See inline comment

Changes Since Last Review

Commit f967fc6 ("fix: 完善 review skill 边界处理和参数校验") addressed several edge cases well:

  • Added untracked file discovery via git ls-files --others --exclude-standard
  • Added commit count check with git rev-list --count HEAD for repos with zero or one commit
  • Added parameter validation for $ARGUMENTS with clear error messaging and usage examples
  • Removed disable-model-invocation: true from frontmatter (correct, since the skill needs model invocation)

These are solid improvements. The only remaining issue is the TeamCreate reference on line 44.


## 多 Agent 并行审查

使用 TeamCreate 创建审查团队,启动 **3 个并行 agent**,每个专注一个维度。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning (Confidence: 90)

TeamCreate is still not a real Claude Code tool. This was flagged in the previous review and remains unfixed after the latest commit.

The correct mechanism for parallel agent execution is the Task tool with subagent_type. When multiple Task tool calls are made in a single response message, they run in parallel automatically.

Suggested change
使用 TeamCreate 创建审查团队,启动 **3 个并行 agent**,每个专注一个维度。
使用 Task 工具启动 **3 个并行 agent**(在同一条消息中发起多个 Task 调用即可并行),每个专注一个维度。

@lishuceo
lishuceo merged commit a954975 into main Feb 17, 2026
3 checks passed
@lishuceo
lishuceo deleted the chore/review-skill branch February 17, 2026 08:19
lishuceo added a commit that referenced this pull request Apr 8, 2026
* chore: 添加 /review skill,多 agent 并行代码审查

安全/逻辑/架构三维度并行审查,支持本地变更和 PR review。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: 完善 review skill 边界处理和参数校验

- 移除 disable-model-invocation 让 skill 出现在可用列表中
- 补充 untracked 文件发现逻辑,审查范围更完整
- 增加初始仓库(0/1 commit)的边界处理
- 增加无效参数校验和用法提示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant