ain3sh/.agents/pr-context
Claude Code and agent skill by ain3sh/.agents
- community
Checking that the SKILL.md file is still in the repository.
Use to gather a PR's full context: metadata, diff, conversation, review state, and the linked Linear ticket.
Install
npx vskill@latest install ain3sh/.agents/pr-contextSKILL.md
The same SKILL.md was published earlier as ain3sh/.agents/pr-context.
PR Context Gather
Parse Input
Accept PR reference as: #123, 123, or a full GitHub URL. Extract the number.
Fetch PR Metadata
Review State
Pushing commits does not dismiss approvals. Dismissing stale approvals is an opt-in branch-protection setting, and most repos leave it off. Never infer from a push that a PR lost its approval or needs review again. Read the state GitHub reports instead:
reviewDecisionis the merge-gating verdict after branch protection, dismissals included.APPROVEDmeans the approval held: do not wait on review and do not re-request it.- A dismissed approval shows up as
state: "DISMISSED"inlatestReviews. Only that, never the push itself, is evidence of dismissal. - Re-check after pushing when the answer matters. Even a dismissed approver is never re-requested automatically; the user does that manually.
Fetch Conversation
Fetch Diff
Resolve Linked Linear Ticket
Scan the PR body for Linear ticket references (patterns like TEAM-123, or Linear URLs). If found:
Extract from the ticket: problem statement, acceptance criteria, constraints, and discussion context.
Derive Repo Identity
These values are needed by commands that post review comments or interact with the GitHub API.
GitHub API Selection
Choose the right gh interface for each operation. `gh pr edit` is currently broken on orgs that still have Projects (classic) enabled -- it fails with a GraphQL deprecation error on every invocation, regardless of flags. Route every mutation through REST instead.
| Operation | Use | Why | |
|---|---|---|---|
| View/list PRs, issues | gh pr view, gh issue list | CLI works for reads | |
| Create PR | gh pr create | CLI handles all create options | |
| Update PR title | gh api repos/$REPO/pulls/<N> -X PATCH -f title="..." | gh pr edit --title hits Projects-classic deprecation | |
| Update PR body | gh api repos/$REPO/pulls/<N> -X PATCH -f body="..." | gh pr edit --body hits same deprecation | |
| Add reviewer | gh api repos/$REPO/pulls/<N>/requested_reviewers --method POST -f "reviewers[]=<login>" | gh pr edit --add-reviewer hits same deprecation | |
| Add label | gh api repos/$REPO/issues/<N>/labels --method POST -f "labels[]=<label>" | gh pr edit --add-label hits same deprecation | |
| Post line-level review comments | gh api repos/$REPO/pulls/<N>/comments --method POST -f ... | CLI cannot target specific diff lines or sides | |
| Code suggestion comments | REST API with `suggestion blocks in body | CLI has no code suggestion support | |
| Resolve review threads | gh api graphql with resolveReviewThread mutation | No REST endpoint exists for thread resolution | |
| Merge PR | gh pr merge | CLI handles merge strategies |
Rule of thumb: gh pr/gh issue CLI for reads and gh pr create/gh pr merge only. Every PR mutation (body, title, labels, reviewers) goes through gh api REST. gh api graphql is reserved for thread resolution and complex queries that need nested data.
Do not retry `gh pr edit` when it fails -- the error is deterministic, not transient. Switch to REST immediately.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pr-context/SKILL.md
Popularity
- Repository stars
- 14
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ain3sh/.agents/pr-context)