agentsclimarketplace

Gh pr close

Skill dceoy/github-cli-agent-skills/skills/gh-pr-close

Agent skills for GitHub CLI

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

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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

SKILL.md

1.7 KB, 390 tokens by cl100k_base, as published. Nobody here has run it

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:
    gh --version
    gh auth status
    
  2. Check PR state first:
    gh pr view 123 --json number,title,state,headRefName
    
  3. Close the PR:
    gh pr close 123
    gh pr close 123 --comment "Closing: superseded by #456"
    gh pr close 123 --delete-branch
    
  4. Verify closure:
    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

FlagDescription
-c, --commentLeave a closing comment
-d, --delete-branchDelete 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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.