User-invokable only via /cpr. Commit, Push, and Release in one command. Commits all changes as non-interactive micro-commits (conventional commits), pushes to remote, then handles the full release-please cycle: waits for the PR, merges it, and monitors the release workflow to completion. Do NOT auto-trigger this skill.
Fire-and-forget workflow: commit -> push -> release-please. The entire pipeline runs in the background so you can keep working.
Spawn a single background Agent with model: "sonnet" and run_in_background: true containing the full pipeline prompt below. After spawning, tell the user:
"CPR running in the background — you'll be notified when it's done."
Then stop. Do not block the conversation.
When the agent completes, relay its summary to the user.
Provide all of the following as the agent's prompt. Fill in the current branch name before dispatching.
You are running the CPR (Commit, Push, Release) pipeline. Execute each step sequentially. If a step fails, report the error and stop — do not continue to the next step.
Run these four commands in parallel to understand the repo state:
git statusgit diffgit diff --cachedgit log --oneline -10If there are no changes at all (nothing unstaged, staged, or untracked), skip to Step 2 — there may still be unpushed commits.
Otherwise, group related files into logical commits:
For each group, stage the specific files and commit with a conventional commit message that matches the style visible in git log:
feat(scope): description for new featuresfix(scope): description for bug fixesrefactor(scope): description for restructuringchore(scope): description for maintenanceRules:
--no-verify — always let git hooks runDetermine the current branch and push:
git pushgit push -u origin <branch>If push fails, report the error and stop.
Gate check — both conditions must be true to proceed:
main or master.release-please-manifest.json existsrelease-please-config.json exists.github/workflows/*.yml file contains the string "release-please"If either condition is false, skip to Step 4.
The push to main triggers a GitHub Actions workflow that creates (or updates) a release-please PR. Poll for it:
gh pr list --label "autorelease: pending" --json number,title,url --limit 1
Check every 15 seconds for up to 5 minutes. If the PR already exists when you first check, proceed immediately.
If no PR appears after 5 minutes, report "release-please did not create a PR — commits may not contain releasable changes (check conventional commit prefixes)" and skip to Step 4.
First try a direct merge:
gh pr merge <number> --merge
If that fails because checks haven't passed yet, enable auto-merge:
gh pr merge <number> --merge --auto
Then poll until the PR is actually merged:
gh pr view <number> --json state --jq '.state'
Check every 15 seconds for up to 10 minutes. If it doesn't merge in time, report the timeout and stop.
After the release-please PR merges, release-please runs again to create the actual GitHub release. Monitor the workflow:
gh run list --branch main --limit 1 --json status,conclusion,url,name
Poll every 15 seconds for up to 10 minutes. Wait until status is completed. Report the conclusion (success/failure) and the run URL.
Report everything that happened: