cao-workflow

cao-workflow is a skill for Claude Code, Codex from awslabs/cli-agent-orchestrator. It costs 79 tokens per session (4,161 once invoked), scanned A, original, Apache-2.0.

A way to write repeatable Python workflows that run several agent steps, pass results between them, and handle batches of inputs.

In plain words
What is it for?
It helps build jobs such as analysing many files, running an implement-review-verify process, or repeating a task for different input directories.
Why use it?
It keeps multi-step work and repeated jobs in a script instead of requiring the same manual instructions each time. Writing the script and running it are separate actions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

CLI Agent Orchestrator is a tool that coordinates multiple AI coding command-line programs by running them as separate workers in isolated terminal sessions. A supervisor uses it to delegate software tasks to specialist agents in parallel or in sequence while the workers retain their normal command-line capabilities. The catalogue skills operate this orchestration workflow.

awslabs/cli-agent-orchestrator · 1,205 stars · on GitHub · awslabs.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/awslabs/cli-agent-orchestrator/cao-workflow
Any agent
npx skills add awslabs/cli-agent-orchestrator --skill cao-workflow
Clone the repo
git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cao-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/awslabs/cli-agent-orchestrator/cao-workflow.svg)](https://agentmods.dev/skills/awslabs/cli-agent-orchestrator/cao-workflow)
Your own site
<a href="https://agentmods.dev/skills/awslabs/cli-agent-orchestrator/cao-workflow"><img src="https://agentmods.dev/badge/skills/awslabs/cli-agent-orchestrator/cao-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,161 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.04161
Opus 5 $0.00039 $0.02080
Sonnet 5 $0.00016 $0.00832
Haiku 4.5 $0.00008 $0.00416

Measured 6d ago against content hash c10b1b1ab320, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cao-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cao-workflow/SKILL.md · 359 lines

How it starts

The opening of the file, as written. The whole thing — 359 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CAO Workflows

A CAO workflow is a Python script you write, validate, and — only after asking the user — run through cao workflow run. Each script drives one or more agent steps through CAO's shared substrate, so you can fan work out across agents, collect their results, and resume a run that was interrupted.

Your job as an author ends at a validated script file on disk. Authoring does NOT run the workflow. Never claim a workflow ran, or will run, when all you did was write it. Running is a separate step the user must approve (see Lifecycle step c).

When to use

Reach for this skill when the user asks to build or run a multi-step or parameterized workflow — for example:

  • "Analyze every file in reports/ and summarize the findings."
  • "Run a review pipeline: implement, then review, then verify."
  • "Do the same batch job but with a different input directory each time."

If the work is a single one-off agent call, you don't need a workflow. Workflows earn their keep when there are multiple steps, fan-out, parameterization, or a need to resume.

The script API

Author scripts import from the cao_workflow package. This package runs only in the script subprocess and imports nothing from cli_agent_orchestrator.* — it talks to CAO over HTTP. Its public surface:

  • step(provider, agent, prompt, *, recovery, step_id=None, timeout=None, **opts) -> StepHandle — run one agent step and declare what re-running it would mean. recovery is keyword-only with no default, so omitting it is a TypeError at the call. See "Declaring a recovery policy" below before you pick a value.
  • run_step(provider, agent, prompt, *, step_id=None, timeout=None, **opts) -> StepHandle — the same call, declaring no policy. That is the only difference between the two. A recovery= passed to run_step lands in **opts; the server validates it, the shim does not — see below.
  • StepHandle has five fields: .step_id, .terminal_id, .output, .status, and .replayed. .replayed qualifies .terminal_id. When it is True the server returned a stored result and ran nothing, and .terminal_id is the ORIGINAL id — it names a terminal that no longer exists. That flag is the only thing standing between you and reading, writing to, or waiting on a dead id, so check it before you touch .terminal_id.
  • get_inputs() -> dict — the run's resolved inputs (see Parameterized workflows). Returns {} when nothing was declared; never raises on absence.
  • emit_output(value) — print the run-level CAO_WORKFLOW_OUTPUT: sentinel (the run's return).
  • ShimError (and ShimIdentityError, ShimTransportError, ShimHTTPError) — the failure hierarchy step and run_step raise. Failures surface unchanged — the shim never retries.

Read the full file on GitHub · 359 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 359 lines · 79 tokens per session scan A c10b1b1ab320

Subscribe to this mod's changes

cao-workflow is a skill published in the GitHub repository awslabs/cli-agent-orchestrator (1,205 stars, last pushed yesterday), licensed Apache-2.0. It adds 79 tokens to every session and 4,161 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.