/ecc:pr [base-branch] (default: main)from ecc
Creates a GitHub pull request from the current branch, discovering PR templates, analyzing commits, pushing changes, and opening the PR. Accepts an optional base branch name and --draft flag.
Ships in ecc. Installing the plugin adds it to Claude Code.
Input: $ARGUMENTS — optional, may contain a base branch name and/or flags (e.g., --draft).
Parse $ARGUMENTS:
--draft)main if none specifiedCheck preconditions:
git branch --show-current
git status --short
git log origin/<base>..HEAD --oneline
| Check | Condition | Action if Failed |
|---|---|---|
| Not on base branch | Current branch ≠ base | Stop: "Switch to a feature branch first." |
| Clean working directory | No uncommitted changes | Warn: "You have uncommitted changes. Commit or stash first." |
| Has commits ahead | git log origin/<base>..HEAD not empty | Stop: "No commits ahead of <base>. Nothing to PR." |
| No existing PR | gh pr list --head <branch> --json number is empty | Stop: "PR already exists: #. Use gh pr view <number> --web to open it." |
If all checks pass, proceed.
Search for PR template in order:
.github/PULL_REQUEST_TEMPLATE/ directory — if exists, list files and let user choose (or use default.md).github/PULL_REQUEST_TEMPLATE.md.github/pull_request_template.mddocs/pull_request_template.mdIf found, read it and use its structure for the PR body.
git log origin/<base>..HEAD --format="%h %s" --reverse
Analyze commits to determine:
feat: ..., fix: ..., etc.
git diff origin/<base>..HEAD --stat
git diff origin/<base>..HEAD --name-only
Categorize changed files: source, tests, docs, config, migrations.
Check for related artifacts produced by /plan-prd, /plan, or the legacy PRP workflow:
.claude/prds/ — PRDs this PR implements a milestone of.claude/plans/ — Plans executed by this PR.claude/PRPs/prds/ — legacy PRP PRDs.claude/PRPs/plans/ — legacy PRP implementation plans.claude/PRPs/reports/ — legacy PRP implementation reportsReference these in the PR body if they exist.
git push -u origin HEAD
If push fails due to divergence:
git fetch origin
git rebase origin/<base>
git push -u origin HEAD
If rebase conflicts occur, stop and inform the user.
If a PR template was found in Phase 2, fill in each section using the commit and file analysis. Preserve all template sections — leave sections as "N/A" if not applicable rather than removing them.
Use this default format:
## Summary
<1-2 sentence description of what this PR does and why>
## Changes
<bulleted list of changes grouped by area>
## Files Changed
<table or list of changed files with change type: Added/Modified/Deleted>
## Testing
<description of how changes were tested, or "Needs testing">
## Related Issues
<linked issues with Closes/Fixes/Relates to #N, or "None">
gh pr create \
--title "<PR title>" \
--base <base-branch> \
--body "<PR body>"
# Add --draft if the --draft flag was parsed from $ARGUMENTS
gh pr view --json number,url,title,state,baseRefName,headRefName,additions,deletions,changedFiles
gh pr checks --json name,status,conclusion 2>/dev/null || true
Report to user:
PR #<number>: <title>
URL: <url>
Branch: <head> → <base>
Changes: +<additions> -<deletions> across <changedFiles> files
CI Checks: <status summary or "pending" or "none configured">
Artifacts referenced:
- <any PRDs/plans linked in PR body>
Next steps:
- gh pr view <number> --web → open in browser
- /code-review <number> → review the PR
- gh pr merge <number> → merge when ready
gh CLI: Stop with: "GitHub CLI (gh) is required. Install: https://cli.github.com/"gh auth login first."git push --force-with-lease (never --force)..github/PULL_REQUEST_TEMPLATE/ has multiple files, list them and ask user to choose.What the command file sets; muted values are Claude Code's defaults
github, pull-request, git-workflow, pr-template, commit-analysis, git-push
7-day visitors to each command page
npx claudepluginhub dhundhwana-arch/my-ecc --plugin ecc98 commands in this plugin
/asideAside CommandAnswer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering./astra-reviewAstra ReviewSend Claude-written code to GPT-6-Astra (ChatGPT, via Codex CLI) for an independent cross-provider review, then fix what it finds./auto-updateAuto UpdatePull the latest ECC repo changes and reinstall the current managed targets./build-fixBuild and FixDetect the project build system and incrementally fix build/type errors with minimal safe changes./checkpointCheckpoint CommandCreate, verify, or list workflow checkpoints after running verification checks./code-reviewCode ReviewCode review — local uncommitted changes or GitHub PR (pass PR number/URL for PR mode). Use for a step-by-step PRP-style checklist review; for a multi-agent pass use /review-pr, and for the adversarially-verified Workflow pass use /orch-review.44 plugins ship this exact command · first indexed May 12, 2026
Showing 6 of 44 plugins, one per repository first
Other plugins' commands for the same job