worktree-resolve

Merge active swarm worktrees into the main branch after testing.

15|4|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/jmylchreest/aide --skill worktree-resolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-resolve
Source: https://github.com/jmylchreest/aide/tree/main/skills/worktree-resolve
Command: npx skills add https://github.com/jmylchreest/aide --skill worktree-resolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merge multiple swarm worktrees back into the main branch after testing to restore a clean, centralized repository state and prevent drift between branches.

Core Features & Use Cases

  • List and inspect active worktrees with git worktree list and metadata from .aide/state/worktrees.json.
  • Validate readiness (status: agent-complete) and perform dry-run merge checks before merging.
  • Resolve conflicts intelligently by combining changes and removing obsolete worktrees.
  • Cleanup: remove merged worktrees and prune state files to restore a single main workspace.

Quick Start

Run the worktree resolution workflow to merge all agent worktrees back into the main branch after swarm completion.

Frequently Asked Questions about worktree-resolve

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

FAQPage Schema
How do I merge git worktrees back into the main branch after a swarm run?

To merge git worktrees back into the main branch, the workflow lists active worktrees, validates their completion status, runs tests, performs safe merges, resolves conflicts intelligently, and prunes obsolete worktrees to restore a clean repository state.

What is the best way to resolve conflicts when consolidating multiple feature worktrees?

The best way to resolve conflicts when consolidating multiple feature worktrees is to perform dry-run merge checks first, then intelligently combine overlapping changes from each agent's worktree before removing the merged branches.

How do I clean up and prune git worktrees after merging feature branches?

To clean up and prune git worktrees after merging, the workflow removes merged worktrees from the file system and deletes their corresponding metadata entries from state files to prevent branch drift and restore a centralized workspace.

Can I verify worktree readiness before merging swarm agent branches?

Yes, you can verify worktree readiness before merging by checking the agent completion status in metadata files and performing dry-run merge checks against the main branch to ensure no conflicts will block the process.

Why do I need to merge worktrees back into main after multi-agent testing?

You need to merge worktrees back into main after multi-agent testing to restore a clean, centralized repository state and prevent drift between isolated feature branches created during the swarm run.