add-language-rules
Workflow command scaffold for add-language-rules in everything-claude-code.
Create a GitHub PR from current branch with unpushed commits — discovers templates, analyzes changes, pushes
> /plugin marketplace add affaan-m/ECC > /plugin install ecc@ecc
How it fires
How this command gets triggered: by you, by Claude, or both.
/prContext preview
What this command does when you run it.
Create a GitHub PR from current branch with unpushed commits — discovers templates, analyzes changes, pushes
description: "Create a GitHub PR from current branch with unpushed commits — discovers templates, analyzes changes, pushes" argument-hint: "[base-branch] (default: main)"
**Input**: `$ARGUMENTS` — optional, may contain a base branch name and/or flags (e.g., `--draft`).
**Parse `$ARGUMENTS`**:
---
Check 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: #<number>. Use `gh pr view <number> --web` to open it." |
If all checks pass, proceed.
---
Search for PR template in order:
1. `.github/PULL_REQUEST_TEMPLATE/` directory — if exists, list files and let user choose (or use `default.md`) 2. `.github/PULL_REQUEST_TEMPLATE.md` 3. `.github/pull_request_template.md` 4. `docs/pull_request_template.md`
If found, read it and use its structure for the PR body.
git log origin/<base>..HEAD --format="%h %s" --reverse
Analyze commits to determine:
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:
Reference 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
---
Your agent can write code, but ECC gives it a coordinated engineering system and toolbox: it plans before it builds, verifies changes with tests, reviews its own work from a fresh context, remembers what matters, and turns repeated wins into reusable skills
Repo: affaan-m/ECC
Workflow command scaffold for add-language-rules in everything-claude-code.
Workflow command scaffold for database-migration in everything-claude-code.
Workflow command scaffold for feature-development in everything-claude-code.
Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering.
Pull the latest ECC repo changes and reinstall the current managed targets.