Skip to content
Back to skills

Workbench Setup

ASecurity

Install, inspect, update, or remove Agent Workbench shared global instructions and its local launcher while preserving personal instruction text.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsrustshellbashnodegit

Works with

  • claude code
  • terminal
  • cli
  • mcp

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 19 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add onsager-ai/agent-workbench --skill workbench-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workbench Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Workbench Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/onsager-ai-workbench-setup/badge)](https://www.skillsdirectory.com/skills/onsager-ai-workbench-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: workbench-setup
description: Install, inspect, update, or remove Agent Workbench shared global instructions and its local launcher while preserving personal instruction text.
---

Use the bundled Node.js 22.20+ installer on Linux, macOS, or Windows. Native `npx skills` distributes this skill. Run the installer to apply global prompts and hooks.

`awb help` and `awb <command> --help` show command usage. `awb status` prints a readable checklist. Use `awb status --json` for per-hook trust and the other machine-readable status fields.

- `awb ops thermal` requires Linux hardware sensors in sysfs, `flock`, and `setsid`. Its optional logger uses user systemd. `awb ops run-once` requires Linux user systemd and an enforced cgroup v2 CPU quota. Use CI or an authorized Linux host for the underlying work on other platforms.
- `awb prune` cleans up eligible branches without worktrees across platforms. Automatic worktree removal requires Linux `/proc` to detect active working directories. When that check is unavailable, verify that the worktree is unused and run `git worktree remove` manually.
- `codex exec -s read-only` uses Linux kernel isolation (including Landlock) for read-only filesystem access and no network, Seatbelt on macOS, and the native Codex sandbox on Windows. Use Linux or WSL when you need Linux kernel guarantees.
- On Windows, Claude Code needs exec-form hooks and Codex uses the built-in Windows PowerShell to start the hook. The policy blocks unrecognized or compound PowerShell commands for unapproved Managers and read-only Workers. The local launchers are `awb.cmd` and `agent-workbench.cmd`.

Orchestration's interactive Manager, native Worker ladder and configured context policy live in the `orchestrate-harnesses` skill. Window values come from base `policy.context` 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.

Install the CLI and apply the setup.

```sh
npm install -g @onsager/awb
awb setup
awb trust   # review and trust Codex hooks
awb status
awb lanes   # open PRs and local worktrees
```

Use `npx @onsager/awb setup` if you prefer to skip global npm installation. Follow the PATH hint if shown. `agent-workbench` remains available as a compatibility alias and is the fallback if another `awb` is present.

If you already distributed the skills directly, apply setup with `node ~/.agents/skills/workbench-setup/scripts/workbench.mjs install`.

The installer creates `~/.agents/AGENTS.md` and ensures `~/.claude/CLAUDE.md` has one native import resolving to it. On Linux and macOS, `~/.codex/AGENTS.md` is a symlink to the shared instructions. On Windows, it is a managed regular file refreshed by `awb install`. Status detects a missing or edited copy, and uninstall preserves a copy you edited. An existing equivalent Claude import is reused. Personal text belongs outside `<!-- BEGIN agent-workbench -->` / `<!-- END agent-workbench -->` and the optional `<!-- BEGIN agent-workbench personal -->` / `<!-- END agent-workbench personal -->` block in the shared file. When `~/.agents/skills/workbench-personal/AGENTS.md` 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 to change the installed personal block. Existing Codex regular-file bytes are kept outside the managed block on first installation, and existing Claude text stays in its file.

The Antigravity target is opt-in: run `awb install --antigravity` (or `node ~/.agents/skills/workbench-setup/scripts/workbench.mjs install --antigravity`) to add `@[Work instructions](~/.agents/AGENTS.md)` to `~/.gemini/AGENTS.md`. This makes the shared instructions available to all Antigravity sessions for the account. It does not install hooks. Existing file content is preserved, and uninstall removes only the include line recorded as owned by Agent Workbench; an identical line that was already present remains user-owned.

To register the policy hook for one workspace, run `awb install --antigravity --workspace PATH`. Select the hook in Antigravity as documented by its CLI. Workbench applies the Manager policy only to T3 top-level threads enrolled in `antigravity-managers.json`; other sessions are Workers. The workspace's `.agents/hooks.json` covers native shell, read and edit tools and selected T3 tools, including delegation, thread creation, scheduling and browser preview. The Worker ladder, brief and WB_MSG stamps, and denial of Antigravity's four native subagent tools apply to every role. See [Enrol an Antigravity Manager](../../docs/reference.md#enrol-an-antigravity-manager).

Workbench records the exact group it creates, preserves other groups, and never adopts an unowned group, even an identical one. Install and update refresh tracked, unchanged workspace registrations, including legacy registrations. Changed configuration is left in place for manual resolution. Remove only the workspace registration with `awb uninstall --antigravity --workspace PATH`.


`awb install` reapplies distributed assets. On Linux with a supported sensor and user systemd, opt in to the thermal logger with `awb ops thermal install`. Run `awb ops thermal uninstall` before removing the skill if you enabled the logger. `awb update` first updates installed skills owned by `onsager-ai/agent-workbench` plus `workbench-personal` from any source through the native skills lock, then runs freshly distributed setup code. Node.js 22.20+ is the only runtime needed (`npx` distributes and updates the skills). Do not edit the native skills lock yourself.

When `orchestrate-harnesses` is installed, `install` (and `update`) generates one Claude Code subagent per routable tier at `~/.claude/agents/<tier>.md`. Distributed `workers.yml`, optional `~/.agents/skills/workbench-personal/workers.yml`, the partial user override (in that precedence order), and every profile contribute to this union. A tier is routable when it has `harness: claude` (using `model`) or a non-null `claude_route`. The base ladder places haiku and haiku-review at L1, sonnet and sonnet-review at L2, and opus at L3. The `codex` profile adds luna at L1, sol at L2, and opt-in terra. Their routes are null, so Claude Managers use the [Codex CLI procedure](../orchestrate-harnesses/references/codex-workers.md) unless an override supplies a gateway model ID. A tier name must use the same model, route, effort, and access across profiles. Each generated agent carries its model and effort in frontmatter and the Worker instructions as its prompt. Rerun `awb install` after edits.

Generated read-only agents such as `haiku-review` and `sonnet-review` allow `Read`, `Grep`, `Glob`, and selected read-only T3 MCP tools by exact name. Their denylist includes `AskUserQuestion`, `Bash`, `Write`, `Edit`, `NotebookEdit`, and `MultiEdit`. The allowlist omits `ToolSearch`. Claude Code applies the denylist before resolving the allowlist, and documents upfront MCP loading when `ToolSearch` is unavailable. [Subagent tools](https://code.claude.com/docs/en/sub-agents#restrict-which-tools-a-subagent-can-use) · [MCP tool loading](https://code.claude.com/docs/en/mcp#configure-tool-search)

Use `awb workers --cwd PATH` to print effective JSON and the selected profile. Overrides live at `$XDG_CONFIG_HOME/agent-workbench/workers.yml` when XDG is nonempty and absolute, otherwise `~/.config/agent-workbench/workers.yml`. The `yaml` and `smol-toml` packages are vendored; installation never runs `npm install`. Setup owns a resolved `workers.json` beside `state.json` 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. Install and update regenerate missing or edited `workers.json` from the YAML sources. If the JSON was edited, setup keeps the previous bytes in a private `workers.json.edited-<UTC timestamp>` file and prints its path. Status reports whether regeneration is needed. Uninstall removes the unmodified owned JSON along with the agents and hook entries.

Generated 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 `~/.claude/agents` are left alone. `status` lists owned agents, personal package presence and applied personal files; `uninstall` removes unmodified owned agents.

When `orchestrate-harnesses` is installed, setup adds Claude Code `hooks.PreToolUse`, `hooks.UserPromptSubmit`, `hooks.PostToolUse` and `hooks.Stop` entries in `~/.claude/settings.json`, all running the installed `orchestrate-harnesses/scripts/policy-hook`. PreToolUse matches all tools; PostToolUse matches `Agent|Task` to validate Worker routes. The hook also denies GitHub polling commands, applies Manager work-call gates, and enforces observable Worker restrictions for thread creation, new watches and local wakeups. 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.

When `~/.codex` also exists, setup writes the policy to `~/.codex/hooks.json` (Codex 0.141 or newer, where hooks are on by default): PreToolUse groups for `Agent|spawn_agent`, `Bash`, `mcp__t3_code__delegate_task`, `mcp__t3_code__t3_thread_send`, `mcp__t3_code__t3_thread_launch`, `mcp__t3_code__schedule_task`, `mcp__t3_code__create_threads` and `mcp__t3_code__watch_pull_request`, plus a `Stop` group, each running `policy-hook --host codex`. Claude's `.*` PreToolUse matcher sees these calls too. Codex denies new T3 schedules. The Claude Manager main loop can create a thread-bound schedule matching `policy.schedules`. A pause-only update to an identified schedule is allowed, while list/read, deletion and cleanup remain available. Worker-tagged events cannot create threads, watches, or local wakeups. Codex does not expose reliable standalone Manager/Worker role metadata, so top-level thread creation, new PR watches, and recognized shell-based automation creation fail closed; existing watches are unaffected. Ordinary delegation and unrelated shell work remain available. Automation registration and lifecycle rules are documented for Manager and Infra review, not inferred from tool text. Codex cannot prompt from a hook, so every approval the Claude hook would ask for becomes a deny that tells the model to get the user's approval and retry. Codex runs a user hook only after it is trusted. Install writes the hook entries without trusting them. Run `awb trust` to review and consent to adding owned `[hooks.state."<key>"]` tables with `trusted_hash` to `~/.codex/config.toml`; without a terminal, or when you decline, it prints the `/hooks` step to trust them in Codex. A foreign `hooks.state` entry for the same key is left alone and reported. Status adds `codex_hooks` (applied or missing) and `codex_trust` (trusted, untrusted, or modified), with JSON output available through `status --json`. Uninstall removes only the owned tables that are still unmodified. Editing an owned hook's command or timeout, or moving it in `hooks.json`, changes its trust identity. Use `/hooks` in Codex to review its trust again.

Codex stores hook trust by registration position. Normal installs and updates keep existing Codex registrations, including their command, timeout, and position, even when you remove orchestration. A deliberate handler replacement requires a new appended registration and native trust approval. Explicit uninstall removes Workbench-owned Codex registrations.

The first install from a saved v0.2.65 setup with owned Codex hooks updates the rest of setup to v0.2.66 and preserves `hooks.json` and `config.toml`. It prompts you to open `/hooks` in Codex and review the existing registrations in their current order. Later installs append newly needed registrations. The owned v0.2.65 combined matcher still covers the direct-delegation tools as long as its registration remains intact. `awb setup` never writes Codex hook trust. When setup finds hooks that need approval, review them in Codex with `/hooks` or run `awb trust` explicitly.

`awb uninstall` removes the managed instruction blocks, owned import, and managed launchers. It preserves current private text and removes instruction files that setup created when no private text remains. Codex private text is saved as a regular file. Backups remain private under `~/.local/state/agent-workbench/backups` for manual recovery.

If 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 `~/.local/state/agent-workbench/`.

When the Claude Code config directory exists, installation manages `autoCompactWindow` from `max_tokens`, `modelSettings.<model>.autoCompactWindow` for each `manager_models` entry when `manager_window` is set (null by default), and optional `env.CLAUDE_CODE_MAX_CONTEXT_TOKENS` from `gateway_window`. Per-model compaction requires Claude Code v2.1.288 or later. `policy.context.worker_window` is null by default; when set to at least `100000`, it adds `autoCompactWindow` to every generated Claude subagent. Claude Code applies this frontmatter only to subagents and caps it at the window granted by that model's settings, so it only lowers the window. It does not affect `codex exec` Workers. Generated subagents also set `disallowedTools: AskUserQuestion`. Install removes the previous owned `env.CLAUDE_CODE_AUTO_COMPACT_WINDOW` when its value still matches state. A user-set copy takes precedence over both window settings. Install and status warn when a Worker tier shares a Manager model and its window.

When the Codex config directory exists, setup applies `model_auto_compact_token_limit` and optional `model_context_window` outside the first v0.2.65 upgrade described above. When `manager_window` is set, pass `-c model_auto_compact_token_limit=<manager_window>` in the launch arguments for a Codex Manager only, for example in T3 Code's Codex provider launch arguments. `codex exec` Workers use the shared limit.

Setup preserves other settings, including provider routing and existing compaction windows that already match. A differing foreign value or an edited owned value conflicts. Missing managed values are reapplied. Status reports each key and uninstall removes only unmodified owned values. Restart running sessions to pick up changes. At the cap the harness compacts in place in the same thread and the Manager takes no action. Compaction does not enforce a hard request-token limit. Installation does not edit other skills, project files, shell configuration, credentials, or permissions.

For isolated fixtures, put the skill at the canonical location under a disposable home, then pass `--home PATH` before the command. Alternate-home updates require an explicit `--skills-cmd` executable command; they never default to the real user's npx update. Native permission choices remain with the user.

Files in this skill

  • SKILL.md14.3 KB
  • assets/AGENTS.md5.8 KB
  • scripts/cli.mjs3.5 KB
  • scripts/escalate.mjs7.2 KB
  • scripts/lanes.mjs4.8 KB
  • scripts/ops.mjs2.1 KB
  • scripts/prune.mjs9.1 KB
  • scripts/run-once.mjs6.4 KB
  • scripts/thermal8.3 KB
  • scripts/workbench.py425 B
  • vendor/README.md1.4 KB
  • vendor/smol-toml/LICENSE1.5 KB
  • vendor/smol-toml/date.js6.1 KB
  • vendor/smol-toml/error.js2.8 KB
  • vendor/smol-toml/extract.js12.8 KB
  • vendor/smol-toml/index.js1.9 KB
  • vendor/smol-toml/package.json23 B
  • vendor/smol-toml/parse.js6.3 KB
  • vendor/smol-toml/primitive.js7.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.