workbench-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUse the bundled Python 3.11+ installer on Linux or macOS. Native distributes this skill; it does not execute the installer or apply global prompts.
npx skillsOrchestration's interactive Manager, native Worker ladder and configured context policy live in the skill. Window values come from base in the Worker configuration, not skill or role instructions. Updating that skill changes its distributed defaults, not the current Manager's interactive model/settings or the user's partial model overrides.
orchestrate-harnessespolicy.contextAfter global distribution, explicitly apply the setup:
sh
python3 ~/.agents/skills/workbench-setup/scripts/workbench.py install
~/.local/bin/agent-workbench statusThe installer creates , links Codex's , and ensures has one native import resolving to the shared instructions. An existing equivalent Claude import is reused. Personal text belongs outside / and the optional / block in the shared file. When exists, install applies it in that second block immediately after the public block; removing the package or file removes the owned personal block on install. Both blocks have ownership and drift checks; edit the package source instead of the installed personal block. Existing Codex regular-file bytes are kept outside the managed block on first installation; existing Claude text stays in its file.
~/.agents/AGENTS.md~/.codex/AGENTS.md~/.claude/CLAUDE.md<!-- BEGIN agent-workbench --><!-- END agent-workbench --><!-- BEGIN agent-workbench personal --><!-- END agent-workbench personal -->~/.agents/skills/workbench-personal/AGENTS.mdagent-workbench installthermalagent-workbench updateonsager-ai/agent-workbenchworkbench-personalWhen is installed, (and ) generates one Claude Code subagent per routable tier at . Distributed , optional , the partial user override (in that precedence order), and every profile contribute to this union. A tier is routable when it has (using ) or a non-null . The default ladder generates haiku, sonnet and opus. The optional profile adds luna, sol and opt-in terra with null routes, so Claude Managers run them as Workers unless a user override supplies a gateway model ID. Change a route in the YAML override, or set it to null to remove it when no profile needs it. A tier name must use the same model, route and effort across profiles; rename conflicting tiers. Each agent carries model and effort in frontmatter and the Worker instructions as its prompt. Rerun after edits. Without no agents are generated.
orchestrate-harnessesinstallupdate~/.claude/agents/<tier>.mdworkers.yml~/.agents/skills/workbench-personal/workers.ymlharness: claudemodelclaude_routecodexcodex execagent-workbench installorchestrate-harnessesUse to print effective JSON and the selected profile. Overrides live at when XDG is nonempty and absolute, otherwise . PyYAML is vendored; installation never invokes pip. Setup owns a resolved beside and passes its path to the policy hook. The hook selects approval rules by dispatch cwd; missing or unreadable policy asks for approval and requests reinstall. Uninstall removes the unmodified owned JSON along with the agents and hook entries.
agent-workbench workers --cwd PATH$XDG_CONFIG_HOME/agent-workbench/workers.yml~/.config/agent-workbench/workers.ymlworkers.jsonstate.jsonGenerated agent files are recorded with content hashes in the state file. Setup never overwrites a file it does not own, or an owned file you edited, and reports a conflict instead; other files in are left alone. lists owned agents, personal package presence and applied personal files; removes unmodified owned agents.
~/.claude/agentsstatusuninstallWhen is installed, setup adds three Claude Code entries and one entry in , all running the installed . The PreToolUse entries match , , and to require approval for Opus Workers, deny GitHub polling commands, and require explicit Worker models for built-in agents and T3 delegation. The Stop entry blocks turns that end in a prose question, directing the model to re-ask through AskUserQuestion. State records the exact entries setup added; foreign entries (including identical pre-existing ones) remain unowned. Status lists owned hooks as applied or missing; install re-adds a missing or edited owned entry and leaves the edited copy as yours, a duplicated owned entry causes a conflict, and uninstall removes only owned entries while preserving other settings and their key order.
orchestrate-harnesseshooks.PreToolUsehooks.Stop~/.claude/settings.jsonorchestrate-harnesses/scripts/policy-hookAgent|TaskBashmcp__t3-code__delegate_taskagent-workbench uninstall~/.local/state/agent-workbench/backupsIf a command reports an override, foreign entry, missing resource, or edited managed block, preserve the files and resolve that specific conflict before retrying. There is no force-overwrite mode. State and lock live under . Installation also owns and optionally in (replacing the earlier, unmodified ) and and optionally in , when the respective config directory exists. It preserves other settings, including provider routing. Foreign or edited owned values conflict; missing values are reapplied. Status reports each key and uninstall removes only unmodified owned values. Compaction is advisory, not a hard request-token cap; restart running sessions to pick up changes. Installation does not edit other skills, project files, shell configuration, credentials, or permissions.
~/.local/state/agent-workbench/env.CLAUDE_CODE_AUTO_COMPACT_WINDOWenv.CLAUDE_CODE_MAX_CONTEXT_TOKENS~/.claude/settings.jsonenv.CLAUDE_AUTOCOMPACT_PCT_OVERRIDEmodel_auto_compact_token_limitmodel_context_window~/.codex/config.tomlFor isolated fixtures, put the skill at the canonical location under a disposable home, then pass before the command. Alternate-home updates require an explicit executable command; they never default to the real user's npx update. Native permission choices remain with the user.
--home PATH--skills-cmd在 Linux 或 macOS 上使用随附的 Python 3.11+ 安装器。原生 仅负责分发此 skill;它不会执行安装器,也不会应用全局 prompts。
npx skillsOrchestration 的交互式 Manager、原生 Worker 分层体系以及已配置的 context policy 均位于 skill 中。窗口值取自 Worker 配置中的基础 ,而不是 skill 或 role instructions。更新该 skill 只会更改其分发默认值,不会更改当前 Manager 的交互式 model/settings,也不会更改用户的部分 model overrides。
orchestrate-harnessespolicy.context完成全局分发后,请显式应用设置:
sh
python3 ~/.agents/skills/workbench-setup/scripts/workbench.py install
~/.local/bin/agent-workbench status安装器会创建 ,为 Codex 的 建立链接,并确保 中有一条能够解析到共享指令的原生 import。若 Claude 中已有等效 import,则会直接复用。个人文本应放在共享文件中 / 之外,以及可选的 / block 之外。当 存在时,install 会将其应用到第二个 block 中,紧接在 public block 之后;如果移除了 package 或该文件,后续 install 会删除受管理的 personal block。两个 block 均具有 ownership 和 drift 检查;应修改 package 源文件,而不是已安装的 personal block。首次安装时,现有 Codex 普通文件的 bytes 会保留在 managed block 之外;Claude 中已有的文本仍保留在其文件中。
~/.agents/AGENTS.md~/.codex/AGENTS.md~/.claude/CLAUDE.md<!-- BEGIN agent-workbench --><!-- END agent-workbench --><!-- BEGIN agent-workbench personal --><!-- END agent-workbench personal -->~/.agents/skills/workbench-personal/AGENTS.mdagent-workbench installthermal-guardthermalagent-workbench updateonsager-ai/agent-workbenchworkbench-personal安装 后,(以及 )会为每个可路由 tier 在 生成一个 Claude Code subagent。分发的 、可选的 、用户的部分 override(按上述优先级)以及每个 profile 都会参与生成该并集。当 tier 包含 (使用 )或非 null 的 时,该 tier 可路由。默认 ladder 会生成 haiku、sonnet 和 opus。可选的 profile 会添加 luna、sol 以及需显式启用的 terra,它们的 route 均为 null,因此 Claude Managers 会将它们作为 Workers 运行,除非用户 override 提供了 gateway model ID。可以在 YAML override 中修改 route;若没有任何 profile 需要某个 route,也可将其设为 null 以移除该 route。同一 tier 名称在所有 profiles 中必须使用相同的 model、route 和 effort;如有冲突,请重命名相应 tiers。每个 agent 都会在 frontmatter 中记录 model 和 effort,并将 Worker instructions 作为 prompt。编辑后请重新运行 。未安装 时不会生成 agents。
orchestrate-harnessesinstallupdate~/.claude/agents/<tier>.mdworkers.yml~/.agents/skills/workbench-personal/workers.ymlharness: claudemodelclaude_routecodexcodex execagent-workbench installorchestrate-harnesses使用 可打印生效后的 JSON 和所选 profile。若 XDG 非空且为绝对路径,override 位于 ;否则位于 。PyYAML 已内置;安装过程绝不会调用 pip。Setup 负责管理与 并列的已解析 ,并将其路径传给 policy hook。该 hook 根据 dispatch cwd 选择 approval rules;如果 policy 缺失或不可读,则请求 approval 并要求重新安装。Uninstall 会连同 agents 和 hook entries 一并删除未经修改的 owned JSON。
agent-workbench workers --cwd PATH$XDG_CONFIG_HOME/agent-workbench/workers.yml~/.config/agent-workbench/workers.ymlstate.jsonworkers.json生成的 agent 文件会连同 content hashes 记录在 state file 中。Setup 绝不会覆盖非 owned 文件或用户编辑过的 owned 文件,而会报告 conflict; 中的其他文件保持不变。 会列出 owned agents、personal package 是否存在以及已应用的 personal files; 会删除未经修改的 owned agents。
~/.claude/agentsstatusuninstall安装 后,Setup 会在 中添加三个 Claude Code entries 和一个 entry,它们都会运行已安装的 。三个 PreToolUse entries 分别匹配 、 和 ,用于要求批准 Opus Workers、拒绝 GitHub polling commands,以及要求为内置 agents 和 T3 delegation 明确指定 Worker models。Stop entry 会阻止以自然语言问题结束的 turns,并指示 model 通过 AskUserQuestion 重新提问。State 会记录 Setup 添加的确切 entries;foreign entries(包括预先存在的相同 entries)仍为 unowned。Status 会将 owned hooks 列为 applied 或 missing; 会重新添加缺失的 owned entry,若 owned entry 已被编辑,则保留编辑后的副本并将其视为用户所有;重复的 owned entry 会引发 conflict,而 只删除 owned entries,并保留其他 settings 及其 key order。
orchestrate-harnesses~/.claude/settings.jsonhooks.PreToolUsehooks.Stoporchestrate-harnesses/scripts/policy-hookAgent|TaskBashmcp__t3-code__delegate_taskinstalluninstallagent-workbench uninstall~/.local/state/agent-workbench/backups如果命令报告 override、foreign entry、missing resource 或 edited managed block,请保留相关文件,并在重试前解决该具体 conflict。没有 force-overwrite 模式。State 和 lock 位于 下。当相应配置目录存在时,安装过程还会管理 中的 以及可选的 (替换此前未经修改的 ),并管理 中的 以及可选的 。其他 settings(包括 provider routing)均会保留。Foreign 或已编辑的 owned values 会引发 conflict;缺失的 values 会重新应用。Status 会报告每个 key,而 uninstall 只删除未经修改的 owned values。Compaction 属于建议性设置,并非硬性的 request-token cap;请重启正在运行的 sessions 以使更改生效。安装过程不会编辑其他 skills、project files、shell configuration、credentials 或 permissions。
~/.local/state/agent-workbench/~/.claude/settings.jsonenv.CLAUDE_CODE_AUTO_COMPACT_WINDOWenv.CLAUDE_CODE_MAX_CONTEXT_TOKENSenv.CLAUDE_AUTOCOMPACT_PCT_OVERRIDE~/.codex/config.tomlmodel_auto_compact_token_limitmodel_context_window对于隔离的 fixtures,请将 skill 放在 disposable home 下的 canonical location,然后在命令之前传入 。Alternate-home 更新需要显式提供可执行的 命令;它们绝不会默认使用真实用户的 npx update。原生 permission choices 仍由用户决定。
--home PATH--skills-cmd