pr-commiter
PR Committer
Use bundled script scripts/pr-commiter for a deterministic commit that enforces branches and PR creation.
Flow
- Preflight
git status --porcelain=v1 -bgit branch --show-current- If merge/rebase/cherry-pick in progress, stop.
- If on protected branch, the script will create a new branch automatically.
- Pick files
- Use explicit paths only. Never use
.. - If unsure, list candidates from
git statusand ask for selection.
- Run commit script
./scripts/pr-commiter commit -m "type(scope): summary" -- path/to/file1 path/to/file2- If you need a dry run:
./scripts/pr-commiter plan -m "type(scope): summary" -- path/to/file1 - If PR should be skipped: add
--no-pr - If PR creation needs push: add
--push(explicit consent)
Flags
--reset-stagedclear existing staged changes before staging listed paths--no-prskip PR creation--pushpush branch before creating PR--force-lockremove stale.git/index.lockand retry--jsonmachine-readable output--dry-runvalidate + plan only
Behavior
- Stages only provided paths.
- Refuses merge/rebase/cherry-pick in progress.
- Creates a new branch if current is protected or detached.
- Refuses if staged changes exist unless
--reset-staged. - Fails if nothing staged for provided paths.
- Creates PR via
ghunless--no-pr. Requires--pushif no upstream. - Uses
.committerrcfor policy.
Errors
- Quote exact error text back to user.
- Ask for next action if blocked.
Optional verification
git show --stat --oneline HEADgit status --porcelain=v1 -bgh pr view --json url --jq '.url'
More from regenrek/agent-skills
hard-cut
Enforce a hard-cut cleanup policy: keep one canonical implementation and delete compatibility, migration, fallback, adapter, coercion, and dual-shape code. Use for pre-release or internal-draft refactors where the goal is one final shape, especially when changing schemas, contracts, persisted state, routing, configuration, feature flags, enum/value sets, or architecture.
14root-cause-finder
Performs root-cause-first debugging and review by tracing expected behavior to the first unintended side effect before changing contracts, parsing, or types. Use when debugging protocol errors, deserialization failures, null payloads, missing fields, restore or hydration issues, state-ownership bugs, unexpected requests, background mutations, or reviewing junior-created code where the visible failure may be downstream noise.
7consolidate-test-suites
Decide exactly where bug-fix test coverage belongs. Use before adding, moving, or deleting tests after a bug fix or architectural change. Select one owning layer, reuse existing canonical suites, block redundant or weakly placed tests, and remove weaker duplicates.
7git-safe-workflow
Safely inspect, stage, commit, and (only if asked) push changes made by an AI agent. Use for commit/push requests, end-of-task checkpoints, merge conflict resolution, worktree safety checks, or deciding whether to use git commit --amend.
4shellck
Run shellcheck on shell scripts after editing scripts or when debugging shell errors. Use for linting scripts in a repo (especially scripts/), catching issues like set -u with unset vars, bad subshell usage, or quoting mistakes.
3codex-analysis
Run Codex CLI for deep code analysis and second-opinion reviews. Use when the user explicitly asks for Codex analysis, Codex help, or wants a second opinion from Codex on code, architecture, or debugging questions.
3