prepare-pr
Gets the current branch ready for review. Default mode is draft-only: it prepares the description and stops — it does not push or open a PR unless the user asks. Stops on a red quality gate.
Git mechanics (commit format, no force-push, explicit-path staging, no trailers
beyond Agent: <zone>) follow the git-flow core. This
skill adds only the PR-assembly delta below.
Steps
- Sanity.
git status(clean? what's staged/untracked?) andgit log <base>..HEAD+git diff <base>..HEADto see what the PR contains. - Quality gate — delegate to
qa-check. Do not re-implement the checks here. If qa-check is red → stop, report, fix root cause first. - Secret / artifact leak guard. Warn on suspicious untracked or staged files
— never index them:
.env,*.pem,id_rsa,*.session,*credentials*,dump.sql,*.bak. Add specific files (git add <path>), nevergit add ./-A. - Draft the PR description from the commits — sections: Задача / Task, Что сделано / What changed, Что проверять / How to verify, Артефакты / Artifacts (links, migrations, config). Keep it factual.
- Stop (draft mode). Present the description + file list. Proceed to commit / push / open-PR only on explicit user request and per the mode chosen in ask-on-first-use.
Never (PR-specific)
- Commit directly to the base branch (master/main) without an explicit request.
- Push or open a PR automatically because the gate passed.
(General staging / force-push / no-verify / trailer rules → git-flow core.)
ask-on-first-use (per project)
Ask the user (don't guess) and offer to save to the project's .claude/:
- Base branch (
master/main/ other). - Mode —
draft(default),commit,push, orcreate-PR. - PR title convention + body template (any project-specific format).
- (optional) Secret deny-list additions beyond the defaults above.