Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
dagster-io avatar

Pr Operations

  • 69 installs
  • Updated January 1, 1970
  • dagster-io/erk

Manage GitHub PR thread operations via erk exec commands that correctly resolve threads, instead of raw gh or API calls that only reply.

About

pr-operations manages GitHub pull-request thread operations through erk exec commands, which resolve threads correctly where raw gh or API calls only reply without resolving. A solo builder reaches for it to reliably automate PR comment-thread workflows and resolution in CI or agent-driven review loops.

  • Manage GitHub PR threads via erk exec
  • Resolves threads correctly, unlike raw gh/API
  • Reliable PR thread automation

Pr Operations by the numbers

  • 69 all-time installs (skills.sh)
  • Ranked #266 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/dagster-io/erk --skill pr-operations

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs69
Last updatedJanuary 1, 1970
Repositorydagster-io/erk

What it does

Manage GitHub PR thread operations via erk exec commands that correctly resolve threads, instead of raw gh or API calls that only reply.

Who is it for?

Agents automating PR thread reply and resolution.

Files

SKILL.mdMarkdownGitHub ↗

PR Operations Skill

Core Rule

CRITICAL: Use ONLY `erk exec` Commands for PR Thread Operations

>

- ❌ DO NOT use raw gh api calls for thread operations
- ❌ DO NOT use gh pr commands directly for thread resolution
- ✅ ONLY use erk exec commands listed below

>

The erk exec commands handle thread resolution correctly. Raw API calls only reply without resolving.

Quick Reference

CommandPurposeKey Point
get-pr-review-commentsFetch unresolved review threadsReturns threads with line info
get-pr-discussion-commentsFetch PR discussion commentsReturns top-level comments
resolve-review-threadReply AND resolve a single threadDoes both in one operation
resolve-review-threadsBatch resolve multiple threadsJSON stdin, one call for N threads
reply-to-discussion-commentReply to discussion commentFor non-code feedback
post-pr-inline-commentPost new inline commentCreates new review thread

When to Use Each Command

Fetching Comments

# Get all unresolved review threads (code comments)
erk exec get-pr-review-comments

# Get all discussion comments (top-level PR comments)
erk exec get-pr-discussion-comments

# Include resolved threads (for reference)
erk exec get-pr-review-comments --all

Resolving Review Threads

# Resolve a single thread
erk exec resolve-review-thread --thread-id "PRRT_abc123" --comment "Fixed in commit abc1234"

# Batch resolve multiple threads (preferred for pr-address batches)
echo '[{"thread_id": "PRRT_abc", "comment": "Fixed"}, {"thread_id": "PRRT_def", "comment": "Applied"}]' | erk exec resolve-review-threads

Replying to Discussion Comments

# For PR discussion comments (not code review threads)
erk exec reply-to-discussion-comment --comment-id 12345 --reply "**Action taken:** Updated the docs as requested."

Common Mistakes

MistakeWhy It's WrongCorrect Approach
Using gh api repos/.../comments/{id}/repliesOnly replies, doesn't resolveUse erk exec resolve-review-thread
Using gh pr commentDoesn't resolve threadsUse erk exec resolve-review-thread
Skipping resolution for outdated threadsThreads stay open in PRAlways resolve, even if already fixed
Generic replies like "Noted"Not useful for PR historyInclude investigation findings

Replying vs Resolving

IMPORTANT: Replying ≠ Resolving

>

- Replying (via raw gh api .../replies): Adds a comment but thread stays OPEN
- Resolving (via erk exec resolve-review-thread): Adds a comment AND marks thread as RESOLVED

>

Always use erk exec resolve-review-thread (single) or erk exec resolve-review-threads (batch) - they do both in one operation.

Comment Classification Model

When analyzing PR feedback, classify comments by complexity and group into batches.

Complexity Categories

  • Local fix: Single comment → single location change (e.g., "Fix typo", "Add type annotation")
  • Multi-location: Single comment → changes in multiple spots in one file
  • Cross-cutting: Single comment → changes across multiple files
  • Related: Multiple comments that inform a single unified change

Batch Ordering

Process batches from simplest to most complex:

BatchComplexityDescriptionExample
1Local fixesOne file, one location per comment"Use LBYL pattern at line 42"
2Single-file multi-locationOne file, multiple locations"Rename this variable everywhere in this file"
3Cross-cuttingMultiple files affected"Update all callers of this function"
4Complex/RelatedMultiple comments inform one change"Fold validate into prepare" + "Use union types for this"

Note: Discussion comments requiring doc updates go in Batch 3 (cross-cutting).

Batch Confirmation Flow

  • Batch 1-2 (simple): Auto-proceed without confirmation
  • Batch 3-4 (complex): Show plan and wait for user approval

Inline Comment Deduplication

When posting inline review comments, always deduplicate to prevent re-posting existing comments:

1. Build dedup key: (file_path, line_number, body_prefix) where prefix is first 80 characters of comment body 2. Check proximity: Match within 2-line tolerance (line 42 matches existing comments at lines 40–44) 3. Skip duplicates: If a matching key exists, do not post the comment

This prevents the same feedback from appearing multiple times across review iterations. See Inline Comment Deduplication for full algorithm details.

Detailed Documentation

For complete command documentation including JSON output formats, options, and examples:

@references/commands.md

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.