pr-triage
Triages PR feedback by acting on important issues and dismissing trivial comments. Focuses on fixes over conversation.
Install
mkdir -p .claude/skills/pr-triage && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9065" && unzip -o skill.zip -d .claude/skills/pr-triage && rm skill.zipInstalls to .claude/skills/pr-triage
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Context-efficient PR comment triage. Evaluate, decide, act. Fix important issues, resolve the rest silently.Key capabilities
- →Fetch unreplied PR comments
- →Evaluate PR comments for security and correctness
- →Implement fixes for identified issues
- →Resolve non-essential threads silently
How it works
It retrieves PR comment metadata, filters for unreplied threads, evaluates their importance, and either applies a fix or resolves the thread silently.
Inputs & outputs
When to use pr-triage
- →Resolving high-volume PR feedback
- →Automating triage of style-only comments
- →Prioritizing security bugs in PRs
About this skill
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 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 |
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
| 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.
References
scripts/pr-comments.ts- Full SDK with Zod schemasreferences/gh-api-patterns.md- Raw jq patterns, GraphQL, pagination
When not to use it
- →Replying to every single comment
- →Triage sessions involving more than 10 comment bodies
Limitations
- →Limited to 10 comment bodies per triage session to manage context costs
How it compares
It prioritizes fixing actual issues over engaging in discussion, automating the resolution of style nitpicks and metadata comments.
Compared to similar skills
pr-triage side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pr-triage (this skill) | 1 | 7mo | Review | Intermediate |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| claude-automation-recommender | 47 | 2mo | Review | Beginner |
| codex-skill | 12 | 5mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by joelhooks
View all by joelhooks →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
claude-automation-recommender
anthropics
Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
codex-skill
feiskyer
Use when user asks to leverage codex, gpt-5, or gpt-5.1 to implement something (usually implement a plan or feature designed by Claude). Provides non-interactive automation mode for hands-off task execution without approval prompts.
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
subagent-driven-development
davila7
Use when executing implementation plans with independent tasks in the current session
validate-openapi-specs
epieczko
Validates and registers hook manifest files (YAML) in the Hook Registry for versioned hook management.