xiaohongshu
xiaohongshu
consolidate-branches
Consolidate multiple PR branches onto a target branch using jj multi-parent rebase with intelligent AI-powered conflict resolution
Full skill instructions
Announce at start: "I'm using the consolidate-branches skill to merge your PR branches."
This skill consolidates multiple PR branches onto a target branch using jj's multi-parent rebase with intelligent conflict resolution. The primary use case is when you have multiple feature branches with expected conflicts that need to be merged together.
Key principle: Understand the intent behind each branch's changes and intelligently combine them, not just mechanically merge.
Discover all branches that might need consolidation:
jj git fetch to sync with remoteJJ_CONFIG= jj log -r "trunk()..@ | trunk() | @.."
Output: Present a clear list of discovered branches to the user.
Let the user choose what to consolidate:
Use AskUserQuestion tool with:
Validate selections:
Show confirmation summary:
Consolidating branches [branch-a, branch-b, branch-c] onto main
Ask: "Ready to proceed with consolidation?"
Before merging, understand each branch's intent:
For each selected branch:
Read commit messages:
jj log -r <branch>
Examine changes:
jj diff -r <branch>
Categorize the changes:
Document intent for later conflict resolution
Output: Create a mental model of what each branch is trying to accomplish.
Perform the multi-parent rebase:
Create new working commit on target:
jj new <target-branch>
Multi-parent rebase to combine all branches:
jj rebase -r @ -d <branch1> -d <branch2> -d <branch3> ...
Check the result:
This is the core value of the skill.
When conflicts occur:
Identify conflicting files:
For each conflicting file:
a. Show conflict context:
b. Analyze intent:
c. Propose resolution:
d. Apply resolution:
e. Document resolution:
Present resolutions to user:
Iterate if needed:
Key Guidelines:
Verify all changes from all branches are present:
Code presence check for each branch:
jj diff -r <branch>
Generate summary report:
jj diff -r <target-branch>..@
Sanity checks:
Leave the workspace ready for user review:
Summary message:
Branch consolidation complete!
Consolidated branches: [list]
Total commits: [count]
Conflicts resolved: [count]
The changes are ready for your review.
Next steps guidance:
jj diff"jj commit -m 'your message'"Don't auto-commit: User maintains full control
The consolidation is successful if:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience