Skip to content
Back to skills

Pr

ASecurity

Create a Pull Request with plan context and base branch detection.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agentsgogit

Works with

  • claude code

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add bravros/bravros --skill pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bravros-bravros/badge)](https://www.skillsdirectory.com/skills/bravros-bravros)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pr
category: sdlc
core: true
description: Create a Pull Request with plan context and base branch detection.
---

# pr

INTENT: ship everything (`/commit-push`), open the PR against the right base, hand off to review.

> [!IMPORTANT]
> Read [briefing.md](references/briefing.md) on demand for detailed context and instructions.

HARD CONSTRAINTS:
- In a PR-gated repo, feature PRs NEVER target `main` (`feature/* → homolog → main`); only `homolog → main`. In a direct-main repo (`bravros config get police.direct_main` prints `true`) `main` is the expected base.
- Title: `<emoji> <type>: <description>`, **under 70 characters**.
- NEVER add AI signatures to title or body — no `Generated with Claude Code` line, no `Co-Authored-By`, no 🤖 footer. Don't write one; there is nothing to strip (no `sed -i`/`perl` cleanup of the body file — the police hook blocks the rewrite dance and the attribution is disabled in settings). On a public repo this would be a leak, not a style nit.
- **NEVER write a bare `#N` in the body except for an issue/PR you mean to link.** GitHub
  autolinks it and stamps a cross-reference onto that issue's timeline; a "finding #3" reference
  silently spams an unrelated old issue. Write `finding 3` or backtick it.
- Never open a PR with uncommitted changes (`/commit-push` first).
- **Creating the PR is not the end of the task — the review trigger is.** `/pr` is one unit of
  work that finishes at HANDOFF below. The user says `/pr`, never `/pr` *and* `/pr-review`.
  Stopping after `gh pr create` leaves the job half done, so do not report success until the
  handoff has run. If something interrupts the turn between create and handoff — a question, a
  tool failure, a new instruction — resume the handoff before answering anything else.

BASE BRANCH:
`BASE=$(bravros config get staging_branch)`; if `bravros config get police.direct_main` prints `true`, `BASE=main`; if the current branch is the staging branch, `BASE=main`.
If behind `origin/$BASE`: rebase and `git push --force-with-lease` — this **rewrites the remote branch**. Never rebase or force-push when the current branch is `main`, `master`, the staging branch, or listed in `permanent_branches`; open the PR as-is instead.

CREATE — two steps, two tool calls, in this order:
1. **Write the body with the Write tool** to an absolute path — the scratchpad (`<scratchpad>/pr-body-<branch>.md`) by default; `<repo>/.planning/pr-body-<branch>.md` only when no scratchpad exists, deleted after the PR opens (`/recon` commits `.planning/` wholesale) — with Summary, Changes, Technical Notes, Test Plan, References. The path must be a **literal absolute path** — never `$S/…`, `$TMPDIR/…`, `~`, or a relative `./.pr-body.md`, and never produced by `cp`/`mv` from elsewhere (the hook reads raw command text: an unexpanded variable or a not-yet-existing file is blocked as "unreadable body").
2. `gh pr create --base "$BASE" --title "<emoji> <type>: <title>" --body-file <the same literal abs path>` as its own command (no `S=… &&` prefix, no variables). **Never** a heredoc, `cat > f && gh pr create`, or `cp … && gh pr create --body-file` in the same command: the police hook validates the body file **before** the command runs and blocks an unreadable one (3 blocks in a row on paylog, 2026-09-11 06:53).

HANDOFF (mandatory final step — the routing IS the contract):
- **Autonomous**: Output `STATUS: pr-created. PR: #<n>. NEXT: review`. The pipeline owns the
  trigger from there.
- **Interactive**: Invoke `Skill({skill: "pr-review"})` immediately. **No asking, no detection,
  no "want me to?"** — a just-created PR cannot already have a review, so there is nothing to
  decide. (Re-reviewing an existing PR later is `/pr-review` on its own, never `/pr`.)

Files in this skill

  • SKILL.md2 KB
  • references/briefing.md2.1 KB
  • skill.yaml2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.