Skills cc
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.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/artwalker/cc" ~/.claude/skills/clawdbot-skills-cc && rm -rf "$T"
skills/artwalker/cc/SKILL.mdcc — Claude Code Relay
Operate Claude Code remotely from any OpenClaw channel via tmux.
Continues your existing
claude -c sessions — ACP creates new sessions, cc connects to what's already running.
Language: Always reply in the same language the user uses.
Script
{baseDir}/scripts/cc.sh <command> [args...]
Commands
| Command | Action |
|---|---|
| Start session ( in project dir) |
| Stop session |
| Check Claude Code status (running/idle/dead) |
| Show recent output |
| List available projects |
| List active sessions |
| Set project root directory |
| Show help + project list |
| Send message to Claude Code |
Relay Mode (CRITICAL)
After
/cc on <project>, you enter relay mode:
- ALL user messages are forwarded to Claude Code — NEVER answer yourself
- Only messages NOT forwarded:
,/cc off
,/cc ?
,/cc tail
,/cc status
,/cc projects/cc config - Relay mode ends on
/cc off
You are a transparent pipe. Never interpret, analyze, or answer the user's question yourself.
Starting a Session
- Run:
scripts/cc.sh on <project> - Report to user:
✅ Claude Code session started for <project> Your messages will now be sent directly to Claude Code. Send /cc off to exit relay mode. - Enter relay mode
Sending Messages (relay flow)
When user sends a message in relay mode:
- Immediately reply: ⏳ (so user knows message was received)
- Forward:
scripts/cc.sh <project> "<user's message>" - The script returns the incremental output — only content from this reply, not history
- Return output to user (see Output Formatting below)
Stopping a Session
- Run:
scripts/cc.sh off <project> - Report to user:
Session ended. You're back to normal chat.
Status Check (/cc ?
)
/cc ?Run:
scripts/cc.sh check <project>
Report result to user:
- "🟢 Claude Code is running and waiting for input"
- "🔄 Claude Code is processing..."
- "🔴 Claude Code process died — try /cc off then /cc on to restart"
- "⚪ No active session"
/cc
(no arguments)
/ccRun
scripts/cc.sh projects. Show brief help + project list.
If there's a last-used project (marked with ★), show it first. Keep the response short — just names, no paths.
First-time Setup
When
scripts/cc.sh projects outputs SETUP_NEEDED (exit 100):
- Check:
andwhich tmux
— report if missingwhich claude - Ask user: "Where are your projects? (e.g., ~/projects)"
- Run:
scripts/cc.sh config root <their-answer> - List projects to confirm
Output Formatting
If output ≤ 4000 characters: wrap in one code block and send.
If output > 4000 characters: send a summary of the key output (first meaningful paragraph + last 10 lines), then add: "Full output: send /cc tail to see more"
Always: strip ANSI escape codes (the script handles this automatically).
Requirements
installedtmux
CLI installed (claude
)npm i -g @anthropic-ai/claude-code- Any OpenClaw channel (Telegram, Discord, CLI, etc.)