Tmux Fleet 标志

Tmux Fleet

社区
larcane97
tmux-fleet

Run several coding agents in parallel in tmux windows, each under its own clausona profile (another Claude Code or Codex account, or an API model such as GLM or DeepSeek), then watch them, check their work and retire them. Use when the user works in tmux, on their own machine or over SSH, and wants work spread across accounts or models, when one account's limits would slow a fan-out, or says "split this across my accounts in tmux", "run these on DeepSeek in tmux windows".

Add to TypingMind

概览

发布者larcane97
代码仓库clausona
技能名称tmux-fleet
星标数
57
复刻数
11
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 larcane97 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Tmux Fleet AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/larcane97/clausona/tree/main/plugins/tmux-fleet/skills/tmux-fleet
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/larcane97/clausona.git /tmp/clausona
mkdir -p .claude/skills
cp -r /tmp/clausona/plugins/tmux-fleet/skills/tmux-fleet .claude/skills/tmux-fleet
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Tmux Fleet,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Tmux Fleet。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Tmux Fleet 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

tmux fleet on clausona profiles

tmux runs each worker in a window of the session you are in, and its status bar lists them. clausona puts each window's agent on the profile you choose. tmux cannot tell what an agent is doing, so the helper that ships with this skill gives each worker a way to report it, and waits on those reports.

0. Load the shared rules

Load the fleet-core skill first and follow it; this skill only adds the tmux steps. In Claude Code, invoke it with the Skill tool. If that fails, or you run in Codex, read the first of these files that exists, where <base> is this skill's base directory:

  • <base>/../../../fleet-core/skills/fleet-core/SKILL.md
  • <base>/../../../../fleet-core/*/skills/fleet-core/SKILL.md (if several versions match, read the highest)

If none exists, stop and tell the user to install it: claude plugin install fleet-core@clausona in Claude Code, or codex plugin add fleet-core@clausona in Codex.

1. Before anything

Below, H means node <base>/scripts/tmux-fleet.mjs. Write it out in full, or start the command with the function H() { node <base>/scripts/tmux-fleet.mjs "$@"; }. Never put it in a variable: zsh does not split a variable into words. Every H command prints JSON, except H read, which prints the screen. Read window and pane ids from the JSON; never guess them.

Stop and tell the user what is missing if any of these fails.

  1. H status prints "ok": true. It fails outside tmux: the helper drives the tmux session you run in, so do not drive tmux from outside it. In Codex, TMUX also looks unset when Codex hides the environment (fleet-core, Shells). If it does, do not tell the user they are outside tmux: tell them to start Codex again in this pane with -c shell_environment_policy.inherit=all. tmux runs on macOS, Linux and WSL. On Windows without WSL there is no tmux: suggest herdr-fleet or orca-fleet.
  2. Pass on any warnings it prints. With bell-action set to none or current in the user's tmux (or other, while the user looks at that window), a Codex worker is noticed only by the quiet check (section 3).
  3. The repo has a remote: workers push their branches.

2. Starting a worker

For each task, after fleet-core picked its profile:

  1. Worktree. git -C <repo> worktree add -b fleet/<task> ~/.clausona/worktrees/<repo name>/<task>, where <repo name> is the name of the repo's folder. It branches from the commit the repo has checked out; add the base after the path if the user named one. If the branch or the path exists already, pick another task word.

  2. Start. H start --name <name> --label "<task> · <profile>" --worktree <worktree> --tool <claude|codex> -- <profile> <args>, with the arguments from fleet-core section 4. Codex workers keep --disable hooks.

    • The name, such as w1-docs, is lowercase letters, digits, - or _, starts with a letter and has 32 characters at most. Use it from now on.
    • Keep the label to 20 characters or fewer, with a short task word such as docs · ds-flash: the status bar cuts longer names, and the profile at the end shows which account runs where.
    • It opens a window in your session without switching to it, gives the worker its way to report (below), and types clausona run <profile> -- <args> … into the window's shell. Record .window and .pane.
  3. Check it started. About 10 seconds later, run H read --name <name> --lines 40. The tool has started when the screen shows its banner, its prompt or the trust question. If the screen still shows the shell and an error, tell the user what it says. Never type the launch line again into a screen that shows the tool: it would become the worker's first prompt.

  4. Folder trust. The first worker of a profile in a repo that profile never trusted asks whether to trust the folder. Answer only that question, and only about this repository:

    • Claude Code ("Is this a project you created or one you trust?"): the highlighted answer is "No, exit". Send H send --name <name> --keys Down Enter.
    • Codex ("Trust this folder?"): the highlighted answer is "1. Trust and continue". Send H send --name <name> --keys Enter.

    Then read the screen again, until it shows the tool's prompt.

  5. Brief. Write it as fleet-core section 5 says, then H send --name <name> --text "Read .fleet-brief.md in this folder and do what it says." and wait (section 3). In Codex, wait only once every worker has its brief.

  6. Record the name, window, pane, worktree, branch and profile in the table.

Start workers on the same Claude Code profile one at a time, each after the previous one shows its first output.

The user can switch to any worker's window (the tmux prefix, then the window's number), read along and type into it at any time.

How a worker reports. A Claude Code worker gets --settings <worktree>/.fleet-claude.json: hooks for that session only, on top of the shared settings, which record when a turn starts, ends or fails, when it stops at a permission prompt, and when the session ends. A Codex worker gets -c tui.notifications=true -c tui.notification_method=bel -c tui.notification_condition=always: it rings the terminal bell when it waits for approval and when a turn ends, and a tmux hook on its window records the bell. The records go to <worktree>/.fleet-events.jsonl. The helper adds /.fleet-* to the repo's info/exclude, so none of these files, and no brief, is ever committed.

3. Waiting and reading

  • Wait: in Claude Code, run H wait --name <name> as a background task for each worker whose task is not finished: right after you send it something, and again after you handle what its wait returned. You are woken when one returns. One wait per worker is enough; a second one does no harm, since each event is reported by one wait only. In Codex, see the last item below. A wait returns as soon as its worker needs you, with the worker's name and an event:

    • stopped: its turn ended. message holds a Claude Code worker's last reply, or its last 8000 characters when it is longer. Look for the DONE or BLOCKED line there first. When message is missing or has none, use fleet-core's last-reply.mjs, then the screen (fleet-core section 8).
    • failed: its turn ended on an API error, such as a usage or rate limit; message says which. For a limit that will not clear soon, see section 4.
    • blocked: it waits at a permission prompt or a question in a dialog. Read its screen.
    • bell: a Codex worker ended its turn or waits for approval. Read its screen to see which.
    • idle: a Claude Code worker has sat at its prompt for a minute without ending a turn. The user turned its prompt down, or your line never reached it. Read its screen.
    • ended: its session ended. Read its screen.
    • quiet: it should be working, but has printed nothing for three minutes and reported nothing. Read its screen: it is often a prompt or a question that nothing reported.
    • gone: its window or pane is gone; someone closed it. H retire needs the window, so keep the worker: report it with its worktree and branch, and let the user decide.
    • timeout: nothing happened for 30 minutes. Read the screens, then wait again.

    Each event is reported once, so a wait never returns at once on an event you already handled. Keep a worker that waits on the user in the wait: its next event comes when it ends its turn or stops at another prompt, or, if the user turned the prompt down with Esc, a minute later as idle.

  • Read: H read --name <name> --lines 120.

  • Follow-up: read the screen first, then write the file and send H send --name <name> --text "Read .fleet-followup-<n>.md in this folder and do what it says.", and wait. A worker at a prompt or in a dialog needs keys, not text: typed letters and digits would answer it. H send --text refuses a Claude Code worker that waits at a permission prompt; check a Codex worker's screen yourself.

  • A question in a dialog, such as a list to pick from: answer it with keys, for example H send --name <name> --keys Down Enter, only when you know the answer. Otherwise ask the user. A permission prompt is never yours to answer: tell the user which worker waits, and for what.

  • In Codex (one foreground wait at a time, three minutes each): give every worker its brief before you wait on any. Then run H wait --name <a> --name <b> … --timeout 180, handle what it returns, and wait again.

Do not loop over H read yourself, looking for a phrase.

4. When an account runs out

  1. H start --name <name> --handover --label "<task> · <new profile>" --tool <claude|codex> -- <new profile> <args>. It opens a new pane in the worker's window, in the same worktree, and starts the new profile there. It also renames the window to the new label, so the status bar names the new account. Record .pane; .replaces is the old pane.
  2. Check that it started, answer the trust question, and give it fleet-core section 9's brief, as in section 2, steps 3 to 5.
  3. tmux kill-pane -t <the .replaces id>. The worker keeps its name: wait on it as before.

5. Retiring

After fleet-core section 11's checks, run H retire --name <name>. Right before it removes anything, it checks again that the worktree is clean and the branch pushed. Then it runs git worktree remove without --force, closes the worker's window and keeps the branch. When it refuses, keep the worker and report why. When it succeeds, its JSON says "removed": true, and it has checked that the worktree directory is gone.

Never remove a worktree any other way, and never with --force. Never close windows or panes you did not create. The window you run in stays.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Tmux Fleet AI 技能有什么作用?

Run several coding agents in parallel in tmux windows, each under its own clausona profile (another Claude Code or Codex account, or an API model such as GLM or DeepSeek), then watch them, check their work and retire them. Use when the user works in tmux, on their own machine or over SSH, and wants work spread across accounts or models, when one account's limits would slow a fan-out, or says "split this across my accounts in tmux", "run these on DeepSeek in tmux windows".

为什么在 TypingMind 中使用 Tmux Fleet?

因为您只需安装一次,就能搭配任何模型使用。Tmux Fleet 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Tmux Fleet?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/larcane97/clausona/tree/main/plugins/tmux-fleet/skills/tmux-fleet。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Tmux Fleet?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Tmux Fleet 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Tmux Fleet 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Tmux Fleet AI 技能免费吗?

是的。larcane97 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇