openclaw
Skills for the OpenClaw personal AI assistant, covering browser automation, routing requests to coding agents, presenting canvas widgets, running apps on temporary machines, and sharing diffs.
Agents are suggestions, states are laws. Your workflows, in the harness you choose. Statewright defines tools, checks, and transitions for each phase of agent work. Use it with Claude Code, Codex, Cursor, OpenCode, Pi, or OMX, or connect a custom MCP host.
Claude Code
> /plugin marketplace add statewright/statewright> /plugin install statewright@statewright
Codex
$ npx skills add statewright/statewright -a codex
Cursor
$ npx skills add statewright/statewright -a cursor
Gemini CLI
$ npx skills add statewright/statewright -a gemini-cli
GitHub Copilot
$ copilot plugin marketplace add statewright/statewright$ copilot plugin install statewright@statewright
OpenCode
$ npx skills add statewright/statewright -a opencode
Windsurf
$ npx skills add statewright/statewright -a windsurf

Agents are suggestions, states are laws.
Your workflows, in the harness you choose. Statewright defines tools, checks, and transitions for each phase of agent work. Use it with Claude Code, Codex, Cursor, OpenCode, Pi, or OMX, or connect a custom MCP host. Tool enforcement and model routing depend on the integration. Full docs →
Plugin releases: Claude 0.4.1 and Codex 0.4.0. See the Claude notes and Codex notes. Changes on a development branch are not necessarily included in those packages.
An agent with the same tools throughout a task can edit during review or deploy before checks finish. A workflow needs a way to make those boundaries explicit and, where the host supports it, enforce them before a tool runs.
Define the tools and checks each phase needs. Planning can allow reading, implementation can enable edits, and testing can permit designated commands. On intercepted tool paths, the integration rejects calls outside the current phase and explains which tools and transitions are available. Managed shell checks also screen writes and destructive operations when edits are disallowed.
State machines support retries, loops, and approval gates. You can keep your selected model throughout a workflow or configure phase-specific routes on supported clients. The research results below report a small local-model experiment, not a general model-size requirement.
Claude Code
/plugin marketplace add statewright/statewright
/plugin install statewright@statewright
Codex
codex plugin marketplace add statewright/statewright
codex plugin add statewright@statewright
OpenCode
Use the OpenCode setup guide to load the native plugin through the shared executor.
Cursor
Choose Cursor Agent through the executor or standalone IDE mode. The IDE's MCP/rules mode is advisory; the Agent integration adds native tool hooks.
Also available: Pi, OMX, and custom MCP connections. The install guide covers every adapter and its connection requirements.
In Claude Code 2.1.295 or newer, run the plugin commands at Claude's prompt,
then open the Arbiter's connection status and choose Connect. Claude manages
its native OAuth login. In Codex, restart after installation and ask for
statewright_connect; approve the matching device code in your browser.
Neither flow requires pasting a key into the conversation. Other hosts have
their own connection instructions.
Existing Claude manual-hook installs must complete the migration before starting a workflow; updating the plugin does not remove old settings hooks.
Desktop guides: Claude Code → Local uses the ordinary Claude app; ChatGPT with Codex uses the macOS ChatGPT + Statewright launcher. Ordinary cloud chats are a separate integration and cannot enforce model routing.
For ChatGPT web and other remote MCP hosts, see the web workflow guide. Web guidance and visible transition receipts do not provide the native plugins' hooks or model routing.
Start with agentic-engineering (alias engineering) for a fix, small feature, refactor or investigation. This illustrative sequence shows the normal change path; actual states, events and tools come from the selected workflow:
❯ Use the engineering workflow to fix the failing tests in calc.py
◆ statewright — statewright_load_workflow (name: agentic-engineering)
◆ [statewright] Workflow activated: agentic-engineering
◆ statewright — statewright_get_state (MCP)
◆ diagnose → baseline: understand the failure and record a focused plan
Read the relevant code; reproduce the failing test
◆ implement: make the smallest coherent change
Edit calc.py and add regression coverage
◆ validate → review: check the result and look for missed cases
Run the focused checks; record results and limitations
◆ handoff → complete: summarize the outcome and what was verified
◆ [statewright] Workflow complete.
In Claude, /statewright opens the sidebar: choose a workflow, then
Start workflow. Selection alone does not start a run.
The starter uses your selected model, supports evidence-backed no-change outcomes, and allows one repair round before stopping with a useful handoff. It does not automatically commit or deploy. See the starter workflow guide for boundaries and upgrades.
In the reported experiment, two local models completed 2 of 10 attempts without Statewright constraints and 10 of 10 with them, using the same tasks and hardware. This covered a 5-task SWE-bench subset, not the full 2294-instance benchmark.
| Model | Size | Bug Fix (26 lines) | SWE-bench (5 tasks) |
|---|---|---|---|
| gemma3 | 3.3GB | FAIL | FAIL |
| gemma4:e2b | 7.2GB | PASS* | FAIL |
| gpt-oss:20b | 13.8GB | PASS | PASS (5/5) |
| gemma4:31b | 19.9GB | PASS | PASS (5/5) |
| llama3.3 | 42.5GB | PASS | PASS (2/2)† |
*with specialized edit_line tool adaptation †tested on 2 of the 5 tasks (added after initial experiment run)
In this sample, the two models completing all five tasks were 13.8GB and 19.9GB; the smaller tested models did not complete that subset. These observations do not establish a minimum model size or isolate why a model failed. Outcomes depend on the tested tasks, model, tools, and configuration. Research brief →
Three layers, each independently useful:
Engine (crates/engine) — Pure Rust state machine evaluator. States, transitions, guards, tool restrictions. Deterministic. No LLM in the loop. No runtime dependencies.
Agent binary (crates/cli, binary: sw-agent) — Direct-to-Ollama agent executor. Loads a workflow, runs the LLM in a constrained loop, enforces tool access, and streams structured JSONL events. Supports per-state model routing via --config, and single-state execution via --state (the TUI or MCP gateway orchestrates, sw-agent executes one state at a time and exits).
Executor and plugin layer (plugins/executor + crates/mcp-gateway + plugins/) — One executor owns the workflow session, credentials, isolated delivery, telemetry, and host lifecycle. Thin host adapters translate native tool hooks and model-routing controls for Pi, Claude Code, OpenCode, Cursor, and OMX. Codex uses the same delivery core through its app-server adapter. The statewright_run_agent MCP tool remains available for states that benefit from direct Ollama execution.
The TUI (crates/tui, binary: statewright) is a ratatui terminal interface that spawns sw-agent as a subprocess and renders its JSONL event stream in real time. It handles keyboard input, demo mode, and fixture selection.
States can specify a model; meta.default_model applies where no state
override is present. This is optional: the default engineering starter retains
your selected model. The native Claude 0.4.0 plugin routes subsequent
main-conversation requests without restarting the app. Codex's managed App
Server adapter routes turns. Pi and OpenCode switch live, Cursor's executor
resumes the same chat, and OMX applies its route at startup. Requested settings
are not execution receipts: use the response's observed model when available.
This configuration excerpt illustrates Haiku for diagnosis, Opus for a proposed fix, and Sonnet as the default. It omits transitions and other required workflow fields; use the complete starter or authoring guide for a runnable definition. It is not a measurement of token use or savings.
{
"meta": { "default_model": "claude-sonnet-5-5" },
"states": {
"diagnose": {
"model": "claude-haiku-5-5",
"allowed_tools": ["Read", "Bash"]
},
"propose_fix": {
"model": "anthropic/claude-opus-5-5",
"allowed_tools": ["Read"]
},
"execute": {
"allowed_tools": ["Read", "Edit", "Bash"]
}
}
}
Here, diagnose requests Haiku, propose_fix requests Opus, and execute inherits the default_model (Sonnet). The sw-agent binary also accepts a --config file with a model_routing block for per-state Ollama URL, temperature, and context window overrides.
| Guardrail | What it does |
|---|---|
| Per-state tool enforcement | Rejects tools outside allowed_tools on the integration's intercepted paths |
| Bash discernment | Blocks echo > file, rm -rf, sed -i, and scripting interpreters (python, node) when Write/Edit aren't allowed. Even if Bash itself is permitted. |
| Edit guards | Rejects diffs exceeding max_edit_lines, caps files edited per state |
| Command allow-lists | Only prefix-matched commands run (e.g. pytest, cargo test) |
| Conditional transitions | Programmatic guards on context data: test_result eq pass, coverage gt 80 |
| Approval gates | requires_approval pauses for human review |
Mark a transition with requires_approval: true to park it for review. The
gateway defaults to local UI routing and stores the pending approval (including
its approval_message) in the session state cache. Managed Codex and Claude
clients keep the workflow parked until the gate is resolved.
An approval transition may include a statewright/evidence-packet/v1 manifest
with a concise summary, checklist, and project-relative artifacts. The managed
client hashes and uploads those files through the bound approval, then opens an
authenticated review page. Reviewers can inspect the packet from a browser or
mobile device without receiving the agent's turn history. Evidence retention is
plan-controlled, and path escape, unsupported files, or digest mismatch fail
closed.
Set meta.approval_mode to "external" when an out-of-band reviewer owns the
decision. In that mode clients leave the pending approval to that channel and
do not present a local prompt. Statewright does not currently ship a Telegram,
Slack, or Discord dispatcher; an external integration must resolve the pending
approval through the gateway callback/API.
Codex and Claude Code refresh their cached workflow state after a transition.
Codex presents an authorized native decision dialog and links the review page.
Claude's native sidebar exposes Review this step for a pending gate.
Native host permissions and Statewright review decisions remain separate.
An external approval mode leaves the decision to the configured integration.
Additional workflow controls:
| Guardrail | What it does |
|---|---|
| Interrupts | Edit a file matching a glob pattern? Auto-transition to a validation state, then return where you were |
| Fork/join | Run branches sequentially or in parallel, join when all (or any) complete |
Skills for the OpenClaw personal AI assistant, covering browser automation, routing requests to coding agents, presenting canvas widgets, running apps on temporary machines, and sharing diffs.
Gives Claude Code users skills to drive Orca-managed worktrees, terminals and the embedded browser through the orca CLI, plus Jira and Linear ticket work and inline HTML chat visuals. Covers chart, table and mockup output.
Orchestrates teams of AI agents to run work like a company, with a Node.js server and React UI. Adds skills for delegating tasks, following up on results, reviewing team status, and managing Paperclip tasks from Hermes.
Organizes your AI agents for round-the-clock operation, with tools to hire, schedule and report on your agent team. Lets you oversee the agents without staying online yourself.
Agents are suggestions, states are laws. Your workflows, in the harness you choose. Statewright defines tools, checks, and transitions for each phase of agent work. Use it with Claude Code, Codex, Cursor, OpenCode, Pi, or OMX, or connect a custom MCP host. Install it with the command on its page. It includes statewright, statewright-native. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it