โ† Back to list
joelhooks

pr-triage

by joelhooks

๐Ÿ Multi-agent swarm coordination for OpenCode with learning capabilities, agent issue tracking, and management

โญ 347๐Ÿด 30๐Ÿ“… Jan 23, 2026

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

PR Comment Triage - Evaluate โ†’ Decide โ†’ Act

Philosophy

Replies are SECONDARY to addressing concerns.

  • Important issue? FIX IT โ†’ reply with commit ref โ†’ resolve
  • Not important? RESOLVE SILENTLY โ†’ no reply needed
  • Don't reply to every comment - that's noise

The Workflow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         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   โ”‚
โ”‚                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Decision Matrix

Comment TypeActionReply?
Security/correctness bugFIX โ†’ reply with commitโœ… Yes
Valid improvement, in scopeFIX โ†’ reply with commitโœ… Yes
Valid but out of scopeCreate cell โ†’ resolveโŒ No
Style/formatting nitResolve silentlyโŒ No
Metadata file (.jsonl, etc)Resolve silentlyโŒ No
Already fixedReply with commit โ†’ resolveโœ… Yes
Disagree with suggestionResolve silentlyโŒ No

SDK Commands

# 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

Quick Triage Pattern

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
  const full = await fetchBody("owner/repo", c.id);
  
  if (full.body.includes('Critical') || full.body.includes('security')) {
    // FIX IT, then reply
    // ... implement fix ...
    await reply("owner/repo", 42, c.id, "โœ… Fixed in abc123");
  }
  
  // Resolve either way
  const threadId = await getThreadId("owner/repo", 42, c.id);
  if (threadId) await resolveThread("owner/repo", threadId);
}

Skip These (Resolve Silently)

  • .hive/issues.jsonl - auto-generated metadata
  • .hive/memories.jsonl - auto-generated metadata
  • Changeset formatting suggestions
  • Import ordering nits
  • "Add tracking issue" for intentional skips
  • Style preferences you disagree with

Fix These (Reply + Resolve)

  • Security vulnerabilities
  • Correctness bugs
  • Missing error handling
  • Test coverage gaps (if valid)
  • Type safety issues

Context Budget

ActionContext Cost
unreplied~100 bytes/comment
expand (1 comment)~5KB
resolve0 (GraphQL mutation)
reply~200 bytes

Rule: Fetch <10 bodies per triage session.

References

  • scripts/pr-comments.ts - Full SDK with Zod schemas
  • references/gh-api-patterns.md - Raw jq patterns, GraphQL, pagination

Score

Total Score

75/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โ—‹LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

0/10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โœ“ไบบๆฐ—

GitHub Stars 100ไปฅไธŠ

+5
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โœ“ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

+5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon