mj-agent-flow-post-merge

Orchestrates post-merge cleanup including issue closure, changelog drafts, branch deletion, and plan state updates.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-flow-post-merge-mj-agentlab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mj-agent-flow-post-merge
Source: https://github.com/MJ-AgentLab/mj-agent/tree/main/.claude/skills/mj-agent-flow-post-merge
Command: npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-flow-post-merge-mj-agentlab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After a pull request is merged, teams often forget follow-up chores: closing linked issues, updating the changelog, creating follow-up tickets, deleting stale branches, syncing develop, and marking working plans as completed. This Skill orchestrates that entire post-merge checklist so nothing falls through the cracks. ## Core Features & Use Cases - Ten-step post-merge workflow: Verifies merge status via GitHub CLI, identifies linked issues, drafts changelog entries, detects follow-up signals in PR bodies, and triggers EVAL backlog tickets when in-source canonical skill or prompt files change. - Delegation to sub-skills: Hands off branch deletion to mj-agent-git-delete, develop sync to mj-agent-git-sync, issue creation to mj-agent-git-issue, and follow-up worktree creation to mj-agent-git-branch, enforcing a worktree-per-PR model. - Plan lifecycle management: Locates the associated working plan and outputs a frontmatter diff draft (state active to completed) for the user to apply, keeping human-in-the-loop control. - Use Case: After merging PR #42 which closed issue #38, run this Skill to get a complete checklist: issue closure confirmation, a changelog draft, a follow-up issue draft, branch cleanup commands, and a plan state update diff. ## Quick Start Tell the assistant that PR number 42 was just merged and ask it to run the post-merge cleanup checklist.

Frequently Asked Questions about mj-agent-flow-post-merge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate post-merge cleanup for a GitHub pull request?▼

Run this Skill after a PR merges. It verifies merge state with gh pr view, identifies linked issues, drafts changelog entries, detects follow-up signals, and outputs a checklist delegating branch deletion and develop sync to sub-skills.

What steps should happen after merging a pull request?▼

Typical steps include closing the linked issue, updating the changelog for user-facing changes, creating follow-up issues for deferred work, deleting the merged branch, syncing develop, and marking the associated working plan as completed.

Does this Skill edit the changelog or create issues automatically?▼

No. It only outputs drafts and suggestions. The user confirms and applies changelog edits with an editor and creates follow-up or EVAL backlog issues through the mj-agent-git-issue sub-skill, keeping the process human-in-the-loop.

When is an EVAL backlog ticket created after a merge?▼

An EVAL backlog ticket is triggered when the merged PR modifies in-source canonical files, specifically SKILL.md bodies under src/mj_agent/skills or prompts/system.md. The Skill detects this via git diff on the merge commit and drafts the ticket.

Why should follow-up branches not be created with git checkout -b?▼

The repository uses a bare repo with worktree-per-branch model. Running git checkout -b inside the develop worktree breaks that model and desynchronizes tooling. Follow-up work must go through mj-agent-git-branch, which creates a new worktree.

When should this post-merge Skill not be used?▼

Skip it for review responses on incoming comments, pre-merge readiness checks, standalone branch deletion, or hotfix-to-develop sync alone. Those scenarios are handled by dedicated skills such as mj-agent-git-sync or mj-agent-git-delete.