Github pr

From systeminit/swamp · View interactive version

Github pr is an AI agent skill from the GitHub repository systeminit/swamp. Create and manage GitHub pull requests. Supports both jujutsu (jj) and git version control. Use when submitting PRs, checking PR status, fixing review feedback, or merging PRs. Triggers on "submit pr", "create pr", "check pr", "fix review", "pr status", "merge pr".

How to use this skill

Skill file

GitHub PR Workflow

Detect VCS

First, determine which version control system is in use:

if [ -d ".jj" ]; then
  echo "jujutsu"
else
  echo "git"
fi

VCS-specific commands

commands

Pre-flight Checks

The verification workflow must have passed before opening a PR. If using the

issue-lifecycle skill, verification is already enforced — the link_pr method

requires a passing attestation.

If working outside the issue lifecycle (e.g. a quick fix), run the verification

workflows (verify-build, verify-reviews, verify-skills) before submitting.

See agent-constraints/verification-conventions.md for the commands.

Do not run lint/test/fmt manually as a pre-PR gate — the verification workflow

covers all checks.

Create PR

After pushing changes (see VCS reference), create the PR:

gh pr create --head <branch-or-bookmark> --base main --title "Title here" --body "$(cat <<'EOF'
## Summary

Brief description of changes.

## Test Plan

- How the changes were tested
EOF
)"

Check Merge Status

For a PR linked to an issue lifecycle, run the lifecycle's watch_pr instead of

checking by hand — it watches the PR and records the outcome.

To check if a PR is ready to merge:

# Check CI status
gh pr checks <pr-number>

# View PR details including review status
gh pr view <pr-number>

Handle Blocking Reviews

When a PR has blocking review feedback:

  1. Get the review comments:

```bash

gh pr view <pr-number> --comments

```

  1. Enter plan mode to analyze the feedback and plan fixes
  1. Implement the fixes
  1. Push updates (see VCS reference for push commands)
  1. Re-request review if needed:

```bash

gh pr edit <pr-number> --add-reviewer <username>

```

Handle Suggestions

When reviewers provide non-blocking suggestions:

  1. Get suggestions from the review:

```bash

gh pr view <pr-number> --comments

```

  1. Enter plan mode to evaluate each suggestion
  1. Decide which suggestions to implement (discuss with user if unclear)
  1. Implement approved suggestions and push
  1. Respond to suggestions you chose not to implement with reasoning

Merge PR

Once all checks pass and reviews are approved:

# Squash merge (preferred)
gh pr merge <pr-number> --squash --delete-branch

# Or merge commit
gh pr merge <pr-number> --merge --delete-branch
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.