mkwt
Create a new git worktree and branch.
Usage
/mkwt <name> — Create a worktree with a new branch <name> from the repo's default branch (e.g. main, dev).
The <name> argument is required. If not provided, ask the user for a name.
Workflow
-
Validate the name argument is provided.
-
Detect the worktree base directory by inspecting existing worktrees:
git worktree list- Look at paths of worktrees OTHER than the main worktree (the first entry, which is the repo itself).
- If secondary worktrees exist, derive the base directory from their common parent. For example, if existing worktrees are at
/Users/foo/worktrees/meadow/branch_aand/Users/foo/worktrees/meadow/branch_b, the base is/Users/foo/worktrees/meadow/. - If NO secondary worktrees exist (only the main repo), ask the user where to create the worktree.
-
Check the branch doesn't already exist:
result=$(git branch --list <name>); if [ -n "$result" ]; then echo "EXISTS"; else echo "FREE"; fiImportant:
git branch --listalways exits 0, even with no matches. You must check the output (non-empty = exists), not the exit code. If it exists, tell the user and stop. -
Check the worktree path doesn't already exist:
ls <BASE_DIR>/<name>If it exists, tell the user and stop.
-
Confirm with the user before creating:
Create worktree
<name>at<BASE_DIR>/<name>(new branch from<DEFAULT_BRANCH>)? -
Create the worktree:
git worktree add <BASE_DIR>/<name> -b <name>Important: This command writes outside the project directory, so it requires
dangerouslyDisableSandbox: true. If it fails due to sandbox restrictions, the branch may still be created (partial failure). Delete the branch withgit branch -d <name>before retrying. -
Print the result:
Created worktree
<name>at<BASE_DIR>/<name>.
More from verneagent/tiny-skills
inscribe
Capture rules, conventions, or code style guidelines into documentation files. Use when the user says "inscribe", "learn", "remember this rule", "add convention", or wants to persist coding guidelines.
4lark-share
Share a knowledge insight or message with a team via Lark group chat webhook. Use when the user says "share", "lark-share", or wants to send a formatted message to a Lark group.
4multi-gh
Fix and standardize GitHub multi-account workflows with gh account switching, SSH host aliases, and safe remote setup. Use when creating repos, pushing code, or diagnosing GitHub auth mismatches across multiple identities.
2retro
Retrospective on mistakes or new conventions — analyze patterns, find root causes, and propose deterministic prevention (static checks > lint > tests > runtime > review > docs). Use when the user says "retro", "反省", "复盘", "怎么防", "how to prevent", or wants to enforce a new convention.
2wksp
Open a new iTerm2 tab with Claude in a worktree or folder, optionally entering handoff mode.
1netmap
Show all network interfaces, LAN neighbors, and Tailscale peers on the current machine. Use when the user asks about network status, neighbors, connected devices, or Tailscale peers.
1