dceoy/github-cli-agent-skills · Archived

gh-pr-close

Close a GitHub pull request using gh CLI, optionally with a comment and branch deletion.

First seen Jun 17, 2026

Installation

$ npx skills add dceoy/github-cli-agent-skills --skill gh-pr-close

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from dceoy/github-cli-agent-skills.

npx skills add dceoy/github-cli-agent-skills

Browse all from dceoy/github-cli-agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Grep

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,714 B
  • docs SUMMARY.md 107 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

GitHub PR Close

When to use

  • The user asks to close a PR without merging.
  • PR is abandoned, superseded, or no longer needed.
  • Cleaning up stale PRs.

Inputs to confirm

  • PR number, URL, or branch name.
  • Whether to delete the associated branch.
  • Optional closing comment.
  • Target repo if not current (--repo OWNER/REPO).

Workflow

  1. Verify auth:

``bash gh --version gh auth status ``

  1. Check PR state first:

``bash gh pr view 123 --json number,title,state,headRefName ``

  1. Close the PR:

``bash gh pr close 123 gh pr close 123 --comment "Closing: superseded by #456" gh pr close 123 --delete-branch ``

  1. Verify closure:

``bash gh pr view 123 --json state,closedAt ``

Examples

# Close PR without comment
gh pr close 123

# Close with explanation
gh pr close 123 --comment "No longer needed after refactoring."

# Close and delete branch
gh pr close 123 --delete-branch --comment "Superseded by #200"

Flags reference

Flag Description
-c, --comment Leave a closing comment
-d, --delete-branch Delete local and remote branch after close

Notes

  • Closed PRs can be reopened with gh pr reopen.
  • Use --delete-branch to clean up feature branches.
  • Arguments accept number, URL, or branch name.

References