/gh-workflow:drafting-prfrom gh-workflow
Creates a draft pull request from current working changes. Handles branching, committing, pushing, and opening the PR with the project's PR template. Triggers on requests like "create a draft PR," "open a draft pull request," "push my changes and open a PR," "ship this as a PR," "submit a draft for review," "PR this," or any variation of branching and opening a draft PR against main.
Ships in gh-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Creates a draft pull request from current working changes: analyzes changes, explores the codebase if needed, asks clarifying questions, then creates a branch (if on main), stages and commits, pushes, and opens a draft PR following the project's PR template.
!git branch --show-current
!`git status`
!`git diff HEAD`
!`git log --oneline -5`
!git rev-parse --show-toplevel | xargs -I {} cat {}/.github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || echo "No PR template found"
Before starting, verify:
git status shows a clean working tree, stop and tell the user: "No changes detected. Stage or modify files before creating a PR."gh auth status fails, stop and tell the user: "GitHub CLI is not authenticated. Run gh auth login first."Do not proceed if any validation fails.
Track progress through these phases:
- [ ] Phase 1: Codebase Exploration (if needed)
- [ ] Phase 2: Clarifying Questions
- [ ] Phase 3: Create branch
- [ ] Phase 4: Stage and commit
- [ ] Phase 5: Push to remote
- [ ] Phase 6: Create draft PR
The goal here is to catch things the developer may have overlooked — missing related changes, broken consumers, inconsistencies — so these can be surfaced before the PR is created rather than discovered during review.
Skip when the diff is small and self-contained: a single file change, a documentation update, a config tweak, or changes isolated to one module with no exported API changes.
Run when any of these apply:
When running:
Read, Grep, Glob, LSP to check for downstream consumers, missing updates, and consistency with existing patternsTask for deeper analysis across multiple areas in parallelUse AskUserQuestion to present a single consolidated prompt. Lead with your understanding of the changes, then ask only what you genuinely need answered:
Keep the question concise. Don't ask about things you can reasonably infer from the diff. Wait for the response before proceeding.
If currently on main or master:
fix/issue-description or feat/feature-name)git checkout -b <branch-name>If already on a feature branch, skip to Phase 4. The branch name will be validated for remote conflicts in Phase 5.
git add (avoid staging sensitive or untracked files like .env, credentials, local config)Co-Authored-By: Claude <[email protected]> in the commit messageBefore pushing, check if a remote branch with the same name already exists:
git ls-remote --heads origin `git branch --show-current`
If a remote branch with the same name exists, create a new branch from the current one before pushing:
feat/feature-name-2, then -3, etc.) until the name is unique on the remotegit checkout -b <new-unique-branch-name>Then push with upstream tracking:
git push -u origin `git branch --show-current`
If the push fails, report the error and stop.
Create the draft pull request:
gh pr create --draft --title "<title>" --body "<body>"
Title: Concise and descriptive, based on the changes. Use the user's preferred title from Phase 2 if provided.
Body:
- [ ])If gh pr create fails with "already exists," output the existing PR URL and stop. For other errors, report the raw error message.
After success, output the PR URL to the user.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction./commenting-on-prsPosts inline review comments on GitHub pull request diffs using the GitHub reviews API. Handles requests to add code review comments, inline feedback, line-level annotations, or inline notes to specific lines of a pull request diff. Applicable when a user wants to comment on code changes, annotate a diff, leave review feedback on a PR, post a pull request review, or add line comments to changed files. Accepts file path, line number, and comment body for each comment; batches multiple comments into a single review API call./dogfoodSystematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams./uploading-attachmentsUpload one or more image attachments to GitHub PRs without commits. Supports single or multiple file paths. Uses browser login for authentication. Triggers on requests like "upload this image to the PR," "attach this screenshot to the pull request," "add this image to GitHub without committing," "get a CDN URL for this image," "upload assets for the PR comment," or any variation of uploading images or attachments to GitHub.npx claudepluginhub ibara1454/agent-marketplace --plugin gh-workflow