Use Agency CLI to run parallel AI coding tasks in isolated Git worktrees. Invoke when user mentions "agency", "ag", parallel tasks, worktrees, or wants to run multiple coding agents simultaneously.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Agency is a command-line AI agent orchestrator that runs coding agents in isolated Git worktrees with tmux-managed sessions.
agency new <slug> # Create task, start session, attach immediately
ag new <slug> # Short alias
agency new <slug> -e # Open editor to write task description
agency new <slug> "description" # Provide description inline
agency new --draft <slug> # Create task file only, no worktree or session
agency start <slug> # Start the draft (creates worktree and session)
Note: The "<slug>" should only contain alphanumerical characters and "-". You can keep it relatively short.
agency tasks # Show all tasks with status, commits, and changes
ag tasks # Short alias
Output columns: ID, SLUG, STATUS, UNCOMMITTED, COMMITS, BASE, AGENT
agency merge <slug> # Merge task branch into base, then cleanup
This command:
agency stop <slug> # Stop session, keep worktree and branch
# Create multiple parallel tasks
agency new --draft feature-auth "Implement user authentication"
agency new --draft feature-api "Build REST API endpoints"
agency new --draft fix-tests "Fix failing unit tests"
# Start all tasks
agency start --no-attach feature-auth
agency start --no-attach feature-api
agency start --no-attach fix-tests
# Or start tasks on creation
agency new --no-attach feature-auth "Implement user authentication"
agency new --no-attach feature-api "Build REST API endpoints"
agency new --no-attach fix-tests "Fix failing unit tests"
# Check status
agency tasks
# When done, merge back
agency merge feature-auth
If you are running in a sandbox you might get errors like run/agency-tmux.sock (Operation not permitted).
IMPORTANT: Despite the error message, this is not because the daemon is not started. It is because the sandbox cannot access the file. Always run the following commands outside the sandbox:
Run agency --help for the full command reference.