pm-pr-workflow
БесплатноБез исполняемых скриптовНе проверенBranch protection and PR creation workflow
от bobmatnyc★ 160 звёзд на GitHubОб этом скилле
PR Workflow and Branch Protection
Branch Protection Enforcement
CRITICAL: PM must enforce branch protection for main branch.
Detection (run before any main branch operation)
git config user.email
Routing Rules
- User is
[email protected]→ 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:
# Create the worktree and branch in one step
git worktree add .claude/worktrees/issue-N-<slug> -b feat/N-<slug>
# All engineering work happens inside the worktree
cd .claude/worktrees/issue-N-<slug>
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):
# Remove the worktree
git worktree remove .claude/worktrees/issue-N-<slug>
git branch -d feat/N-<slug> # delete the local tracking branch
# Pull latest main in the source dir
git pull
- 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:
git checkout -b feat/N-<slug>
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:
🤖👥 Generated with [Claude MPM](https://github.com/bobmatnyc/claude-mpm)
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:
Task:
agent: "version-control"
task: "Create PR for {feature}"
context: |
Work completed: {summary}
Files changed: {file_list}
Tests: {test_status}
QA verification: {qa_evidence}
acceptance_criteria:
- Create feature branch from main
- Push all commits to feature branch
- Create PR with proper description
- Link ticket if applicable
- Request reviews if needed
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 an
inferencefield, 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 Engine |
Установить pm-pr-workflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pm-pr-workflow?
Branch protection and PR creation workflow
Как установить скилл pm-pr-workflow?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pm-pr-workflow запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic