worktree-workflow

Automate git worktree setup, validation, commit, push, and PR creation via MCP.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/pwretmo/deep-underworld --skill worktree-workflow-pwretmo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-workflow
Source: https://github.com/pwretmo/deep-underworld/tree/main/.github/skills/worktree-workflow
Command: npx skills add https://github.com/pwretmo/deep-underworld --skill worktree-workflow-pwretmo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the creation, usage, and cleanup of git worktrees for isolated local agent tasks, reducing setup time and preventing accidental edits to main.

Core Features & Use Cases

  • Create a dedicated worktree for a task branch from main at a specified path.
  • Validate the worktree and branch before edits, ensuring correct context.
  • Automate preflight checks, build, commit, push, and PR creation via MCP.
  • Clean up and prune stale worktrees after completion or merge.

Quick Start

Create a new worktree for a task and start working in it.

Frequently Asked Questions about worktree-workflow

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

FAQPage Schema
How do I automate git worktree setup for isolated agent tasks?

Git worktrees allow isolated local agent tasks to run on separate task branches without touching main, preventing accidental edits and reducing context setup time for parallel workflows.

How do I validate a git worktree and branch before making edits?

Validate a git worktree by checking the branch context and applying preflight checks before edits, ensuring the agent operates in the correct isolated environment.

Can I automate PR creation via MCP after committing to a git worktree?

Yes, you can automate PR creation via MCP by running preflight checks, pushing the branch, and orchestrating the pull request creation directly from the isolated worktree workflow.

What is the best way to clean up stale git worktrees after a merge?

Clean up stale git worktrees after task completion or merge by pruning the worktree directory and deleting the associated task branch to maintain a tidy repository state.

Do I need a specific repository context to use git worktree automation?

Yes, git worktree automation requires an existing repository context to execute standard git commands like worktree add, fetch, rebase, and push for orchestrating end-to-end workflows.