Skip to content
Back to skills

Pr

ASecurity

Create a pull request for current branch targeting the repo's base branch.

  • 280 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 27, 2026
data-aigobashgitapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add egregore-labs/egregore --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/egregore-labs-pr/badge)](https://www.skillsdirectory.com/skills/egregore-labs-pr)

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
Create a pull request for current branch targeting the repo's base branch.

## What to do

1. Determine which repo — if the user mentions a managed repo (listed in `egregore.json` → `repos[]`), create the PR there. Otherwise use the hub.
2. Resolve the target base branch:
   - **Egregore hub repo**: always `develop`
   - **Managed repos**: read `base_branch` from `egregore.json` repos[] config (default `"develop"`)
     ```bash
     BASE_BRANCH=$(jq -r --arg name "$REPO" '(.repos[]? // empty) | select((if type == "object" then .name else . end) == $name) | if type == "object" then .base_branch // "develop" else "develop" end' egregore.json)
     ```
3. Summarize branch changes vs base branch
4. Prompt for title and description
5. Create PR via GitHub CLI: `gh pr create --base "$BASE_BRANCH"`
6. Track PR in graph (fire-and-forget):
   ```bash
   PROJ_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 &
   ```
   Where `$PR_NUMBER` is extracted from the `gh pr create` output URL.
7. Return PR URL
8. Do NOT auto-merge — explicit `/pr` means "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: Add MCP authentication with API key validation
       (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.

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.

Comments

Loading comments…