Creates PRs for managed repos, automatically determining target branches and updating internal tracking systems.
Install
mkdir -p .claude/skills/pr-egregore-labs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17329" && unzip -o skill.zip -d .claude/skills/pr-egregore-labs && rm skill.zipInstalls to .claude/skills/pr-egregore-labs
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create a pull request for current branch targeting the repo's base branch.Key capabilities
- →Determine the target repository for the pull request
- →Resolve the base branch for the pull request
- →Summarize changes between the current and base branch
- →Prompt for a title and description for the pull request
- →Create a pull request using GitHub CLI
- →Track the created pull request in a project graph
How it works
The skill identifies the target repository and base branch, summarizes changes, and then prompts the user for a title and description. It creates the PR using GitHub CLI and tracks it in an internal graph.
Inputs & outputs
When to use pr
- →Create a PR in an Egregore repo
- →Automate project branch tracking
- →Generate PR summaries
About this skill
Create a pull request for current branch targeting the repo's base branch.
When to invoke
User says: "/pr", "create a PR", "open a pull request", "push this up for review", or the current branch is ready to be reviewed against the base branch.
Not this: reviewing an existing PR → /review-pr.
Loom routing
Skip this section if your prompt contains LOOM-EXECUTOR — you are the executor; run the skill as specced below. Full protocol: .claude/context/loom.md.
- Resolve:
ROUTE=$(bash bin/loom.sh route pr), thenDECISION_ID=$(printf '%s\n' "$ROUTE" | jq -r '.decision_id // empty'). - If
mode≠delegate, or the user signalled depth ("deep", "think hard",--deep) → run this skill inline as normal. On a depth override, printbash bin/loom.sh footer pr --overrideafter the output and set"override":truein telemetry. - Otherwise delegate: spawn the Agent tool with
subagent_type: "loom-executor",model= the route'stier, prompt =LOOM-DECISION-ID: $DECISION_IDon its own first line, thenLOOM-EXECUTOR: Execute .claude/skills/pr/SKILL.md, plus the user's arguments and any context the spec needs from the session. Print the executor's final output verbatim, then print the output ofbash bin/loom.sh footer pr. - If the spawn fails or the executor's first line is
LOW_CONFIDENCE:— triage the reason: needs-user-interaction or a main-loop-only tool → take over and finish this skill inline (no escalation); genuine uncertainty or failure → reassignROUTE=$(bash bin/loom.sh escalate pr "<reason>"), refreshDECISION_IDfromROUTE, then re-spawn once on the new tier carrying the returned decision ID (sticky for this session). - Telemetry (fire-and-forget):
bash bin/telemetry.sh emit "command" '{"command":"pr","routed":true,"mode":"delegate","model":"<actual>","route_tier":"<table tier>","class":"<class>","escalated":<bool>,"override":<bool>,"source":"<source>"}' 2>/dev/null &
What to do
- Determine which repo — if the user mentions a managed repo (listed in
egregore.json→repos[]), create the PR there. Otherwise use the hub. - Resolve the target base branch:
- Egregore hub repo: call
_get_base_branch - Managed repos: call
_get_base_branch "$REPO" - Both use the validated
base_branchfromegregore.json; a valid config that omits it defaults to"develop", while resolution errors stop before Git changes.BASE_BRANCH=$(bash -c 'SCRIPT_DIR="$PWD"; CONFIG="$PWD/egregore.json"; . "$PWD/bin/lib/config.sh" && _get_base_branch "$1"' _ "${REPO:-}") || { echo "Could not resolve the configured base branch; stopping before Git changes." >&2; exit 1; }
- Egregore hub repo: call
- Summarize branch changes vs base branch
- Draft title and body per
.claude/context/pr-format.md:- Title:
type(scope): imperative summary(≤ 72 chars) — the same grammar as commit subjects (.claude/context/commit-format.md). A single-commit PR reuses its commit subject verbatim when it describes the whole PR. - Body:
## What(1–4 bullets) ·## Why(1–3 sentences) ·## Verification(how it was checked — required when the diff touches non-markdown files; be honest if unverified) ·## Risk/## Linkswhen real · attribution footer of the harness that authored the body (final non-blank line, e.g.🤖 Generated with [Claude Code](https://claude.com/claude-code)) - Show the draft to the user; apply their edits before creating
- Title:
- Create PR via GitHub CLI:
gh pr create --base "$BASE_BRANCH" --title "$TITLE" --body "$BODY"— never--fill, never an empty body (thepr-formatCI check fails bare PRs) - Track PR in graph (fire-and-forget):
WherePROJ_HASH=$(echo -n "$(pwd)" | md5 2>/dev/null || echo -n "$(pwd)" | md5sum 2>/dev/null | cut -d' ' -f1) SID=$(cat "$HOME/.egregore/session-${PROJ_HASH}.id" 2>/dev/null || echo "") GH_USER=$(jq -r '.github_username // empty' .egregore-state.json 2>/dev/null) REPO_NAME=$(jq -r '.repo_name // "egregore"' egregore.json 2>/dev/null) bash bin/graph-op.sh create-pr "$SID" "$PR_NUMBER" "$REPO_NAME" "$GH_USER" "$PR_TITLE" 2>/dev/null &$PR_NUMBERis extracted from thegh pr createoutput URL. - Return PR URL
- Do NOT auto-merge — explicit
/prmeans "please review this"
Example
> /pr
Creating pull request...
Branch: feature/2026-01-20-mcp-authentication
Base: main
Commits: 3 commits ahead of main
Changes: +78 lines, -5 lines, 3 files
Title: feat(mcp): add API key authentication
(from your last commit — edit? y/n)
> n
Description — summarize what this PR does:
> Adds API key validation to MCP server. Keys are checked against env var. Includes tests.
Creating PR via GitHub CLI...
gh pr create --base main --title "..."
✓ PR #42 created: https://github.com/{github_org}/myapp/pull/42
PR targeting main — ready for review.
Next
Share the PR link. Run /handoff if ending your session.
When not to use it
- →When an automatic merge of the pull request is desired
Limitations
- →The skill does not auto-merge pull requests.
How it compares
This skill automates the process of identifying target branches, summarizing changes, and tracking PRs, which differs from manually performing these steps.
Compared to similar skills
pr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pr (this skill) | 0 | 5mo | Review | Beginner |
| resolve-conflicts | 81 | 9mo | Review | Intermediate |
| dependency-upgrade | 26 | 6mo | Review | Intermediate |
| git-commits | 21 | 5mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by egregore-labs
View all by egregore-labs →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.