ain3sh/.agents/pr-context

Claude Code and agent skill by ain3sh/.agents

Trust tier 3
  • community
Source check pending

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-context

SKILL.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

bash
gh pr view <number> --json title,body,headRefName,baseRefName,additions,deletions,changedFiles,commits,labels,reviewRequests,headRefOid,reviewDecision,latestReviews

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:

bash
gh pr view <number> --json reviewDecision,latestReviews \
--jq '{reviewDecision, latest: [.latestReviews[] | {login: .author.login, state}]}'
  • reviewDecision is the merge-gating verdict after branch protection, dismissals included. APPROVED means the approval held: do not wait on review and do not re-request it.
  • A dismissed approval shows up as state: "DISMISSED" in latestReviews. 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

bash
gh pr view <number> --comments

Fetch Diff

bash
gh pr diff <number>

Resolve Linked Linear Ticket

Scan the PR body for Linear ticket references (patterns like TEAM-123, or Linear URLs). If found:

bash
linear i get <ID> --output json --comments

Extract from the ticket: problem statement, acceptance criteria, constraints, and discussion context.

Derive Repo Identity

bash
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
HEAD_SHA=$(gh pr view <number> --json headRefOid --jq '.headRefOid')

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.

OperationUseWhy
View/list PRs, issuesgh pr view, gh issue listCLI works for reads
Create PRgh pr createCLI handles all create options
Update PR titlegh api repos/$REPO/pulls/<N> -X PATCH -f title="..."gh pr edit --title hits Projects-classic deprecation
Update PR bodygh api repos/$REPO/pulls/<N> -X PATCH -f body="..."gh pr edit --body hits same deprecation
Add reviewergh api repos/$REPO/pulls/<N>/requested_reviewers --method POST -f "reviewers[]=<login>"gh pr edit --add-reviewer hits same deprecation
Add labelgh api repos/$REPO/issues/<N>/labels --method POST -f "labels[]=<label>"gh pr edit --add-label hits same deprecation
Post line-level review commentsgh api repos/$REPO/pulls/<N>/comments --method POST -f ...CLI cannot target specific diff lines or sides
Code suggestion commentsREST API with `suggestion blocks in bodyCLI has no code suggestion support
Resolve review threadsgh api graphql with resolveReviewThread mutationNo REST endpoint exists for thread resolution
Merge PRgh pr mergeCLI 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ain3sh/.agents/pr-context/badge)](https://verified-skill.com/skills/ain3sh/.agents/pr-context)

Something wrong with this skill or its page? Tell us.