Loading...
Loading...
Compare original and translation side by side
| Skill | Usage | Output |
|---|---|---|
| Trier, reviewer, commenter les PRs | Tableau d'action + reviews + commentaires postés |
| Récap général pour partager avec l'équipe | Résumé Markdown (PRs + issues + releases) |
/pr-triage/pr-triage all/pr-triage 42 57| 技能 | 使用方式 | 输出结果 |
|---|---|---|
| 分类、审查、评论PR | 操作表格 + 审查报告 + 已发布的评论 |
| 生成团队共享的仓库概览 | Markdown摘要(PR + 问题 + 版本发布) |
/pr-triage/pr-triage all/pr-triage 42 57enenglishfrfrenchenenglishfrfrenchgit rev-parse --is-inside-work-tree
gh auth statusgit rev-parse --is-inside-work-tree
gh auth statusundefinedundefined
**Fallback collaborateurs** : si `gh api .../collaborators` échoue (403/404) :
```bash
**协作者备选方案** : 若`gh api .../collaborators`执行失败(403/404错误):
```bashSi toujours ambigu, demander à l'utilisateur via `AskUserQuestion`.
Pour chaque PR, récupérer reviews existantes ET fichiers modifiés :
```bash
gh api "repos/{owner}/{repo}/pulls/{num}/reviews" \
--jq '[.[] | .user.login + ":" + .state] | join(", ")'若仍存在歧义,则通过`AskUserQuestion`询问用户。
针对每个PR,获取现有审查记录和修改的文件:
```bash
gh api "repos/{owner}/{repo}/pulls/{num}/reviews" \
--jq '[.[] | .user.login + ":" + .state] | join(", ")'
**Note rate-limiting** : la récupération des fichiers est N appels API (1 par PR). Pour repos avec 20+ PRs, prioriser les PRs candidates à l'overlap (même domaine fonctionnel, même auteur).
**Note** : `author` est un objet `{login: "..."}` — toujours extraire `.author.login`.
**速率限制说明** : 文件获取需要N次API调用(每个PR一次)。对于拥有20个以上PR的仓库,优先处理可能存在重叠的PR(相同功能领域、相同作者)。
**注意** : `author`是一个`{login: "..."}`对象 — 始终提取`.author.login`字段。| Label | Additions |
|---|---|
| XS | < 50 |
| S | 50–200 |
| M | 200–500 |
| L | 500–1000 |
| XL | > 1000 |
+{additions}/-{deletions}, {files} files ({label})statusCheckRollupcleanunstabledirtybodyfixes #Ncloses #Nresolves #NFixes #42mergeableCONFLICTINGmergeableCONFLICTING| 标签 | 新增代码行数 |
|---|---|
| XS | < 50 |
| S | 50–200 |
| M | 200–500 |
| L | 500–1000 |
| XL | > 1000 |
+{additions}/-{deletions}, {files} files ({label})statusCheckRollupcleanunstabledirtybodyfixes #Ncloses #Nresolves #NFixes #42mergeableCONFLICTINGmergeableCONFLICTINGstatusCheckRollupundefinedundefined| PR | Titre | Taille | CI | Status |
|---|
| PR | 标题 | 大小 | CI | 状态 |
|---|
| PR | Auteur | Titre | Taille | CI | Reviews | Action |
|---|
| PR | 作者 | 标题 | 大小 | CI | 审查状态 | 操作建议 |
|---|
| PR | Auteur | Titre | Taille | Problème | Action recommandée |
|---|
| PR | 作者 | 标题 | 大小 | 问题 | 建议操作 |
|---|
0 PRs → afficher `Aucune PR ouverte.` et terminer.
若无PR,则显示`Aucune PR ouverte.`(无开放PR)并结束流程。undefinedundefinedConfirmer : `Tableau copié dans le presse-papier.` (FR) / `Triage table copied to clipboard.` (EN)
---确认提示 : `Tableau copié dans le presse-papier.`(法语)/ `Triage table copied to clipboard.`(英语)
---"all""42 57"AskUserQuestionquestion: "Quelles PRs voulez-vous reviewer en profondeur ?"
header: "Deep Review"
multiSelect: true
options:
- label: "Toutes les externes"
description: "Review {N} PRs externes avec agents code-reviewer en parallèle"
- label: "Problématiques uniquement"
description: "Focus sur les {M} PRs à risque (CI dirty, trop large, overlaps)"
- label: "Prêtes uniquement"
description: "Review {K} PRs prêtes à merger"
- label: "Passer"
description: "Terminer ici — juste l'audit"42"all""42 57"AskUserQuestionquestion: "您想要深度审查哪些PR?"
header: "Deep Review"
multiSelect: true
options:
- label: "所有外部PR"
description: "使用代码审查Agent并行审查{N}个外部PR"
- label: "仅存在问题的PR"
description: "聚焦{M}个高风险PR(CI失败、规模过大、存在重叠)"
- label: "仅待审查PR"
description: "审查{K}个可合并的PR"
- label: "跳过"
description: "结束流程 — 仅完成审核"42code-reviewersubagent_type: code-reviewer
model: sonnet
prompt: |
Review PR #{num}: "{title}" by @{author}
**Metadata**: +{additions}/-{deletions}, {changedFiles} files ({size_label})
**CI**: {ci_status} | **Reviews**: {existing_reviews} | **Draft**: {isDraft}
**PR Body**:
{body}
**Diff**:
{gh pr diff {num} output}
Apply your security-guardian and backend-architect skills for this review.
Additionally, apply the RTK-specific checklist:
- lazy_static! regex (no inline Regex::new())
- anyhow::Result + .context() (no unwrap())
- Fallback to raw command on filter failure
- Exit code propagation
- Token savings ≥60% in tests with real fixtures
- No async/tokio dependencies
Return structured review:
### Critical Issues 🔴
### Important Issues 🟡
### Suggestions 🟢
### What's Good ✅
Be specific: quote the file:line, explain why it's an issue, suggest the fix.gh pr diff {num}
gh pr view {num} --json body,title,author -q '{body: .body, title: .title, author: .author.login}'code-reviewersubagent_type: code-reviewer
model: sonnet
prompt: |
Review PR #{num}: "{title}" by @{author}
**Metadata**: +{additions}/-{deletions}, {changedFiles} files ({size_label})
**CI**: {ci_status} | **Reviews**: {existing_reviews} | **Draft**: {isDraft}
**PR Body**:
{body}
**Diff**:
{gh pr diff {num} output}
运用您的安全防护和后端架构技能进行本次审查。
此外,需遵循RTK专属检查清单:
- lazy_static! regex (no inline Regex::new())
- anyhow::Result + .context() (no unwrap())
- 过滤失败时回退到原始命令
- 退出码传递
- 使用真实测试用例时,Token节省≥60%
- No async/tokio dependencies
返回结构化审查报告:
### Critical Issues 🔴
### Important Issues 🟡
### Suggestions 🟢
### What's Good ✅
请具体说明:引用文件:行号,解释问题原因,并提出修复建议。gh pr diff {num}
gh pr view {num} --json body,title,author -q '{body: .body, title: .title, author: .author.login}'templates/review-comment.mdfile.rs:42templates/review-comment.mdfile.rs:42------
Puis demander validation via `AskUserQuestion` :
(Générer une option par PR + "Tous" + "Aucun")
然后通过`AskUserQuestion`请求确认:
(为每个PR生成一个选项 + "全部" + "无")gh pr comment {num} --body-file - <<'REVIEW_EOF'
{commentaire}
REVIEW_EOF✅ Commentaire posté sur PR #{num}: {title}Aucun commentaire posté. Workflow terminé.gh pr comment {num} --body-file - <<'REVIEW_EOF'
{评论内容}
REVIEW_EOF✅ Commentaire posté sur PR #{num}: {title}Aucun commentaire posté. Workflow terminé.| Situation | Comportement |
|---|---|
| 0 PRs ouvertes | |
| PR en draft | Indiquer dans tableau, skip pour review sauf si sélectionnée explicitement |
| CI inconnu | Afficher |
| Review agent timeout | Afficher erreur partielle, continuer avec les autres |
| Skip cette PR, notifier l'utilisateur |
| PR très large (>5000 additions) | Avertir : "Review partielle, diff tronqué" |
| Collaborateurs API 403/404 | Fallback sur auteurs des 10 derniers PRs mergés |
| 场景 | 处理方式 |
|---|---|
| 无开放PR | 显示 |
| 草稿PR | 在表格中标记,除非明确选择,否则跳过审查 |
| CI状态未知 | 在CI列显示 |
| 审查Agent超时 | 显示部分错误,继续处理其他PR |
| 跳过该PR,通知用户 |
| PR规模极大(新增代码>5000行) | 提示:"部分审查,diff已截断" |
| 协作者API返回403/404 | 回退到最近10个已合并PR的作者列表 |
gh repo viewghcurlstatusCheckRollup?mergeableMERGEABLECONFLICTINGUNKNOWNUNKNOWN?gh pr commentgh repo viewghcurlstatusCheckRollup?mergeableMERGEABLECONFLICTINGUNKNOWNUNKNOWN?gh pr comment