commit-pr-flow
Finalizes implementation work with scoped commits and automated PR preparation.
Install
mkdir -p .claude/skills/commit-pr-flow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12810" && unzip -o skill.zip -d .claude/skills/commit-pr-flow && rm skill.zipInstalls to .claude/skills/commit-pr-flow
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run a Phase C commit and PR flow from bounded plan items with strict scope control, validation gating, and review-ready output. Use when implementation is done and you need to stage intended files only, verify plan-to-diff alignment, create logical commits, and prepare or open a PR.Key capabilities
- →Confirm phase boundary for commit flow
- →Confirm scope boundary for changes
- →Run commit gate to check staged diff
- →Run validation gate with required checks
- →Create logical commits with clear messages
- →Prepare a pull request using a template
How it works
This skill enforces a Phase C commit and PR flow by confirming phase and scope boundaries, running commit and validation gates, creating logical commits, and preparing a pull request.
Inputs & outputs
When to use commit-pr-flow
- →Commit completed work
- →Create PR
- →Validate plan alignment
About this skill
Commit Pr Flow
Overview
Use this skill after bounded implementation work is complete and ready to be finalized in Phase C. Convert a scoped diff into reviewable commits and a PR without expanding scope. Return publish-ready evidence and status, not broad workflow re-planning.
Inputs
- Task label or plan item label
- In-scope files or subtree
- Explicit non-goals and forbidden scope
- Required validation level from
QUALITY.md - Current git state (
status, changed files, diff summary) - Base branch (default:
v1) - CI/repo validation surface when relevant (
package.jsonscripts, workspacetsconfig,.github/workflows/*) - If this flow opens a PR, post-publish read-back of
author.login/author.is_bot - Audit/review findings that must be disposed before PR, if any
Workflow
- Confirm phase boundary:
- Run only in Phase C.
- Stop and escalate if requirement shaping or execution planning is still unresolved.
- Confirm scope boundary:
- Compare changed files to declared in-scope files.
- If unrelated local changes exist, isolate the scoped work in a clean worktree or equivalent before staging.
- Isolate or defer unrelated changes.
- Keep
1 plan item = 1 logical commitwhen practical. - If clean worktree isolation is used, record the source worktree path and plan how it will be reconciled before returning
complete.
- Run commit gate:
- Check staged diff matches the selected plan item.
- Keep generated file changes separated from handwritten logic when possible.
- Do not stage files outside declared ownership.
- Run validation gate:
- Select minimum required checks from
references/phase-c-gate-checklist.md. - Compare local candidate checks with repo CI validation surface.
- If local workspace checks are narrower than CI for touched files, promote the command set to CI-equivalent or broader.
- When new or changed test files are outside the standard test/typecheck surface, add an explicit compensating command or stop as
blocked. - Execute required checks before commit.
- Record pass/fail/skip with concrete reason.
- Create commit:
- Stage only intended files.
- Use a clear message with scope context.
- Do not amend unrelated commits.
- Do not hide failed checks.
- Prepare PR:
- Use
references/pr-template-phase-c.md. - Include objective, changes, non-changes, impact, validation evidence, and regression checks.
- Add rollback and compatibility notes for high-risk changes.
- Read back author identity when a PR is opened:
- Read back
author.loginandauthor.is_botafter PR publication. - Record lane evidence as
bot-created PRortask-owned / user-authored PR. - Do not assume the intended publish path or task ownership determines the lane.
- If author identity cannot be read back, stop as
blockedbefore handing off to merge / close flows.
- Run source worktree reconciliation gate:
- If a clean worktree or equivalent isolation was used, inspect the original source worktree before returning.
- If remaining dirty/untracked paths are limited to in-scope files that now match the committed branch or upstream, restore/clean them or place them in a labeled targeted stash.
- Do not leave the default/base branch source worktree dirty with upstream-equivalent in-scope residue unless the user explicitly asked to preserve it.
- Record the reconciliation action and final source worktree status.
- Final consistency gate:
- Ensure diff remains within declared scope.
- Ensure required validation evidence is present.
- If audit/review findings exist, include a disposition ledger for each
Blocker,Must fix, and relevantShould fix. - Do not continue to PR handoff while unresolved
BlockerorMust fixfindings remain without explicit rescope/defer evidence. - Ensure completion status is explicit (
completeorblocked).
Do not:
- replace agent/user judgment about scope changes, merge authority, or unresolved product decisions
- claim readiness from command execution alone when scope or evidence gates are still ambiguous
Output Contract
Always return:
- Scope check result
- Validation result summary
- Validation surface parity note
- Findings disposition ledger when audit/review findings exist
- Source worktree reconciliation summary
- Commit units created (hash + message)
- PR title and body (or PR URL if created)
- PR author/lane evidence when a PR was created
- Open risks, if any
- Final status:
completeorblocked
User-facing summaries should be written in Japanese unless the user explicitly requests another language. Keep fixed protocol labels, command names, and code identifiers unchanged.
Escalation Conditions
- Out-of-scope files are required to finish current task.
- Required validation fails.
- Contract-sensitive impact is discovered unexpectedly.
- Plan item is too broad to commit safely as one logical unit.
Prohibited Behavior
- Do not stage all changes blindly.
- Do not open a PR with unresolved required checks unless explicitly approved.
- Do not mix unrelated cleanup with scoped implementation.
- Do not claim completion while
Blockeror unresolvedMust fixfindings remain. - Do not omit disposition evidence for audit/review findings that affected the commit or PR decision.
- Do not assume workspace
typecheckcovers touched test files. - Do not assume a newly added test file is already part of the standard test script without checking.
- Do not assume a published PR is
bot-created PRwithout read-back ofauthor.login/author.is_bot. - Do not finish with a dirty default/base branch source worktree when the remaining in-scope residue is already upstream-equivalent.
- Do not let commit mechanics hide missing success criteria, missing validation evidence, or out-of-scope drift.
References
references/phase-c-gate-checklist.mdreferences/pr-template-phase-c.md
When not to use it
- →When requirement shaping is unresolved
- →When execution planning is unresolved
- →When staging all changes blindly
Limitations
- →Run only in Phase C
- →Does not replace agent/user judgment about scope changes
- →Does not claim readiness from command execution alone when scope or evidence gates are still ambiguous
How it compares
This workflow provides a strict, gated process for committing and creating pull requests, ensuring alignment with plan items and preventing scope creep, which is more controlled than a typical git workflow.
Compared to similar skills
commit-pr-flow side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| commit-pr-flow (this skill) | 0 | 3mo | No flags | Advanced |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.