Prepare Pull Request
When to use
Use this skill after making file changes that should be submitted as a pull request for review, rather than pushed directly to the default branch.
Instructions
- •
Create a branch from the current HEAD:
bashBRANCH="agent/$(date +%Y%m%d-%H%M%S)-${MISSION_SLUG}" git checkout -b "${BRANCH}" - •
Stage changes selectively — only include files that were intentionally modified by the mission. Do NOT stage unrelated files:
bashgit add <changed-files>
- •
Commit using Conventional Commits format:
code<type>(<scope>): <short summary> <body — what changed and why>
Types:
fix,feat,docs,refactor,chore,ci,test. - •
Push the branch:
bashgit push origin "${BRANCH}" - •
Open a Pull Request using
gh pr create:bashgh pr create \ --title "<type>(<scope>): <summary>" \ --body "## Summary <what this PR does> ## Changes - <file 1>: <what changed> - <file 2>: <what changed> ## Agent Mission > <original mission prompt> --- _This PR was created by an automated agent._" \ --base main
Rules
- •Never force-push.
- •Never commit secrets, tokens, or credentials.
- •Keep commits atomic — one logical change per commit.
- •If there are no changes to commit, exit gracefully with a message.