fix(pr-threads): require --pr and --repo on every gh pr-review call#56
fix(pr-threads): require --pr and --repo on every gh pr-review call#56schloerke wants to merge 6 commits into
Conversation
Add a "Resolve PR context first" section to both skills that captures PR_NUMBER and REPO once via gh, and tighten the usage notes to flag --pr and --repo as required on every gh pr-review subcommand. Closes a gap where bulk loops and per-thread replies could drop --pr.
Move the gh pr-review extension check and the "Resolve PR context" step under a single "Prerequisites" heading at the top of both skills, and drop the redundant title/usage/description/note block that duplicated the YAML frontmatter.
Per review on PR #56, replace the bash PR_NUMBER / REPO variable approach with explicit gh lookup commands that the model runs once and substitutes the resulting literal values into every --pr / --repo flag. This is more portable across agents and shells.
Both skills always look up the PR number from the current branch, so the optional positional argument was never necessary. Update the "Resolve PR context" section to unconditionally fetch the PR number, and adjust the example invocation to match.
- Drop "Start a Pending Review", "Add Review Comments", and "Submit a Review" from pr-threads-address — out of scope for a skill that addresses existing threads. - Drop "View PR Reviews and Comments" from pr-threads-resolve — belongs in pr-threads-address only. - Collapse redundant bash example blocks and example-driven Usage Notes; fold the still-useful pointers (thread-ID source, unresolved focus) into the relevant subsections inline.
Both under the limits (500 lines / 5000 tokens for SKILL.md; 100 tokens for description). |
An outdated-but-unresolved thread is still a thread the reviewer chose not to mark resolved, so the feedback may still apply to the rewritten code. Hiding those threads risks silently missing real review feedback.
gadenbuie
left a comment
There was a problem hiding this comment.
Looks great! Just one more comment about the description based on some text you're removing from the skill body
| @@ -1,3 +1,3 @@ | |||
| --- | |||
| name: pr-threads-resolve | |||
| description: Bulk resolve unresolved PR review threads. Useful after manually addressing threads or after using /pr-threads-address. | |||
There was a problem hiding this comment.
If you're hoping for the model to automatically use this skill when appropriate, it's worth spending a little more time on the description. Initially, the model will only see this description and has to make a decision about when to load the skill from that description alone.
I noticed this because there's some "when to use" language that was inside the skill (where the model wouldn't see it until after it's lodade) that we're removing (good), but maybe we want to move it into the description instead.
Summary
pr-threads-addressandpr-threads-resolvepreviously promised auto-detection of the PR number when omitted, but never told Claude how to do it, and--pr/--repowere only shown in examples (not flagged as required). This led to bulk loops and per-thread replies dropping--pr.PR_NUMBERandREPOonce viagh pr view/gh repo view, and instructs reusing them on every subsequentgh pr-reviewcall.pr-threads-resolveto use"$PR_NUMBER"/"$REPO"instead of hardcoded42/owner/repo.Test plan
/pr-threads-resolvewith no PR number on a branch with an open PR; confirm Claude resolves the PR number first and passes--pron everygh pr-reviewcall./pr-threads-addresssimilarly and confirm--pr/--repoare passed oncomments replyandthreads resolve../count-skill-tokens.py github/pr-threads-resolveandgithub/pr-threads-addressare still under limits.