← 返回 Skills 市场
yuanshenstarto

Claude Code Task

作者 yuanshenstarto · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
139
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install claude-code-tmux
功能描述
Run coding tasks using a persistent tmux session with git worktree isolation. Supports multiple coding agents (Claude Code, Codex, CodeBuddy, OpenCode, etc.)...
使用说明 (SKILL.md)

Coding Agent Task (tmux + worktree)

Run coding tasks by spawning a coding agent in a tmux session + git worktree. Every task gets its own isolated branch and persistent conversation.

Step 0: Determine which agent to use

Check memory first:

memory_search("preferred coding agent tool")
  • If found → use that tool, no need to ask

  • If not found → ask the user:

    "Which coding agent should I use? (default: claude) Options: claude, codex, opencode, codebuddy, or any CLI tool name"

    Then save the answer to memory:

    memory: preferred_coding_agent = \x3Ctool>
    

    Write to MEMORY.md under a "Preferences" section.

Default if user doesn't answer: claude

Step 1: Setup worktree

# Always use a worktree — one per task
git -C \x3Cproject> worktree add -b \x3Cbranch> \x3Cworktree-path> main

# Symlink env files
ln -sf \x3Cproject>/.env \x3Cworktree-path>/.env
ln -sf \x3Cproject>/.env.local \x3Cworktree-path>/.env.local   # if exists

Step 2: Start tmux session with the chosen agent

tmux new-session -d -s \x3Ctask-name> -c \x3Cworktree-path>

Then launch based on tool:

Tool Command
claude claude --dangerously-skip-permissions
codex codex
opencode opencode
codebuddy codebuddy (or check its CLI name)
other use the tool's interactive CLI command
tmux send-keys -t \x3Ctask-name> "nvm use 20 && \x3Ctool-command>" Enter

Step 3: Send task with plan-first instruction

tmux send-keys -t \x3Ctask-name> -l -- "Your task here.

Before making any changes, show me a plan of what you intend to do and wait for my approval."
sleep 0.1
tmux send-keys -t \x3Ctask-name> Enter

Step 4: Relay plan to user

# Poll for plan output
tmux capture-pane -t \x3Ctask-name> -p | tail -30

When agent outputs a plan → relay it to the user, wait for their confirmation before proceeding.

Relay flow:

  1. Agent outputs plan → relay to user
  2. User says "ok" / requests changes → forward to agent
  3. Agent proceeds → monitor and relay further questions
# Send user's response
tmux send-keys -t \x3Ctask-name> -l -- "\x3Cuser response>"
sleep 0.1
tmux send-keys -t \x3Ctask-name> Enter

# Check if waiting for input
tmux capture-pane -t \x3Ctask-name> -p | tail -10 | grep -E "❯|Yes.*No|proceed|permission|plan|approve"

Step 5: Parallel tasks

Same pattern, multiple sessions:

tmux new-session -d -s task-a -c /tmp/task-a
tmux new-session -d -s task-b -c /tmp/task-b

Check all at once:

for s in task-a task-b; do
  echo "=== $s ==="
  tmux capture-pane -t $s -p 2>/dev/null | tail -5
done

Step 6: Cleanup

git -C \x3Cproject> worktree remove \x3Cworktree-path>   # branch preserved
tmux kill-session -t \x3Ctask-name>

# User can then test in main workspace:
# git switch \x3Cbranch>

Rules

  • Check memory first — never ask for tool preference if already saved
  • Always use worktrees — one per task, no exceptions
  • Always use tmux — persistent session, multi-turn conversation
  • Always show plan first, wait for user approval before agent touches files
  • Always symlink .env files — don't copy
  • One status message when starting, one when done or stuck
  • See references/troubleshooting.md for common issues
安全使用建议
This skill is coherent with its stated goal of running coding agents in tmux + git worktrees, but it asks the agent to symlink your .env files into task worktrees and to write a MEMORY.md preference — both of which can expose secrets or modify your repo without obvious consent. It also suggests launching Claude with --dangerously-skip-permissions and contains troubleshooting snippets that may auto-send 'y' or Ctrl+C to the running agent. Before installing: (1) confirm you trust the coding agent CLIs you will run, (2) avoid or change the automatic .env symlink behavior if your .env contains secrets (prefer copying with explicit user consent or not exposing it), (3) verify where MEMORY.md will be written (agent memory vs repo) and whether you want that file created, (4) do not use the --dangerously-skip-permissions flag unless you understand its implications, and (5) consider running the workflow in a disposable or containerized environment first. If possible, ask the skill author to make .env symlinking optional and to remove any instructions that auto-approve prompts.
功能分析
Type: OpenClaw Skill Name: claude-code-tmux Version: 1.2.0 The skill automates coding agents (like Claude Code) using tmux and git worktrees, specifically instructing the agent to use the `--dangerously-skip-permissions` flag in SKILL.md. While the instructions mandate a 'plan-first' approach and user approval before execution, the bypass of sub-agent security prompts combined with broad shell access via tmux represents a high-risk configuration. No evidence of intentional malice or data exfiltration was found, but the execution environment is inherently risky.
能力评估
Purpose & Capability
The name/description match the instructions for using tmux and git worktrees. However, several requested behaviors (always symlinking .env files into worktrees, writing a MEMORY.md preference file) are not strictly necessary for a coding-task relay and broaden the skill's access to local secrets and repository files.
Instruction Scope
SKILL.md instructs the agent to create worktrees, start tmux sessions, capture tmux panes, send arbitrary keystrokes (including suggested automated 'y' and Ctrl+C in troubleshooting), and to symlink .env and .env.local into worktrees. These actions read and surface local configuration and can cause automatic interaction with CLIs; they go beyond merely relaying messages and could expose secrets or approve prompts without explicit user interaction.
Install Mechanism
Instruction-only skill with no install spec or downloaded code, which minimizes direct supply-chain risk. It does assume external binaries (tmux, git, node, and the chosen coding agent CLI) are present, but does not install anything itself.
Credentials
The skill declares no required env or credentials, yet explicitly symlinks project .env and .env.local into each worktree—this accesses local secret files without declaring or justifying credential access. It also instructs writing preferences to MEMORY.md (modifying repository or workspace files). These are disproportionate to what the metadata states.
Persistence & Privilege
The skill is not force-enabled (always:false) and can be invoked by the user. It does request persistent presence in the workspace by creating branches/worktrees and by writing a MEMORY.md preference. Modifying the repo (adding branches, saving memory/preferences) is within its purpose but should be made explicit to users because it alters repository state.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-code-tmux
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-code-tmux 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Support multiple coding agents (Claude Code, Codex, OpenCode, CodeBuddy, etc.). Ask user once on first run, save preference to memory, never ask again.
v1.1.0
Add plan mode: Claude Code always shows a plan and waits for approval before making changes
v1.0.0
Initial release: tmux + git worktree workflow for Claude Code tasks with multi-turn conversation relay
元数据
Slug claude-code-tmux
版本 1.2.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

Claude Code Task 是什么?

Run coding tasks using a persistent tmux session with git worktree isolation. Supports multiple coding agents (Claude Code, Codex, CodeBuddy, OpenCode, etc.)... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 139 次。

如何安装 Claude Code Task?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-code-tmux」即可一键安装,无需额外配置。

Claude Code Task 是免费的吗?

是的,Claude Code Task 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claude Code Task 支持哪些平台?

Claude Code Task 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claude Code Task?

由 yuanshenstarto(@yuanshenstarto)开发并维护,当前版本 v1.2.0。

💬 留言讨论