agent-deck
Terminal session manager for AI coding agents. Use when user mentions "agent-deck", "session", "sub-agent", "MCP attach", "git worktree", or needs to (1) create/start/stop/restart/fork sessions, (2) attach/detach MCPs, (3) manage groups/profiles, (4) get session output, (5) configure agent-deck, (6) troubleshoot issues, (7) launch sub-agents, or (8) create/manage worktree sessions. Covers CLI commands, TUI shortcuts, config.toml options, and automation.
What this skill does
# Agent Deck Terminal session manager for AI coding agents. Built with Go + Bubble Tea. **Repo:** [github.com/asheshgoplani/agent-deck](https://github.com/asheshgoplani/agent-deck) | **Discord:** [discord.gg/e4xSs6NBN8](https://discord.gg/e4xSs6NBN8) > Run `agent-deck --version` for your installed version. This skill targets v1.9+ but most patterns work back to v1.7. ## Script Path Resolution (IMPORTANT) This skill includes helper scripts in its `scripts/` subdirectory. When Claude Code loads this skill, it shows a line like: ``` Base directory for this skill: /path/to/.../skills/agent-deck ``` **You MUST use that base directory path to resolve all script references.** Store it as `SKILL_DIR`: ```bash # Set SKILL_DIR to the base directory shown when this skill was loaded SKILL_DIR="/path/shown/in/base-directory-line" # Then run scripts as: $SKILL_DIR/scripts/launch-subagent.sh "Title" "Prompt" --wait ``` **Common mistake:** Do NOT use `<project-root>/scripts/launch-subagent.sh`. The scripts live inside the skill's own directory (plugin cache or project skills folder), NOT in the user's project root. **For plugin users**, the path looks like: `~/.claude/plugins/cache/agent-deck/agent-deck/<hash>/skills/agent-deck/scripts/` **For local development**, the path looks like: `<repo>/skills/agent-deck/scripts/` ## Quick Start ```bash # Launch TUI agent-deck # Create and start a session agent-deck add -t "Project" -c claude /path/to/project agent-deck session start "Project" # Send message and get output agent-deck session send "Project" "Analyze this codebase" agent-deck session output "Project" ``` ## Capabilities What agent-deck does, at the noun level (independent of which surface — CLI / TUI / Web UI — you reach it through). Each row maps to one or more commands, keystrokes, or screens. For full surface coverage and per-row known issues, see your conductor's `CAPABILITIES.md` (generated by the Self-Improvement workflow below). | Capability | What it does | Surfaces | |---|---|---| | **Manage sessions** | Create, start, stop, restart, fork, send, output, remove a session | CLI ✅ · TUI ✅ · Web UI 🟡 | | **Sub-agent / worker spawning** | `agent-deck launch` a child Claude session with parent linkage and inherited `--add-dir` | CLI ✅ · TUI ⚪ | | **Manage conductors** | Set up long-lived orchestrators with their own profile + channel + heartbeat | CLI ✅ · TUI 🟡 | | **Manage groups** | Move / delete groups; organize sessions hierarchically | CLI ✅ · TUI ✅ | | **Manage watchers** | Install / configure event-driven adapters (Gmail, GitHub, ntfy) — doorbell-not-messenger | CLI ✅ · TUI ✅ | | **Heartbeat orchestration** | Cron / ScheduleWakeup feeding the conductor periodic system-state nudges | CLI ✅ | | **Worktree workflows** | `--worktree` to create isolated git-worktree-backed sessions for parallel branch work | CLI ✅ | | **Channel routing** | Telegram / Slack inbound delivery to the right conductor, with `--channels` per-session binding | CLI ✅ | | **Attach MCPs** | Per-session or global MCP plugin attach / detach / status, with optional pooling | CLI ✅ · TUI ✅ · Web UI ⚪ | | **Attach skills** | Pool-based on-demand skill loading per Claude session | CLI ✅ · TUI ✅ | | **Session-metadata mutation** | `session set` for `claude-session-id`, `path`, `wrapper`, `channels`, `parent`; `session unset-parent` | CLI ✅ | | **State persistence** | `state.json` + `task-log.md` + `LEARNINGS.md` + `HANDOFF.md` survive Claude Code compaction/restart | CLI ✅ | | **GitHub pipeline oversight** | Conductor-driven release flow: PR merge → tag → goreleaser → release | CLI ✅ | | **Remote sessions** | SSH-based remote register / list / attach across hosts | CLI ✅ | | **Session sharing** | Export / import a Claude conversation for handoff between developers | CLI ✅ | | **Consult another agent** | Launch a Codex / Gemini sub-agent for a second opinion | CLI ✅ | | **Profile-scoped operation** | `-p <profile>` separation between personal and work auth | CLI ✅ · TUI ✅ | | **Self-improvement** | Analyze your conductor's own transcripts → surface bugs / patterns / capabilities, file GH issues with privacy guards | CLI ✅ | Status legend: ✅ verified, 🟡 partial, 🔴 known broken, ⚪ unknown. To update for your own machine, see [Self-Improvement](#self-improvement) below. ## Essential Commands | Command | Purpose | |---------|---------| | `agent-deck` | Launch interactive TUI | | `agent-deck add -t "Name" -c claude /path` | Create session | | `agent-deck session start/stop/restart <name>` | Control session | | `agent-deck session send <name> "message"` | Send message | | `agent-deck session output <name>` | Get last response | | `agent-deck session current [-q\|--json]` | Auto-detect current session | | `agent-deck session fork <name>` | Fork Claude/Pi conversation | | `agent-deck mcp list` | List available MCPs | | `agent-deck mcp attach <name> <mcp>` | Attach MCP (then restart) | | `agent-deck status` | Quick status summary | | `agent-deck add --worktree <branch>` | Create session in git worktree | | `agent-deck worktree list` | List worktrees with sessions | | `agent-deck worktree cleanup` | Find orphaned worktrees/sessions | | `agent-deck feedback` | Submit feedback (opens rating prompt + optional comment) | **Status:** `●` running | `◐` waiting | `○` idle | `✕` error ## Sub-Agent Launch **Use when:** User says "launch sub-agent", "create sub-agent", "spawn agent" ```bash $SKILL_DIR/scripts/launch-subagent.sh "Title" "Prompt" [--mcp name] [--wait] ``` The script auto-detects current session/profile and creates a child session. ### Retrieval Modes | Mode | Command | Use When | |------|---------|----------| | **Fire & forget** | (no --wait) | Default. Tell user: "Ask me to check when ready" | | **On-demand** | `agent-deck session output "Title"` | User asks to check | | **Blocking** | `--wait` flag | Need immediate result | ### Recommended MCPs | Task Type | MCPs | |-----------|------| | Web research | `exa`, `firecrawl` | | Code documentation | `context7` | | Complex reasoning | `sequential-thinking` | ### Worker Prompt Conventions When the prompt asks the worker to `Edit` or `Write` any **existing** file, include an explicit **prelude-read** as the first step. Claude Code's tool guard rejects `Edit`/`Write` before `Read` of the same path, and conductor-spawned workers hit this mid-task (#968) when their prompt jumps straight into the change. The interruption forces the worker to backfill reads inside its main loop, breaking flow and burning cycles. **Template skeleton — bake this into every worker prompt that mutates code:** ``` ## Step 0 — Prelude reads Read every file you intend to Edit/Write below. Read calls are cheap and do NOT count against scope discipline; they prevent tool-guard interruptions mid-task. Skip only for paths that will be created fresh. Files to read first: - <path/to/file/you/will/edit> - <path/to/other/file/you/will/edit> ## Step 1 — Investigation … ## Step 2 — Implementation … ``` **Rules:** - Any file the worker will modify: prelude `Read` it first, even if the worker "knows" the contents. - Brand-new files (`Write` to a path that does not yet exist): no prelude needed — the guard only applies to modifications. - For conductor nudges that re-fire the same prompt across cycles, keep Step 0 in the prompt. The second-cycle process may not have prior reads in context. ### Completion sentinel (trustworthy "worker finished" signal, #1186) A worker's `Stop` hook fires at the end of *every* turn, so "waiting" never means "done" — the conductor would otherwise have to poll RESULTS files / `gh pr` / `session output` to know a task actually finished. Instead, instruct every worker to **assert completion** by ending its final turn with a single machine-greppable line: ``` ===AGENTDECK_DONE=== status=<ok|fail> summary=<one line to end of line> ``` agent-deck detects this on the `Stop` edge (scanning the transcript tail) and emit
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.