cc-use
Delegate long-running coding work to an inner CC session running in tmux, while the outer agent stays focused on supervision, monitoring, and end-to-end verification. Use when the user asks to run a long task, offload implementation, keep working while an inner coding agent executes, or use cc-use.
What this skill does
# cc-use You are the outer supervisor. Use this skill's `scripts/cc-use` helper as an implementation detail to start and supervise an inner CC session in tmux. Here, **CC** means a coding command-line agent. Depending on the host and local configuration, that can mean Claude Code, Codex CLI, or another compatible coding CLI. ## When To Use This Skill Use cc-use for long-term tasks where the outer session should keep the global state clean and deliberate while an inner interactive session handles focused execution. The point is not just parallelism; it is supervision. The outer session keeps the plan, product intent, risks, compatibility concerns, and acceptance criteria in view while the inner session does bounded work. This helps when a task is long enough that a single conversation may lose local details, pollute context with logs, or drift away from the top-level objective. The inner session can do implementation, command execution, exploration, and interactive TUI work, while the outer session preserves a compact supervisory context and performs final judgment. Do not pass the whole long-term task to the inner session as one giant prompt. Break it into small, concrete requests, then inspect, steer, and refine like a human supervisor would: 1. Ask for one focused investigation, implementation step, test case, or verification action. 2. Wait for an `inspect` observation. 3. Read the snapshot semantically. 4. Decide the next short request, wait, intervene, ask the user, or verify. 5. Repeat until the outer session has enough evidence to accept or reject the work. Good scenarios: - **End-to-end verification:** The outer session acts like a tester. It asks the inner session to run realistic workflows, edge cases, and command sequences, then evaluates the reported result and runs any final checks itself. - **Task decomposition and implementation:** For a large project with a plan or design document, the outer session decomposes the plan into small implementation requests and feeds them to the inner session one at a time. - **Adversarial testing:** The outer session designs high-level adversarial cases based on project history, product positioning, architecture, compatibility requirements, and likely regressions. The inner session executes those cases and reports what happens. - **Interactive product testing:** For TUI products such as Claude Code, Codex CLI, or plugin/skill/MCP workflows, normal one-shot command tests may be insufficient. The inner session can install the in-development skill, MCP server, or plugin inside an interactive terminal environment, then receive follow-up input from the outer session to validate that the integration works in the real TUI. ## User Experience The expected user flow is natural language in the outer TUI: > Use cc-use to implement this long task: ... You should then: 1. Start or reuse an inner CC session for the same agent family as the outer session. 2. Break the user's request into short, focused inner requests. 3. Send each inner request exactly as written, without wrapper text. 4. Monitor by screen stability, not by parsing agent-specific UI rules. 5. When the screen stays quiet long enough, inspect the saved screen snapshot semantically and decide whether to wait, steer, or verify. 6. Run final acceptance checks yourself from the outer session. ## Commands Run commands from the target project root unless you pass an explicit `--project DIR`. Use `--agent codex` from Codex and `--agent claude` from Claude Code. Do not cross-delegate between agent families. `--project` controls the tmux working directory, the derived session name, and the `.cc-use/state/` location. If omitted, it defaults to the current directory. Passing `--project "$PWD"` is recommended when the outer session may change directories. ### `delegate` Start or reuse the inner session, send one short request exactly as provided, and wait until one observation is emitted: ```bash <skill_dir>/scripts/cc-use delegate "TASK_TEXT" --project "$PWD" --agent codex ``` Important options: - `--project DIR`: target project root. Also determines state location. - `--agent codex|claude`: inner agent family. Match the outer agent family. - `--session NAME`: override the derived tmux session name. - `--profile NAME`: Codex only; use only if the user explicitly requests an inner Codex profile and only when creating the session. - `--initial-quiet-seconds N`: how long a stable screen must stay quiet before an observation is emitted. Default is `30`. - `--poll-interval N`: seconds between screen captures while waiting. Default is `2`. - `--replace`: kill and recreate an existing session. Use only for recovery or an explicit fresh-start decision. `TASK_TEXT` is passed through unchanged. Keep task decomposition in the outer session. Do not ask the helper to add role instructions, policy text, or task wrappers. For Codex, omit `--profile` by default. Existing tmux/TUI sessions are reused and do not need the profile on later requests. ### Codex permissions: fully bypassed cc-use launches the inner Codex with `--dangerously-bypass-approvals-and-sandbox` — the Codex equivalent of Claude Code's `--dangerously-skip-permissions`. This matches cc-use's intent (the inner agent runs unattended automated work) and avoids the flag-conflict failures the older `--ask-for-approval` / `--sandbox` combination caused when the user's codex config was already set to a bypass mode. The `--sandbox` and `--approval` CLI flags to cc-use are retained for backward compatibility but no longer affect the inner session. Expected behavior: - If the session does not exist, the helper creates a persistent tmux session named like `ccu-<project-name>`. - If the session already exists, the helper reuses it. - The command normally returns one JSON event after the screen becomes stable. - If the screen keeps changing, the command may block until the screen becomes quiet. ### `monitor` Observe an existing derived session and wait for one observation: ```bash <skill_dir>/scripts/cc-use monitor --project "$PWD" --agent codex ``` Use this after a previous observation suggests waiting, after you have waited based on your own semantic judgment, or after the user asks for status. Important options: - `--project DIR`, `--agent codex|claude`, `--session NAME`: identify the target session. - `--initial-quiet-seconds N`, `--poll-interval N`: same meaning as `delegate`. Expected behavior: - If the screen changes, the helper resets the quiet timer and continues waiting. - If the screen stays unchanged long enough, the helper saves a snapshot and emits an `inspect` observation. - If the tmux session is gone, the helper emits `session_unavailable`. ### `project-status` Check the derived project/session status without sending input: ```bash <skill_dir>/scripts/cc-use project-status --project "$PWD" --agent codex ``` Use `--json` when you need machine-readable output: ```bash <skill_dir>/scripts/cc-use project-status --project "$PWD" --agent codex --json ``` Expected text output includes: - `project`: resolved project directory. - `session`: derived or explicit session name. - `agent`: selected agent family. - `session_available`: whether tmux currently has the session. - `observations`: number of saved observations for this session. - `silence_seconds`: seconds since the last detected screen change. - `seconds_until_next_check`: current watch schedule hint from state. ### `scrollback` If the saved screen snapshot does not include enough context, inspect recent tmux scrollback on demand. This is a temporary read to stdout, not a persistent transcript: ```bash <skill_dir>/scripts/cc-use scrollback --project "$PWD" --agent codex --lines 2000 ``` For paged inspection, use tmux line ranges. Negative numbers refer to scrollback history, `0` is the first visible line, and `-` means the end of the visible pane: ```bash <skil
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.