Slash Command260 repo starsupdated 16d ago
pr
The `/pr` command automates pull request creation by verifying local review and security checks have passed, confirming CI workflows succeeded, then using GitHub CLI to create a PR from the current branch to a specified target branch (defaulting to main) with conventional titles and templates. Use this when ready to submit code changes for team review after completing local validation steps.
Install in Claude Code
Copymkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/borghei/Claude-Skills/HEAD/.claude/commands/git/pr.md -o ~/.claude/commands/pr.mdThen start a new Claude Code session; the slash command loads automatically.
Definition
pr.md
## Variables
TARGET_BRANCH: $1 (defaults to `main`)
SOURCE_BRANCH: current branch (`git branch --show-current`)
## Workflow
1. Ensure `/review` and `/security-scan` have passed locally.
2. Confirm `ci-quality-gate` workflow succeeded for `SOURCE_BRANCH`.
3. Create the PR using GitHub CLI:
```bash
gh pr create \
--base "$TARGET_BRANCH" \
--head "$SOURCE_BRANCH" \
--title "<Conventional PR title>" \
--body-file .github/pull_request_template.md
```
If no template exists, provide a summary referencing Context, Testing, and Security results.
4. Add labels (`gh pr edit --add-label "status: in-review"`).
5. Share the PR link with reviewers and ensure at least one human approval is obtained.More from this repository
changelog-managerSubagent
>-
code-reviewerSubagent
>-
doc-generatorSubagent
>-
git-workflowSubagent
>-
qa-engineerSubagent
>-
security-auditorSubagent
>-
a11y-auditSlash Command
Run an accessibility audit on the current project for WCAG compliance.
code-to-prdSlash Command
Reverse-engineer a Product Requirements Document from existing code.