From humanlayer
Creates git or jj worktrees for feature/bugfix development or Linear tickets, with setup, dependencies, .claude copy, and optional thoughts init in isolated $HOME/wt dirs.
npx claudepluginhub jeffh/claude-plugins --plugin humanlayerThis skill is limited to using the following tools:
This skill creates a new worktree for development work with proper setup and verification.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
This skill creates a new worktree for development work with proper setup and verification.
Activate this skill when:
Ask the user for:
For git users:
# Set up variables
WORKTREE_NAME="[name or generated]"
BASE_BRANCH="[base or current branch]"
WORKTREES_BASE="$HOME/wt/[repo-name]"
WORKTREE_PATH="${WORKTREES_BASE}/${WORKTREE_NAME}"
# Verify worktrees base directory exists
if [ ! -d "$WORKTREES_BASE" ]; then
echo "Creating worktrees directory: $WORKTREES_BASE"
mkdir -p "$WORKTREES_BASE"
fi
# Check if worktree already exists
if [ -d "$WORKTREE_PATH" ]; then
echo "Error: Worktree directory already exists: $WORKTREE_PATH"
exit 1
fi
# Create worktree (creates branch if it doesn't exist)
if git show-ref --verify --quiet "refs/heads/${WORKTREE_NAME}"; then
echo "Using existing branch: ${WORKTREE_NAME}"
git worktree add "$WORKTREE_PATH" "$WORKTREE_NAME"
else
echo "Creating new branch: ${WORKTREE_NAME}"
git worktree add -b "$WORKTREE_NAME" "$WORKTREE_PATH" "$BASE_BRANCH"
fi
# Copy .claude directory if it exists
if [ -d ".claude" ]; then
cp -r .claude "$WORKTREE_PATH/"
fi
# Change to worktree and run setup
cd "$WORKTREE_PATH"
make setup || {
echo "Setup failed. Cleaning up..."
cd - > /dev/null
git worktree remove --force "$WORKTREE_PATH"
git branch -D "$WORKTREE_NAME" 2>/dev/null || true
exit 1
}
For jj users:
# Set up variables
WORKTREE_NAME="[name or generated]"
BASE_BOOKMARK="[base bookmark]"
WORKTREES_BASE="$HOME/wt/[repo-name]"
WORKTREE_PATH="${WORKTREES_BASE}/${WORKTREE_NAME}"
# Verify worktrees base directory exists
if [ ! -d "$WORKTREES_BASE" ]; then
echo "Creating worktrees directory: $WORKTREES_BASE"
mkdir -p "$WORKTREES_BASE"
fi
# Check if worktree already exists
if [ -d "$WORKTREE_PATH" ]; then
echo "Error: Worktree directory already exists: $WORKTREE_PATH"
exit 1
fi
# Create new workspace
jj workspace add --name "$WORKTREE_NAME" "$WORKTREE_PATH"
# Set bookmark in new workspace
cd "$WORKTREE_PATH"
jj bookmark create "$WORKTREE_NAME"
# Copy .claude directory if it exists from original workspace
if [ -d "../.claude" ]; then
cp -r ../.claude .
fi
# Run setup
make setup || {
echo "Setup failed. Cleaning up..."
cd - > /dev/null
jj workspace forget "$WORKTREE_NAME"
rm -rf "$WORKTREE_PATH"
exit 1
}
If no name provided, generate one:
# Random adjectives and nouns for naming
adjectives=("swift" "bright" "clever" "smooth" "quick" "clean" "sharp" "neat" "cool" "fast")
nouns=("fix" "task" "work" "dev" "patch" "branch" "code" "build" "test" "run")
# Pick random values
adj=${adjectives[$RANDOM % ${#adjectives[@]}]}
noun=${nouns[$RANDOM % ${#nouns[@]}]}
timestamp=$(date +%H%M)
# Generate name
WORKTREE_NAME="${adj}_${noun}_${timestamp}"
After successful creation:
โ
Worktree created successfully!
๐ Path: [WORKTREE_PATH]
๐ Branch/Bookmark: [WORKTREE_NAME]
To work in this worktree:
cd [WORKTREE_PATH]
To remove this worktree later (git):
git worktree remove [WORKTREE_PATH]
git branch -D [WORKTREE_NAME]
To remove this worktree later (jj):
jj workspace forget [WORKTREE_NAME]
rm -rf [WORKTREE_PATH]
make setup to install dependencies in the new worktree$HOME/wt/[repo-name]/ by defaultENG-2166)--no-thoughts flag