Stats
Actions
Tags
How this skill is triggered — by the user, by Claude, or both
Slash command
/claudecode-bootstrap:attach-agent-worktreeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Changes to agent worktree directory and attaches to its tmux session.
Changes to agent worktree directory and attaches to its tmux session.
/attach-agent-worktree {timestamp}
#!/bin/bash
AGENT_ID="$1"
if [ -z "$AGENT_ID" ]; then
echo "Agent ID required"
echo "Usage: /attach-agent-worktree {timestamp}"
exit 1
fi
# Find worktree directory
WORKTREE_DIR=$(find worktrees -type d -name "agent-${AGENT_ID}*" 2>/dev/null | head -1)
if [ -z "$WORKTREE_DIR" ] || [ ! -d "$WORKTREE_DIR" ]; then
echo "Worktree not found for agent: $AGENT_ID"
exit 1
fi
SESSION="agent-${AGENT_ID}"
# Check if tmux session exists
if ! tmux has-session -t "$SESSION" 2>/dev/null; then
echo "Tmux session not found: $SESSION"
exit 1
fi
echo "Worktree: $WORKTREE_DIR"
echo "Attaching to session: $SESSION"
echo ""
# Attach to session
tmux attach -t "$SESSION"
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub stevengonsalvez/ainb-toolkit