ai/skills/create-pr/SKILL.md
Create a GitHub pull request from the current branch. Use when user asks to create a PR, open a PR, submit a PR, push and create PR, or similar pull request workflows. Activates for phrases like "create a PR", "open a pull request", "submit PR", "push and PR", "make a PR for this", "open a draft PR".
npx skillsauth add kurko/dotfiles create-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a draft GitHub pull request from the current branch. The PR description comes from the git commit messages with no AI attribution.
Run the safety check script bundled with this skill. The script output below was generated at skill load time. Parse and follow it.
!for d in ~/.claude/skills/create-pr ~/.agents/skills/create-pr; do [ -f "$d/safety-check.sh" ] && bash "$d/safety-check.sh" 2>&1 && exit 0; done; echo "ERROR: safety-check.sh not found. Perform manual checks (see below)."
You MUST parse and follow the script output above. The output uses a structured format:
ERROR: lines mean a blocking problem. Follow the INSTRUCTION: that
follows. Do not proceed past step 1.WARNING_ lines are non-blocking but require user confirmation before
continuing. Follow the INSTRUCTION: that follows each warning.SAFETY_CHECK=PASSED means all checks passed. Continue to step 2.The output also provides BRANCH=, BASE=, REMOTE=, COMMITS_AHEAD=,
and COMMIT_LOG: values. Use these in subsequent steps.
If the script cannot be executed (permissions, sandbox restrictions), perform the checks manually:
gh is installed and authenticated (gh auth status)git branch --show-current) — must not be the
default branchgit remote get-url origin) with the userShow the user the REMOTE= value from the safety check output. Ask for
confirmation that this is the correct repository to push to. The goal is to
prevent accidentally pushing to a fork, upstream, or unrelated repo.
If the user has already confirmed this remote earlier in the same conversation, skip re-confirmation.
Build the PR title and description from the commit messages in COMMIT_LOG:.
Follow the same conventions as the git-commit skill for writing style:
imperative mood, concise summary, "why" over "what". The PR description should
read like well-written commit messages.
Remove these patterns from the PR description before creating the PR:
Co-Authored-By: (case-insensitive)Signed-off-by: (case-insensitive)Generated with or generated by (case-insensitive)The PR must read as if a human wrote it. No AI fingerprints.
Before creating the PR, do a quick sanity check on the diff and PR content. If you can spawn a subagent, delegate this review. Otherwise, do it inline.
Run git diff <base>..HEAD and review:
If anything needs attention, present the findings to the user and ask whether to proceed or fix first.
Spawn an Opus-class subagent with:
You are reviewing a pull request before it's created. This is a quick
pre-flight check, not a full code review.
PR TITLE: <title>
PR DESCRIPTION:
<description>
DIFF:
<output of git diff <base>..HEAD>
Check for:
1. Does the PR title accurately describe the change?
2. Does the description explain the "why"?
3. Are there any files that look like they shouldn't be included (env files,
credentials, large binaries, unrelated changes)?
4. Are there any obvious issues visible in the diff (debug prints left in,
commented-out code, TODO markers)?
Report in under 150 words. Format:
VERDICT: GOOD / NEEDS ATTENTION
NOTES: [brief findings, if any]
git push -u origin <branch>
Try creating a draft PR first:
gh pr create --draft --title "<title>" --body "$(cat <<'EOF'
<description>
EOF
)"
If this fails because the repository doesn't support draft PRs (error message
typically contains "Draft pull requests are not supported"), retry without
--draft:
gh pr create --title "<title>" --body "$(cat <<'EOF'
<description>
EOF
)"
If the user passed a title as $ARGUMENTS, use that as the PR title instead
of deriving it from commits.
Show the user:
gh pr create.code-review skill separately.git-commit skill first.data-ai
Merge the current worktree branch into main and sync main back. Use when the user says "merge to main", "ship it", "merge and continue", or after completing a task in a worktree and wanting to continue with the next one.
tools
Synchronize AI agent skills, commands, configs, permissions, hooks, and instructions across Claude Code, Codex CLI, and other Agent Skills-compatible tools. Use when the user asks to pull skills from Claude into Codex, sync Codex work back to Claude, migrate agent commands, reconcile frontmatter, update permissions, or keep agent setup files in parity.
testing
Write or update UI-independent use cases for QA. Use when the user says "write use cases", "add use cases", "QA use cases", "update use cases", "compose use cases", or when starting implementation of a new feature (after plan approval). Also activates for "what should we test", "regression cases", or "use cases for QA".
documentation
Skill on how to write a task. Use when user asks you to write a task (for Asana, Linear, Jira, Notion and equivalent). Also activates when user says "create task", "write task", or similar task creation workflow requests.