bobmatnyc/claude-mpm/mpm-pr-workflow
Claude Code and agent skill by bobmatnyc/claude-mpm
- community
Checking that the SKILL.md file is still in the repository.
Branch protection and PR creation workflow
Install
npx vskill@latest install bobmatnyc/claude-mpm/mpm-pr-workflowSKILL.md
PR Workflow and Branch Protection
Branch Protection Enforcement
CRITICAL: PM must enforce branch protection for main branch.
Detection (run before any main branch operation)
Routing Rules
- User is
bobmatnyc@users.noreply.github.com→ Can push directly to main (if explicitly requested) - Any other user → MUST use feature branch + PR workflow
User Request Translation
When non-privileged users request main branch operations:
| User Request | PM Action | |
|---|---|---|
| "commit to main" | "Creating feature branch workflow instead" | |
| "push to main" | "Branch protection requires PR workflow" | |
| "merge to main" | "Creating PR for review" |
Error Prevention: PM proactively guides non-privileged users to correct workflow (don't wait for git errors).
Worktree-First Branch Setup
Check workflow.worktree.enabled (default: true) before starting any issue branch.
When enabled (default)
Replace the plain branch checkout with a git worktree:
The source directory (repo/) stays on main throughout; only the worktree directory advances on the feature branch.
Post-merge cleanup (after squash-merge lands on main):
- Only run after confirming the squash-merge has landed on main.
- If the worktree has untracked files git will refuse removal — inspect with
git -C .claude/worktrees/issue-N-<slug> statusfirst. - After inspecting: commit or stash any work you want to keep, then retry
git worktree remove; or use--forceonly if you are certain the files are disposable.
When disabled (opt-out)
Set workflow.worktree.enabled: false in .claude-mpm/config.yaml to fall back to the standard branch checkout approach below:
PR Workflow Delegation
Default: Main-based PRs (unless user explicitly requests stacked)
When User Requests PRs
- Single ticket → One PR (no question needed)
- Independent features → Main-based (no question needed)
- User says "stacked" or "dependent" → Stacked PRs (no question needed)
Recommend Main-Based When
- User doesn't specify preference
- Independent features or bug fixes
- Multiple agents working in parallel
- Simple enhancements
Recommend Stacked PRs When
- User explicitly requests "stacked" or "dependent" PRs
- Large feature with clear phase dependencies
- User is comfortable with rebase workflows
Always delegate to version-control agent with strategy parameters.
PR Creation Workflow
Footer Branding (required)
Always append the canonical MPM footer to PR bodies and commit messages:
Never use Claude Code's default 🤖 Generated with [Claude Code] footer. MPM only overrides the commit trailer (Co-Authored-By), so the "Generated with" footer must be set explicitly to the canonical MPM string — otherwise the Claude Code default leaks into GitHub PRs and issues. The Co-Authored-By: Claude MPM <https://github.com/bobmatnyc/claude-mpm> trailer is separate and stays as-is.
When creating PRs, delegate to version-control agent with:
Code Review (If Available)
After the PR is created and CI passes, the PM checks whether trusty-review is available before proceeding to squash-merge.
Availability Check
Call mcp__trusty-review__review_health. Treat trusty-review as available if and only if:
status == "ok"ANDreviewer_modelis set (non-empty string)
If the health call throws an exception, returns a non-ok status, or returns an empty reviewer_model, skip the review step entirely — never block or warn the user about trusty-review being unavailable.
Note: Once the upstream health endpoint exposes aninferencefield, also requireinference == "ok"as part of the availability check.
When Available
The PM calls mcp__trusty-review__review_pr(owner, repo, pr_number) directly (PM has MCP tool access). Route the verdict as follows:
| Verdict | Action | |
|---|---|---|
APPROVE or APPROVE* | Proceed to squash-merge | |
REQUEST_CHANGES | Delegate findings to Engineer for remediation; re-run CI before merge | |
BLOCK | Do not merge; escalate immediately to the user | |
UNKNOWN or tool error | Fail open — proceed to squash-merge with a note that review was inconclusive |
When Unavailable
Skip silently. Do not surface any message to the user about trusty-review being down. The PR workflow continues to squash-merge as normal.
Common Patterns
Single Feature PR
Stacked PRs (when requested)
Bug Fix PR
Branch Protection Checklist
Before any main branch operation:
- [ ] Check git user email
- [ ] Verify user has main branch access
- [ ] If not privileged user, route to feature branch workflow
- [ ] Create clear user messaging about branch protection
Integration with Git File Tracking
All file tracking should happen on feature branches before PR creation:
- Agent creates files
- PM tracks files immediately (git add + commit)
- PM delegates PR creation to version-control
- version-control pushes branch and creates PR
This ensures all work is tracked before entering PR workflow.
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/mpm-pr-workflow/SKILL.md
Popularity
- Repository stars
- 149
- Repository forks
- 33
- Repository npm downloads, 7 days
- 271
- 7-day trend score
- 43
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 31 Aug 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bobmatnyc/claude-mpm/mpm-pr-workflow)