cr

GitHub

自动化代码审查技能,支持本地分支、PR和文件审查。根据参数自动路由至诊断、PR审查或单/多Agent深度审查模式,具备基于风险等级的自动修复功能,并适配不同团队环境。

.codebuddy/skills/cr/SKILL.md Tencent/libpag

Trigger Scenarios

需要审查本地代码变更 请求对特定PR进行代码审查 执行代码诊断

Install

npx skills add Tencent/libpag --skill cr -g -y
More Options

Non-standard path

npx skills add https://github.com/Tencent/libpag/tree/main/.codebuddy/skills/cr -g -y

Use without installing

npx skills use Tencent/libpag@cr

指定 Agent (Claude Code)

npx skills add Tencent/libpag --skill cr -a claude-code -g -y

安装 repo 全部 skill

npx skills add Tencent/libpag --all -g -y

预览 repo 内 skill

npx skills add Tencent/libpag --list

SKILL.md

Frontmatter
{
    "name": "cr",
    "description": "Automated code review and fix for local branches, PRs, commits, and files. Supports single-agent interactive fix and multi-agent adversarial review with auto-fix.",
    "disable-model-invocation": true
}

/cr — Code Review

Automated code review for local branches, PRs, commits, and files. Detects review mode from arguments and routes to the appropriate review flow — either single-agent review on protected branches or when teams are unavailable, or multi-agent deep review with risk-based auto-fix.

All user-facing text matches the user's language. Start the review immediately based on the routing rules below — do NOT ask the user to choose the review mode upfront. Interactive prompts inside each flow (e.g. final confirmation of high-risk fixes) still use your interactive dialog tool (e.g. AskUserQuestion).

Route

Run pre-checks, then match the first applicable rule top-to-bottom:

  1. git branch --show-current → record whether on main/master.
  2. git status --porcelain → record whether uncommitted changes exist.
  3. Check whether the current environment supports agent teams (multiple agents working in parallel and communicating with each other).
# Condition Action
1 $ARGUMENTS is diag → references/diagnosis.md
2 $ARGUMENTS is a PR number or URL containing /pull/ → references/pr-review.md
3 On main/master branch → references/local-review.md
4 Agent teams NOT supported → references/local-review.md
5 Everything else → references/teams-review.md with FIX_MODE=low_medium

Each → means: Read the target file and follow it as the sole remaining instruction. Ignore all sections below. Do NOT review from memory or habit — each target file defines specific constraints on how to obtain diffs, apply fixes, and submit results.

Pass $ARGUMENTS to the target file. For teams-review, also pass FIX_MODE (fixed to low_medium: multi-agent review auto-fixes low and medium risk issues; high-risk issues such as API changes or architecture impact are deferred to user confirmation).

Version History

  • dc85cfd Current 2026-08-20 19:02

Same Skill Collection

.codebuddy/skills/accept-baseline/SKILL.md
.codebuddy/skills/pr/SKILL.md
.codebuddy/skills/squash/SKILL.md
.codebuddy/skills/commit/SKILL.md
.codebuddy/skills/pagx/SKILL.md

Metadata

Files
0
Version
380e5cd
Hash
24028ecc
Indexed
2026-08-20 19:02

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-29 02:00
浙ICP备14020137号-1