Pm Pr Workflow logo

Pm Pr Workflow

Community
bobmatnyc
pm-pr-workflow

Branch protection and PR creation workflow

Overview

Publisherbobmatnyc
Repositoryclaude-mpm
Skill namepm-pr-workflow
Stars
152
Forks
34
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by bobmatnyc on GitHub. Read the source before you install it.

Installation

Install the Pm Pr Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm.git /tmp/claude-mpm
mkdir -p .claude/skills
cp -r /tmp/claude-mpm/plugin/skills/mpm-pr-workflow .claude/skills/pm-pr-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pm Pr Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pm Pr Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pm Pr Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PR Workflow and Branch Protection

Branch Protection Enforcement

CRITICAL: PM must enforce branch protection for main branch.

Detection (run before any main branch operation)

bash
git config user.email

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 RequestPM 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:

bash
# 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):

bash
# 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> status first.
  • After inspecting: commit or stash any work you want to keep, then retry git worktree remove; or use --force only 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:

bash
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" AND
  • reviewer_model is 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 inference field, also require inference == "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:

VerdictAction
APPROVE or APPROVE*Proceed to squash-merge
REQUEST_CHANGESDelegate findings to Engineer for remediation; re-run CI before merge
BLOCKDo not merge; escalate immediately to the user
UNKNOWN or tool errorFail 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

bash
# Feature branch → PR → Main
feature/user-auth → PR #123 → main

Stacked PRs (when requested)

bash
# Stacked feature development
feature/auth-base → PR #123 → main
feature/oauth (based on auth-base) → PR #124 → feature/auth-base
feature/session (based on oauth) → PR #125 → feature/oauth

Bug Fix PR

bash
# Hotfix branch → PR → Main
fix/login-error → PR #126 → main

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:

  1. Agent creates files
  2. PM tracks files immediately (git add + commit)
  3. PM delegates PR creation to version-control
  4. version-control pushes branch and creates PR

This ensures all work is tracked before entering PR workflow.

Frequently asked questions

What does the Pm Pr Workflow AI skill do?

Branch protection and PR creation workflow

Why use Pm Pr Workflow on TypingMind?

Because you install it once and use it with any model. Pm Pr Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pm Pr Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bobmatnyc/claude-mpm/tree/main/plugin/skills/mpm-pr-workflow. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Pm Pr Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pm Pr Workflow?

As many as you like. As long as a model supports skills, you can use Pm Pr Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pm Pr Workflow AI skill free?

It is published on GitHub by bobmatnyc. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇