From orc
Create or update a pull request with project convention detection. Invoked from /orc:submit or directly.
How this skill is triggered — by the user, by Claude, or both
Slash command
/orc:prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
$ARGUMENTS
$ARGUMENTS
Protected branches: main, master, develop. These are the only branches treated as protected by this skill.
The orchestrator runs this directly via Bash/tool calls — no agent delegation.
Run gh pr view --json url.
Run these checks once before creating the PR.
Base branch: Determine the base branch — use main. If origin/main does not exist, use master. This base branch is used for both body content generation and PR creation.
Check these sources in priority order. Use the first match found:
Project CLAUDE.md — Read the project's CLAUDE.md. Look for a section with heading containing "PR" or "Pull Request" (e.g., "PR Title", "Pull Requests", "Pull Request Convention"). If found, follow that convention exactly. Skip remaining title checks.
PR title checker config — Check for .github/pr-title-checker-config.json. If found, read it and extract the title validation pattern (typically at CHECKS.regexp). Derive a title that satisfies this regex. For example, a regex like ^(feat|fix|chore|refactor)(\(\w+\))?: means:
\w+ — single word, no hyphens)Default — Conventional Commits format: type(scope): description
feat/, fix/, chore/, etc.). If unclear, default to feat.auth, api, editor). NOT a slug of the feature. Scope MUST be a single word (\w+). If the right scope isn't obvious from the branch name or task context, use AskUserQuestion to ask the user.Check these paths in order. Use the first match found:
.github/PULL_REQUEST_TEMPLATE.md.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE/default.mdPULL_REQUEST_TEMPLATE.md (repo root)If a template is found: Use it as a guide. Populate relevant sections with content derived from:
git log origin/<base>..HEAD --oneline)Preserve checkboxes and structural elements where they make sense. Omit sections that don't apply rather than leaving them empty or filling with "N/A".
If no template is found: Use the default format:
## Summary
<Brief description derived from commit messages and task descriptions>
## Changes
<List of key changes from: git log origin/<base>..HEAD --oneline>
## Test Plan
<Derived from task acceptance criteria if available, otherwise "Manual verification">
Create the PR using gh pr create --base <base-branch> with the title and body from Step 2. Use a HEREDOC to pass the body for correct formatting.
Report the PR URL when done.
gh CLI not authenticated — report the error and STOP. Do NOT attempt to fix authentication.git push first or use /orc:submit." and STOP. Do NOT push.gh pr create fails — report the error verbatim and STOP. Do NOT retry.| Scenario | Convention Source | PR Title | PR Body |
|---|---|---|---|
Project has .github/pr-title-checker-config.json with feat|fix|chore types | PR title checker config | feat(auth): add SSO login | Default format (no template) |
Project has .github/PULL_REQUEST_TEMPLATE.md | PR template file | Default Conventional Commits | Template populated with commit content |
Project CLAUDE.md has ## Pull Requests section | Project CLAUDE.md | Follows CLAUDE.md convention | Default format |
| No conventions found | Default | feat(api): add user search endpoint | Default Summary/Changes/Test Plan |
main, master, develop)npx claudepluginhub metalspawn/claude-ops --plugin orcGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.