Automated summary
This skill pushes staged changes and opens a draft pull request on GitHub using the gh CLI.
Strengths
- Covers the full flow: verification, conventional commit, push, and PR creation
- Explains using a body file to avoid newline escaping problems
- Provides a recovery procedure for PRs contaminated by unintended staged files
- Includes troubleshooting for common push and authentication errors
Limitations
- Assumes gh and git are installed and authenticated, without installing them
- Doesn't cover review, merging, or conflict resolution beyond a brief rebase mention
- Has two steps numbered 4, which can be slightly confusing
Use it when you have staged changes and want to quickly open a draft PR for early feedback.
Avoid it if you need a PR immediately ready for review or if the repository is not hosted on GitHub.
Security analysis
CautionThe skill is a straightforward git/GitHub CLI workflow helper. It invokes powerful but legitimate tooling (git push, gh pr create, rebase) with no obfuscation, no curl|sh piping, no secret exfiltration, and no destructive filesystem commands. It even cautions against blind force-push. Risk is limited to normal consequences of pushing/staging changes, mainly the `git add .` habit, so it warrants caution rather than safe.
- •Uses git/gh commands with push and PR creation privileges (`git push`, `gh pr create`)
- •Instructs `git add .` which can stage unintended or sensitive files
- •Tips section suggests rebase and branch manipulation, which rewrites history if misused
- •No declared allowed-tools, so execution scope is unbounded
Examples
My changes are staged, create a conventional commit, push the branch, and open a draft PR on GitHub.Push my work-in-progress and open a draft PR so my team can give early feedback.My draft PR includes unrelated staging changes — help me create a clean branch with only the intended files and open a replacement draft PR.name: pr description: Push committed changes and create a draft PR on GitHub. Use when you have staged changes ready to push and want to open a draft PR for early feedback or documentation.
PR
Quickly push changes and open a draft pull request on GitHub.
When to Use
- You have staged changes ready to push and want to create a draft PR
- Early feedback needed on work-in-progress
- Want to document and track changes before final review
- Need to open a PR for discussion or CI validation
Instructions
Step 1: Verify Staged Changes
Check what will be committed:
git status
Ensure all changes you want are staged with:
git add <files>
Or add everything:
git add .
Step 2: Create Commit Message
Write a clear, conventional commit message. Use the format:
<type>(<scope>): <description>
<optional body with details>
Types: feat, fix, chore, refactor, docs, test, etc.
Examples:
feat(registry): add new skill categoryfix(cli): resolve version mismatchchore: regenerate artifacts
Step 3: Commit Changes
git commit -m "your commit message here"
Step 4: Push to Remote
git push -u origin <branch-name>
If you're on main or pushing to an existing branch:
git push
Step 4: Create Draft PR
gh pr create --draft
This will prompt you for:
- Title — auto-filled from commit, edit as needed
- Body — add context, description, or leave blank
- Assignees — optional
- Labels — optional
For multiline descriptions, use a body file with real newlines. Do not pass literal \\n sequences or rely on shell $'...' quoting; malformed quoting can make GitHub display \\n (and sometimes a stray $).
cat > /tmp/pr-body.md <<'EOF'
## Summary
Describe the change here.
EOF
gh pr create --draft --title "Your PR Title" --body-file /tmp/pr-body.md
After creating or editing the PR, verify the stored body:
gh pr view <number> --json body --jq .body
Or specify details inline for a one-line body:
gh pr create --draft --title "Your PR Title" --body "Description here"
Tips
- Accidental staging leakage: if a PR contains unrelated staging changes, do not force-push blindly. Start a clean branch from current
origin/main, apply only the intended files, verifygit diff --stat origin/main...HEAD, then push and create a replacement draft PR. Close the contaminated PR and cross-reference the replacement in a comment. - Draft PRs show as "Draft" and won't trigger auto-merge workflows
- Rebase before final PR —
git rebase -i origin/mainto clean up commits - Ready to review? — Use
gh pr readyto convert from draft to ready-for-review - Add more commits — Just push again with
git push, the PR updates automatically
Troubleshooting
"fatal: The current branch has no upstream branch"
- Use
git push -u origin <branch-name>on first push
"Permission denied" when pushing
- Check your git credentials:
gh auth status - Re-authenticate if needed:
gh auth login
PR creation fails
- Ensure you're in a git repository:
git rev-parse --show-toplevel - Check GitHub CLI is installed:
gh version
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/push-changes-and-create-draft-pr-mrx3xw7b/download' --output '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md.part' && mv '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md.part' '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && test -s '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b' '.claude/skills/pr'Cursor
test -f '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && test -s '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/pr' && cp -R '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b' '.cursor/skills/pr'Codex
test -f '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && test -s '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/pr' && cp -R '.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b' '.agents/skills/pr'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b'openskills read 'push-changes-and-create-draft-pr-mrx3xw7b'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/push-changes-and-create-draft-pr-mrx3xw7b/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.