new-branch-and-pr — Claude Code skill: branch and PR
A skill that walks one task from a fresh branch to a pull request link: focused commit, push, summary with test notes. Useful when work has to go to review.
npx skills add cursor/plugins --skill new-branch-and-pr -a claude-codeWhat new-branch-and-pr does
The skill carries a single task from a clean branch to a pull request link. It starts by checking the working tree — uncommitted edits have to be handled before anything else happens. Then it branches off the latest main and leaves you to write the code and tests.
The sequence is fixed: a commit scoped to the task, a push, then a PR body with a short summary and notes on what was verified. You get back the branch name, that summary and the PR URL. One command installs it in Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
Scope is the real constraint. One branch, one change set; the skill is built to keep it that way, so split a large job into pieces before you start rather than after. Worth checking whether your current work has already drifted into two topics.
What it helps with
- branch off the latest
mainfor one specific task - commit and push changes before review
- write a PR body with a summary and test notes
- get the pull request URL at the end of the run
- keep a single branch limited to one change set
Example prompts for the agent
- Start from a clean branch off the latest main: make the change, run the tests and open a PR with verification notes.
- Finish this task: focused commit, push, and a pull request with a short summary.
- Check the working tree is clean, create a branch for this task and carry it through to a PR.
How to install new-branch-and-pr
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill new-branch-and-pr -a claude-code2Manually: put the files in place
~/.claude/skills/new-branch-and-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/new-branch-and-pr/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill new-branch-and-pr -a codex2Manually: put the files in place
.agents/skills/new-branch-and-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill new-branch-and-pr -a cursor2Manually: put the files in place
.cursor/skills/new-branch-and-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cursor/plugins new-branch-and-pr2Manually: put the files in place
.github/skills/new-branch-and-pr/SKILL.md1Skills CLI (Vercel)
npx skills add cursor/plugins --skill new-branch-and-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/cursor/plugins --path cursor-team-kit/skills/new-branch-and-prManually: put the files in place
.devin/skills/new-branch-and-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cursor/plugins --skill new-branch-and-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set18
The whole set →Similar
Questions about new-branch-and-pr
How do I install new-branch-and-pr in Claude Code?
Run npx skills add cursor/plugins --skill new-branch-and-pr -a claude-code. The skill file lands at ~/.claude/skills/new-branch-and-pr/SKILL.md.
What does new-branch-and-pr do?
It lays out the branch-and-PR workflow: clean tree, branch from the latest main, implementation with tests, commit, push, and a PR description. You get back the branch name, summary with test notes and the pull request URL.
What has to be in place before running it?
A clean working tree, or edits you have explicitly dealt with — the skill opens with that check. It cuts the branch from the latest main, so that branch needs to be available.