Skip to content
Automation
Skill

/wt

Create a git worktree in worktree/ subdirectory with up-to-date master

From plugin
ha-mcp
4.3k8 skills
Install
$ npx -y skills add homeassistant-ai/ha-mcp --skill wt --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/wt

Context preview

The summary Claude sees to decide when to auto-load this skill.

Create a git worktree in worktree/ subdirectory with up-to-date master

SKILL.md

wt.SKILL.md
name: wt
description: Create a git worktree in worktree/ subdirectory with up-to-date master
argument-hint: "<branch-name>"
allowed-tools: Bash

Create Git Worktree

Create a new worktree in `worktree/<branch-name>` with branch `<branch-name>`.

Execution

# Return to repo root
cd "$(git rev-parse --show-toplevel)"

# Pull latest master
git checkout master
git pull origin master

# Create worktree
git worktree add worktree/"$ARGUMENTS" -b "$ARGUMENTS"

# Initialize submodules (skills-vendor)
git -C worktree/"$ARGUMENTS" submodule update --init --recursive

# Navigate to worktree
cd worktree/"$ARGUMENTS"

# Confirm location and branch
echo ""
echo "✅ Worktree created and ready:"
echo "   Location: $(pwd)"
echo "   Branch: $(git rev-parse --abbrev-ref HEAD)"
echo ""
echo "You can now work in this isolated environment."

Notes

  • Worktree inherits `.claude/skills/` workflows
  • To remove when done: `cd ../.. && git worktree remove worktree/"$ARGUMENTS"`
  • List all worktrees: `git worktree list`
Ships withha-mcp

A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Home Assistant. Using natural language, control smart home devices, query states, execute services and manage your automations.

Get the whole plugin