From quiver
Create a GitHub pull request from the current branch. Use when the user says 'create a pr', 'open pr', 'push and open a pr', 'create pull request', or wants to open a PR from their branch.
npx claudepluginhub yagizdo/quiver --plugin quiverThis skill uses the workspace's default tool permissions.
```
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
!`git rev-parse --is-inside-work-tree 2>/dev/null || echo "NO_GIT"`
!`git status --short 2>/dev/null || echo "NO_GIT"`
!`git branch --show-current 2>/dev/null || echo "NO_GIT"`
!`git rev-parse --abbrev-ref origin/HEAD 2>/dev/null || echo "NO_DEFAULT_BRANCH"`
!`git log --oneline -10 2>/dev/null || echo "NO_GIT"`
!`git remote -v 2>/dev/null || echo "NO_REMOTE"`
Silently evaluate the gather-context output. Stop with a clear message on the first failure:
NO_GIT -> print: > No git repository detected. /create-pr requires a git repo. Stop here.git remote -v returned NO_REMOTE or is empty -> print: > No remote configured. Add one with \git remote add origin `.` Stop here.git status --short is not empty -> print: > You have uncommitted changes. Commit them first -- you can use \/quiver:commit`.` Stop here.Determine the base branch using this priority order. Use the first that resolves:
$ARGUMENTS contains --base <value>, use that value as the base branch.git rev-parse --abbrev-ref origin/HEAD did not return NO_DEFAULT_BRANCH, strip the origin/ prefix and use the result.main -- run git rev-parse --verify origin/main 2>/dev/null. If it succeeds, use main.master -- run git rev-parse --verify origin/master 2>/dev/null. If it succeeds, use master.develop -- run git rev-parse --verify origin/develop 2>/dev/null. If it succeeds, use develop.AskUserQuestion.After resolving the base branch:
Check if the current branch (from git branch --show-current) equals the base branch. If so -> print: > You are on the base branch (\{base}`). Create a feature branch first.` Stop here.
Check commits ahead: run git log --oneline {base}..HEAD. If output is empty -> print: > No commits ahead of \{base}`. Nothing to create a PR for.` Stop here.
Before creating the PR, ensure the branch is pushed to the remote:
git rev-parse --abbrev-ref @{upstream} 2>/dev/nullgit pushgit push -u origin {branch}If push fails, show the error verbatim and stop here.
Gather additional context for PR generation:
git log --oneline {base}..HEAD -- all commits on this branchgit diff --stat {base}..HEAD -- files changed summarygit diff {base}..HEAD -- full diff to understand the actual changes in depthRead the full diff carefully. Understand what was added, modified, and why. Use this understanding to write a PR description that a reviewer can use to evaluate the changes without reading every line of code.
Title rules:
Body rules:
The body depth should scale with the PR size:
Body template (adapt sections based on PR size):
## Summary
{1-3 sentences explaining what this PR does and WHY it exists -- the motivation, not just a restatement of the diff}
{For medium+ PRs, add bullet points with key changes organized by area:}
- **New file:** `path/to/file` -- what it does
- **Modified:** `path/to/file` -- what changed and why
### How it works
{For large PRs: describe the flow, architecture, or algorithm. Numbered steps work well.}
### Design decisions
{For large PRs with non-obvious choices: use a table or bullet list explaining key decisions.}
| Decision | Choice | Why |
|----------|--------|-----|
| {what was decided} | {what was chosen} | {why this over alternatives} |
## Test plan
- [ ] {Testing steps or verification checklist}
Generate the body from the full diff content, commit history, and diff stats. Write for a reviewer -- explain the why and how, not just the what.
--draftIf $ARGUMENTS contains "draft", skip the AskUserQuestion step. Show the generated title and body, then immediately execute gh pr create --draft --title "{title}" --body "..." --base {base}.
Use the AskUserQuestion tool:
Question: Build the question string using this template (replace placeholders):
"\x1b[2mPR Title:\x1b[0m\n{title}\n\n\x1b[2mPR Body:\x1b[0m\n{body}\n\nProceed?"
Header: "Pull Request"
Options:
On "Create PR":
gh pr create --title "{title}" --body "$(cat <<'EOF'
{body}
EOF
)" --base {base_branch}
On "Create as Draft":
Same command with --draft appended.
On "Edit": Ask what to change, revise the title or body, and re-present the AskUserQuestion.
On "Cancel":
PR creation cancelled.
Stop here.
After successful PR creation, display:
PR Created: {pr_url} Title: {title} Branch:
{current_branch}->{base_branch}Commits: {count} Files changed: {count}
Extract the PR URL from the gh pr create output (it prints the URL to stdout).
If gh pr create fails, show the error verbatim and suggest the user check:
gh auth login)gh pr list --head {branch})Never retry automatically.
Trigger: /create-pr (or /create-pr --draft, /create-pr --base develop); /quiver:create-pr should also work.
Setup:
gh CLI is installed and authenticated.Expected behavior:
--base flag > origin/HEAD > main > master > develop > prompt).git push with upstream, otherwise git push -u origin <branch>).AskUserQuestion with Create PR / Create as Draft / Edit / Cancel.--draft, skill skips the prompt and runs gh pr create --draft ….gh stdout.Verification checklist:
/create-pr.NO_GIT, NO_REMOTE, dirty tree, base-branch ambiguity, or zero commits ahead.gh pr create invocation.--base <branch> overrides every other base-branch source.Known gotchas:
gh pr create exits non-zero when a PR already exists; the skill must surface the error and suggest gh pr list --head <branch> rather than retrying.gh; the user must run a platform-specific tool manually for those.