用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/joelhooks/swarm-tools --skill pr-triage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | pr-triage |
| description | Context-efficient PR comment triage. Evaluate, decide, act. Fix important issues, resolve the rest silently. |
| tags | ["pr","review","github","triage","context-efficiency"] |
Replies are SECONDARY to addressing concerns.
┌─────────────────────────────────────────────┐
│ EVALUATE → DECIDE → ACT │
├─────────────────────────────────────────────┤
│ │
│ 1. FETCH UNREPLIED (metadata only) │
│ → Get root comments without replies │
│ → ~100 bytes/comment, paginated │
│ │
│ 2. EVALUATE each comment │
│ → Fetch body only if path looks important│
│ → Skip: metadata files, style nits │
│ → Check: security, correctness, tests │
│ │
│ 3. DECIDE action │
│ → FIX: implement change, reply, resolve │
│ → RESOLVE: close silently, no reply │
│ → DEFER: create cell, resolve │
│ │
│ 4. ACT │
│ → Fix issues in code │
│ → Resolve threads (not reply) │
│ → Reply ONLY when you fixed something │
│ │
└─────────────────────────────────────────────┘
| Comment Type | Action | Reply? |
|---|---|---|
| Security/correctness bug | FIX → reply with commit | ✅ Yes |
| Valid improvement, in scope | FIX → reply with commit | ✅ Yes |
| Valid but out of scope | Create cell → resolve | ❌ No |
| Style/formatting nit | Resolve silently | ❌ No |
| Metadata file (.jsonl, etc) | Resolve silently | ❌ No |
| Already fixed | Reply with commit → resolve | ✅ Yes |
| Disagree with suggestion | Resolve silently | ❌ No |
# Get unreplied root comments (start here)
bun run scripts/pr-comments.ts unreplied owner/repo 42
# Evaluate: fetch body for specific comment
bun run scripts/pr-comments.ts expand owner/repo 123456
# Act: resolve without reply (preferred)
bun run scripts/pr-comments.ts resolve owner/repo 42 123456
# Act: reply then resolve (only when you fixed something)
bun run scripts/pr-comments.ts reply owner/repo 42 123456 "✅ Fixed in abc123"
# Helpers
bun run scripts/pr-comments.ts summary owner/repo 42 # File-level overview
bun run scripts/pr-comments.ts list owner/repo 42 # All metadata
import { fetchMetadata, fetchBody, resolveThread, reply, getThreadId } from "./scripts/pr-comments.ts";
const comments = await fetchMetadata("owner/repo", 42);
// Find unreplied root comments
const repliedTo = new Set(comments.filter(c => c.inReplyToId).map(c => c.inReplyToId));
const unreplied = comments.filter(c => !c.inReplyToId && !repliedTo.has(c.id));
for (const c of unreplied) {
// Skip metadata files - resolve silently
if (c.path.endsWith('.jsonl') || c.path.includes('.hive/')) {
const threadId = await getThreadId("owner/repo", 42, c.id);
if (threadId) await resolveThread("owner/repo", threadId);
continue;
}
// Evaluate important files
full = (, c.);
(full..() || full..()) {
(, , c., );
}
threadId = (, , c.);
(threadId) (, threadId);
}
.hive/issues.jsonl - auto-generated metadata.hive/memories.jsonl - auto-generated metadata| Action | Context Cost |
|---|---|
unreplied | ~100 bytes/comment |
expand (1 comment) | ~5KB |
resolve | 0 (GraphQL mutation) |
reply | ~200 bytes |
Rule: Fetch <10 bodies per triage session.
scripts/pr-comments.ts - Full SDK with Zod schemasreferences/gh-api-patterns.md - Raw jq patterns, GraphQL, pagination