worktree-lifecycle

Manage Git worktree creation, dependency setup, baseline testing, and cleanup.

7|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/MadAppGang/magus --skill worktree-lifecycle-madappgang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-lifecycle
Source: https://github.com/MadAppGang/magus/tree/main/plugins/dev/skills/discipline/worktree-lifecycle
Command: npx skills add https://github.com/MadAppGang/magus --skill worktree-lifecycle-madappgang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the management of Git worktrees, ensuring isolated development environments for features, experiments, and parallel agent tasks, complete with robust lifecycle management from creation to cleanup.

Core Features & Use Cases

  • Isolated Workspaces: Create and manage separate Git worktrees for distinct features or experiments without interfering with the main codebase.
  • Lifecycle Management: Automates the entire process, including pre-flight checks, dependency setup, baseline testing, and safe cleanup.
  • Parallel Development: Facilitates coordination among multiple agents by assigning each to a dedicated worktree.
  • Use Case: When starting a complex new feature, use this Skill to create an isolated worktree, set up all necessary dependencies, run initial tests, and then hand off the clean environment to a developer agent.

Quick Start

Use the worktree-lifecycle skill to create a new worktree for the 'feature-x' branch in the '.worktrees' directory.

Frequently Asked Questions about worktree-lifecycle

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

FAQPage Schema
How do I manage git worktrees for isolated feature development?

Git worktrees for isolated feature development are managed by automating the complete lifecycle from pre-flight checks and creation to dependency setup and safe cleanup. This process ensures a separate working directory without interfering with the main codebase.

What is the best way to run parallel development tasks without git conflicts?

Running parallel development tasks without git conflicts is best achieved by assigning each concurrent agent to a dedicated git worktree. This isolation prevents branch interference and allows multiple features to be developed simultaneously.

How do I set up dependencies and run baseline tests in a new git worktree?

To set up dependencies and run baseline tests in a new git worktree, the lifecycle manager automates dependency installation and executes initial tests immediately after worktree creation, ensuring the isolated environment is fully configured before development begins.

Can I use git worktrees for parallel agent execution?

Yes, you can use git worktrees for parallel agent execution by creating isolated workspaces for each agent. The lifecycle manager coordinates this by assigning each concurrent task to a separate worktree to prevent conflicts.

How do I safely cleanup git worktrees after feature development?

To safely cleanup git worktrees after feature development, the lifecycle management process executes predefined safe cleanup procedures. This removes the isolated directory and associated metadata without damaging your main repository or active branches.

Why do git worktrees require pre-flight checks before creation?

Git worktrees require pre-flight checks before creation to validate the existing repository state and directory selection. This prevents conflicts and ensures the new isolated development environment is initialized correctly without overlapping existing work.