skills/using-git-worktrees/SKILL.md Step 1 includes a "Create the Worktree" code block that uses $LOCATION and $BRANCH_NAME shell variables without either documenting them as agent-supplied placeholders or showing assignment lines:
# Determine path based on chosen location
path="$LOCATION/$BRANCH_NAME"
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
Neither variable is assigned earlier in the SKILL.md, and there is no preceding line of the form LOCATION=... / BRANCH_NAME=.... An agent reading the workflow and executing the block verbatim ends up running git worktree add "/" -b "" (both vars empty), which fails with an empty-branch-name error.
The earlier prose (lines 60–76) does discuss how to pick a location and the implicit branch name, but the variables in the code block are presented as if already in scope.
Suggested fix
Prepend explicit assignment lines so the block is runnable:
# Use the LOCATION you chose above (e.g., ".worktrees" or a project-specific path)
LOCATION="<chosen-location>"
# Use BRANCH_NAME based on the task (e.g., "feat-add-login")
BRANCH_NAME="<chosen-branch-name>"
# Determine path based on chosen location
path="$LOCATION/$BRANCH_NAME"
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"
Or, if the intent is for the agent to fill the variables before pasting the block, document that explicitly above the code fence (e.g., "Agent fills: LOCATION = …, BRANCH_NAME = …").
skills/using-git-worktrees/SKILL.mdStep 1 includes a "Create the Worktree" code block that uses$LOCATIONand$BRANCH_NAMEshell variables without either documenting them as agent-supplied placeholders or showing assignment lines:Neither variable is assigned earlier in the SKILL.md, and there is no preceding line of the form
LOCATION=.../BRANCH_NAME=.... An agent reading the workflow and executing the block verbatim ends up runninggit worktree add "/" -b ""(both vars empty), which fails with an empty-branch-name error.The earlier prose (lines 60–76) does discuss how to pick a location and the implicit branch name, but the variables in the code block are presented as if already in scope.
Suggested fix
Prepend explicit assignment lines so the block is runnable:
Or, if the intent is for the agent to fill the variables before pasting the block, document that explicitly above the code fence (e.g., "Agent fills:
LOCATION= …,BRANCH_NAME= …").