AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Pr From Branch

skill-cloud-peek-agent-skills-pr-from-branch · by Cloud-Peek

Use when the user wants to draft a GitHub pull request title and body from the current branch, choose existing repo labels, and open the PR with gh after confirmation.

No reviews yet
0 installs
32 views
0.0% view→install

Install

$ agentstack add skill-cloud-peek-agent-skills-pr-from-branch

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-cloud-peek-agent-skills-pr-from-branch)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pr From Branch? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PR From Branch

Draft a pull request from the current git branch, show the draft to the user, and only create the PR after confirmation.

Prerequisites

Verify first. If any check fails, stop and report what is missing.

git rev-parse --is-inside-work-tree
gh --version
gh auth status

If gh is missing, direct the user to https://cli.github.com/ and gh auth login.

Gather Branch Context

Resolve the current branch and base branch.

  • If the user provides a base branch argument, use it.
  • Otherwise auto-detect the GitHub default branch, falling back to main, then master.
  • Fetch the base branch.
  • Verify origin/ exists before diffing.

Read:

git branch --show-current
git log --reverse --pretty=format:"%h %s%n%b%n---" "origin/..HEAD"
git diff --stat "origin/...HEAD"
git diff --name-only "origin/...HEAD"
git diff "origin/...HEAD"

Stop and report if the checkout is detached, the current branch is the base branch, there are zero commits ahead of base, or the diff is huge. For huge diffs, rely on stat, commit messages, touched paths, and sampled key files.

Draft

Title rules:

  • Imperative mood, sentence case, no trailing period.
  • Aim for about 50 characters; keep under about 72.
  • Use a conventional-commits prefix only if recent merged PR titles use one.
  • Include ticket references from the branch name when that matches repo convention.

Check recent style:

gh pr list --state merged --limit 10 --json title --jq '.[].title'

Body template:

## Summary

## Changes

- 

## Why

## Test plan

- 

## Notes

Write from the diff, not just commit messages. Be specific and do not invent rationale.

Labels

Only use existing repo labels:

gh label list --limit 200 --json name --jq '.[].name'

Choose area labels by matching touched paths to existing labels. Always add size:patch when it exists; otherwise skip it and mention that in the draft.

Confirm Before Creating

Print the proposed title, body, and labels. Ask the user whether to open the PR as-is, edit it, or change base, draft status, or labels.

Do not run gh pr create until the user confirms.

Create

Write the approved body to a temp file and run gh pr create with one --label flag per confirmed label.

Offer --draft, --reviewer, --assignee @me, or --web when relevant. If the branch is not pushed, let gh push it or push first after user approval.

Handle edge cases explicitly:

  • PR already exists: offer gh pr view --web or gh pr edit.
  • Uncommitted changes: mention them and ask whether to commit or stash.
  • Branch behind base: mention it and offer to rebase or merge.

After success, print the PR URL.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.