github-pr

GitHub PR utilities for code review workflows

242 stars

Best use case

github-pr is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. GitHub PR utilities for code review workflows

GitHub PR utilities for code review workflows

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "github-pr" skill to help with this workflow task. Context: GitHub PR utilities for code review workflows

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/github-pr/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/bind/github-pr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/github-pr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How github-pr Compares

Feature / Agentgithub-prStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

GitHub PR utilities for code review workflows

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

## Overview

CLI tools for GitHub pull request operations. Designed to support automated code review workflows. Requires the GitHub CLI (`gh`) to be installed and authenticated.

## Prerequisites

- [bun](https://bun.sh) runtime installed
- [GitHub CLI](https://cli.github.com/) installed and authenticated
  ```bash
  brew install gh
  gh auth login
  ```

## Commands

### Check Review Needed

Determines if a PR should be reviewed by checking various conditions.

```bash
bun .opencode/skill/github-pr/check-review-needed.js [pr-number]
```

**Arguments:**
- `pr-number` - PR number (optional, defaults to current branch's PR)

**Output:**
JSON object with:
- `shouldReview` - boolean indicating if review should proceed
- `reason` - explanation for the decision
- `prNumber` - the PR number checked

**Conditions checked:**
- PR is not closed or merged
- PR is not a draft
- PR is not from a known bot (dependabot, renovate, etc.)
- PR title doesn't indicate automation (bump, chore(deps), etc.)
- PR has not already been reviewed by Claude/AI
- PR is not trivial (2 or fewer lines changed)

**Examples:**
```bash
# Check current branch's PR
bun .opencode/skill/github-pr/check-review-needed.js

# Check specific PR
bun .opencode/skill/github-pr/check-review-needed.js 123
```

---

### List Guideline Files

Finds AGENTS.md (or CLAUDE.md) files relevant to a PR's changes.

```bash
bun .opencode/skill/github-pr/list-guideline-files.js [pr-number] [--json]
```

**Arguments:**
- `pr-number` - PR number (optional, defaults to current branch's PR)

**Options:**
- `--json` - Output as JSON array with file contents

**Search locations:**
- Repository root
- All directories containing files modified in the PR
- Parent directories of modified files

**Priority:** If both AGENTS.md and CLAUDE.md exist in the same directory, AGENTS.md takes precedence.

**Examples:**
```bash
# List guideline files for current PR
bun .opencode/skill/github-pr/list-guideline-files.js

# Get full content as JSON
bun .opencode/skill/github-pr/list-guideline-files.js 123 --json
```

**JSON Output Format:**
```json
[
  {
    "path": "AGENTS.md",
    "content": "# Project Guidelines\n..."
  },
  {
    "path": "src/components/AGENTS.md",
    "content": "# Component Guidelines\n..."
  }
]
```

---

### Post Inline Comment

Posts a review comment on a specific line or line range in a PR.

```bash
bun .opencode/skill/github-pr/post-inline-comment.js <pr-number> --path <file> --line <n> --body <text>
```

**Arguments:**
- `pr-number` - PR number (optional if on a PR branch)

**Options:**
- `--path <file>` - File path to comment on (required)
- `--line <n>` - Line number to comment on (required)
- `--start-line <n>` - Start line for multi-line comments (optional)
- `--body <text>` - Comment body in markdown (required)

**Suggestion blocks:**
Include a suggestion block for small fixes that can be committed directly:

````markdown
Fix the error handling:

```suggestion
try {
  await authenticate();
} catch (e) {
  handleAuthError(e);
}
```
````

**Important:** Suggestions must be complete. The author should be able to click "Commit suggestion" without needing additional changes elsewhere.

**Examples:**
```bash
# Single line comment
bun .opencode/skill/github-pr/post-inline-comment.js 123 \
  --path src/auth.ts \
  --line 67 \
  --body "Missing error handling for OAuth callback"

# Multi-line comment (lines 65-70)
bun .opencode/skill/github-pr/post-inline-comment.js 123 \
  --path src/auth.ts \
  --line 70 \
  --start-line 65 \
  --body "This authentication block needs refactoring"
```

---

## Integration with gh CLI

These tools wrap the GitHub CLI (`gh`). For operations not covered by these utilities, use `gh` directly:

```bash
# View PR details
gh pr view 123 --json title,body,state,isDraft,files

# Get PR diff
gh pr diff 123

# View PR comments
gh pr view 123 --comments

# Post a regular comment
gh pr comment 123 --body "Comment text"

# View file at PR head
gh api repos/{owner}/{repo}/contents/{path}?ref={branch}
```

## Output Behavior

- Command output is displayed directly to the user in the terminal
- JSON output is formatted for readability and piping
- Use `--json` flag when you need to process output programmatically

Related Skills

github-release-assistant

242
from aiskillstore/marketplace

Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.

github-repo-search

242
from aiskillstore/marketplace

帮助用户搜索和筛选 GitHub 开源项目,输出结构化推荐报告。当用户说"帮我找开源项目"、"搜一下GitHub上有什么"、"找找XX方向的仓库"、"开源项目推荐"、"github搜索"、"/github-search"时触发。

github-actions-docs

242
from aiskillstore/marketplace

Use when users ask how to write, explain, customize, migrate, secure, or troubleshoot GitHub Actions workflows, workflow syntax, triggers, matrices, runners, reusable workflows, artifacts, caching, secrets, OIDC, deployments, custom actions, or Actions Runner Controller, especially when they need official GitHub documentation, exact links, or docs-grounded YAML guidance.

github-issue-creator

242
from aiskillstore/marketplace

Convert raw notes, error logs, voice dictation, or screenshots into crisp GitHub-flavored markdown issue reports. Use when the user pastes bug info, error messages, or informal descriptions and wants a structured GitHub issue. Supports images/GIFs for visual evidence.

github-automation

242
from aiskillstore/marketplace

Automate GitHub repositories, issues, pull requests, branches, CI/CD, and permissions via Rube MCP (Composio). Manage code workflows, review PRs, search code, and handle deployments programmatically.

github-actions-templates

242
from aiskillstore/marketplace

Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.

address-github-comments

242
from aiskillstore/marketplace

Use when you need to address review or issue comments on an open GitHub Pull Request using the gh CLI.

github-elements-tracking

242
from aiskillstore/marketplace

This skill should be used when the user asks to "track work across sessions", "create an epic", "manage issue waves", "post a checkpoint", "claim an issue", "recover from compaction", "coordinate multiple agents", "update memory bank", "store large documents", or mentions GitHub Issues as persistent memory, multi-session work, context survival, agent collaboration, SERENA MCP memory, or project-level context. Provides complete protocols for using GitHub Issues as permanent memory that survives context exhaustion, with integrated SERENA MCP memory bank for project-level context and large document storage.

when-reviewing-github-pr-use-github-code-review

242
from aiskillstore/marketplace

Comprehensive GitHub pull request code review using multi-agent swarm with specialized reviewers for security, performance, style, tests, and documentation. Coordinates security-auditor, perf-analyzer, code-analyzer, tester, and reviewer agents through mesh topology for parallel analysis. Provides detailed feedback with auto-fix suggestions and merge readiness assessment. Use when reviewing PRs, conducting code audits, or ensuring code quality standards before merge.

when-releasing-software-use-github-release-management

242
from aiskillstore/marketplace

Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management. Coordinates release-manager, cicd-engineer, tester, and docs-writer agents through hierarchical topology to handle semantic versioning, changelog generation, release notes, deployment validation, and post-release monitoring. Supports multiple release strategies (rolling, blue-green, canary) and automated rollback. Use when creating releases, managing deployments, or coordinating version updates.

when-managing-multiple-repos-use-github-multi-repo

242
from aiskillstore/marketplace

Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration. Coordinates repo-architect, code-analyzer, and coordinator agents across multiple repositories to maintain consistency, propagate changes, manage dependencies, and ensure architectural alignment. Handles monorepo-to-multi-repo migrations, cross-repo refactoring, and synchronized releases. Use when managing microservices, multi-package ecosystems, or coordinating changes across related repositories.

when-managing-github-projects-use-github-project-management

242
from aiskillstore/marketplace

Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning. Coordinates planner, issue-tracker, and project-board-sync agents to automate issue triage, sprint planning, milestone tracking, and project board updates. Integrates with GitHub Projects v2 API for advanced automation, custom fields, and workflow orchestration. Use when managing development projects, coordinating team workflows, or automating project management tasks.