attach-agent-worktree

Locate an agent worktree directory and attach to its tmux session.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/stevengonsalvez/nanoclaw-standalone --skill attach-agent-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: attach-agent-worktree
Source: https://github.com/stevengonsalvez/nanoclaw-standalone/tree/main/container/skills/attach-agent-worktree
Command: npx skills add https://github.com/stevengonsalvez/nanoclaw-standalone --skill attach-agent-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Attaching to a specific agent's active worktree session can be tedious when multiple agents run in separate worktrees. This skill automates discovery and attachment to the correct tmux session, streamlining debugging and collaboration.

Core Features & Use Cases

  • Automatically locate the agent worktree directory using the agent ID pattern agent-<id>* and verify its validity.
  • Verify a corresponding tmux session exists and attach to it, allowing immediate re-entry into the agent's live session.
  • Use cases include debugging agent worktrees, resuming work after disconnection, and collaborative troubleshooting across multiple agents.

Quick Start

Attach to the agent's worktree session by running /attach-agent-worktree {agent_id}.

Frequently Asked Questions about attach-agent-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I attach to a specific agent's tmux session in a worktree?

To attach to an agent tmux session, this skill automatically locates the agent worktree directory using the agent ID and connects you to the corresponding active tmux session for immediate re-entry.

What is the best way to manage multiple agent sessions across separate worktrees?

Managing multiple agent sessions requires locating the specific agent worktree directory and attaching to its tmux session. This skill automates discovery and validation to streamline debugging and ongoing collaboration.

How do I resume work after disconnecting from an agent's live session?

To resume work after disconnection, the skill locates the valid agent worktree directory using the agent ID pattern and reattaches to the existing tmux session, allowing immediate re-entry into the live environment.

Do I need tmux installed to attach to agent worktrees?

Yes, tmux must be present in your environment. The skill requires tmux to verify that a corresponding session exists and to successfully attach to the agent worktree for resuming work.

What format is required for the agent ID when attaching to a worktree session?

The agent ID must follow the agent-<id>* pattern. The skill uses this specific formatting to validate the agent ID and search the filesystem to locate the correct worktree directory.

Why does attaching to an agent worktree fail to find the correct session?

Attaching to a worktree fails if the agent ID is improperly formatted or the worktree directory cannot be located. The skill requires filesystem search capabilities and proper agent ID validation to connect successfully.