{"skill":{"slug":"cc","displayName":"Cc","summary":"Claude Code relay via tmux. Operate Claude Code remotely — start sessions, send messages, read output. Use when the user wants to interact with Claude Code f...","description":"---\nname: cc\ndescription: \"Claude Code relay via tmux. Operate Claude Code remotely — start sessions, send messages, read output. Use when the user wants to interact with Claude Code from Telegram or any OpenClaw channel.\"\nmetadata: { \"openclaw\": { \"emoji\": \"⚡\", \"requires\": { \"bins\": [\"tmux\", \"claude\"] } } }\n---\n\n# cc — Claude Code Relay\n\nOperate Claude Code remotely from any OpenClaw channel via tmux.\n\nContinues your existing `claude -c` sessions — ACP creates new sessions, cc connects to what's already running.\n\n**Language**: Always reply in the same language the user uses.\n\n## Script\n\n```bash\n{baseDir}/scripts/cc.sh <command> [args...]\n```\n\n## Commands\n\n| Command | Action |\n|---------|--------|\n| `/cc on <project>` | Start session (`claude -c` in project dir) |\n| `/cc off [project]` | Stop session |\n| `/cc ?` | Check Claude Code status (running/idle/dead) |\n| `/cc tail [project] [lines]` | Show recent output |\n| `/cc projects` | List available projects |\n| `/cc status` | List active sessions |\n| `/cc config root <path>` | Set project root directory |\n| `/cc` | Show help + project list |\n| `/cc <message>` | Send message to Claude Code |\n\n## Relay Mode (CRITICAL)\n\nAfter `/cc on <project>`, you enter relay mode:\n\n1. **ALL user messages are forwarded to Claude Code** — NEVER answer yourself\n2. Only messages NOT forwarded: `/cc off`, `/cc ?`, `/cc tail`, `/cc status`, `/cc projects`, `/cc config`\n3. Relay mode ends on `/cc off`\n\n**You are a transparent pipe. Never interpret, analyze, or answer the user's question yourself.**\n\n## Starting a Session\n\n1. Run: `scripts/cc.sh on <project>`\n2. Report to user:\n   ```\n   ✅ Claude Code session started for <project>\n   Your messages will now be sent directly to Claude Code.\n   Send /cc off to exit relay mode.\n   ```\n3. Enter relay mode\n\n## Sending Messages (relay flow)\n\nWhen user sends a message in relay mode:\n\n1. **Immediately reply: ⏳** (so user knows message was received)\n2. Forward: `scripts/cc.sh <project> \"<user's message>\"`\n3. The script returns the **incremental output** — only content from this reply, not history\n4. Return output to user (see Output Formatting below)\n\n## Stopping a Session\n\n1. Run: `scripts/cc.sh off <project>`\n2. Report to user:\n   ```\n   Session ended. You're back to normal chat.\n   ```\n\n## Status Check (`/cc ?`)\n\nRun: `scripts/cc.sh check <project>`\n\nReport result to user:\n- \"🟢 Claude Code is running and waiting for input\"\n- \"🔄 Claude Code is processing...\"\n- \"🔴 Claude Code process died — try /cc off then /cc on to restart\"\n- \"⚪ No active session\"\n\n## `/cc` (no arguments)\n\nRun `scripts/cc.sh projects`. Show brief help + project list.\n\nIf there's a last-used project (marked with ★), show it first. Keep the response short — just names, no paths.\n\n## First-time Setup\n\nWhen `scripts/cc.sh projects` outputs `SETUP_NEEDED` (exit 100):\n\n1. Check: `which tmux` and `which claude` — report if missing\n2. Ask user: \"Where are your projects? (e.g., ~/projects)\"\n3. Run: `scripts/cc.sh config root <their-answer>`\n4. List projects to confirm\n\n## Output Formatting\n\n**If output ≤ 4000 characters**: wrap in one code block and send.\n\n**If output > 4000 characters**: send a summary of the key output (first meaningful paragraph + last 10 lines), then add:\n\"Full output: send /cc tail to see more\"\n\n**Always**: strip ANSI escape codes (the script handles this automatically).\n\n## Requirements\n\n- `tmux` installed\n- `claude` CLI installed (`npm i -g @anthropic-ai/claude-code`)\n- Any OpenClaw channel (Telegram, Discord, CLI, etc.)\n","tags":{"latest":"2.1.0"},"stats":{"comments":0,"downloads":1171,"installsAllTime":2,"installsCurrent":2,"stars":0,"versions":5},"createdAt":1771895407089,"updatedAt":1778992742008},"latestVersion":{"version":"2.1.0","createdAt":1774410933963,"changelog":"cc v2.1.0\n\n- The relay flow now uses only incremental output for user messages, not the full session history.\n- Large output message updates: the prompt for more detail now says \"send /cc tail to see more\".\n- ANSI escape codes are now stripped by the script automatically—no need to handle this in output formatting.\n- Documentation clarified to reflect the new script behavior and output requirements.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"artwalker","userId":"s178efb5amvbdydnqrct04w70s83hkad","displayName":"XING","image":"https://avatars.githubusercontent.com/u/44759507?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779954012394}}