Official agent skill

Cao Plugin

by awslabs in awslabs/cli-agent-orchestrator

Create a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator.

OfficialApache-2.0Auto-check: notesAgent Workflows

Install Cao Plugin

skills CLI
$ npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install awslabs/cli-agent-orchestrator cao-plugin --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cao-plugin .claude/skills/cao-plugin && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cao-plugin
GitHub stars
1.4k
Token cost
~3.1k tokens
SKILL.md length
1,255 words
Files
3 (incl. references)
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator.

  • Works in 12 steps: Package layout → Plugin class contract → Hook method contract → …
  • The user wants to add a plugin that reacts to CAO lifecycle
  • SKILL.md covers What You're Building, Before You Start, Hard Requirements and Step-by-Step Implementation, plus 3 more sections
  • Calls uv and python

What it does

Cao Plugin is an agent skill from awslabs/cli-agent-orchestrator, published by the product's own GitHub organization. Create a new CAO (CLI Agent Orchestrator) plugin. Use this skill whenever the user wants to add a plugin that reacts to CAO lifecycle or messaging events, scaffold a plugin package, understand plugin requirements, or integrate an external system (Discord, Slack, dashboards, logging, metrics) with CAO. Also use when the user asks what plugin events are available, how plugin discovery works, or how to install a plugin into a CAO environment.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/hook-events.md` and `references/plugin-template.md`).

It sits in Agent Workflows, covering Multi-agent orchestration. It works with Discord, Slack, Python and Model Context Protocol. The repository describes itself as: Multi-agent orchestration for AI coding CLIs — Claude Code, Kiro, Codex, and more, coordinated in isolated tmux sessions. The licence is Apache-2.0.

When your agent uses it

  • The user wants to add a plugin that reacts to CAO lifecycle
  • Messaging events
  • Scaffold a plugin package
  • Understand plugin requirements

Example prompts

  • “/cao-plugin”

Requirements

  • Python 3

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Package layout
  2. Plugin class contract
  3. Hook method contract
  4. Entry-point registration
  5. Build system
  6. Configuration
  7. Lifecycle guarantees
  8. Dispatch semantics
  9. Scaffold the package
  10. Implement the plugin class
  11. Pick events and write handlers
  12. Register the entry point

What it can do on your machine

Read from SKILL.md and the folder at commit b29f40a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cao Plugin loads about 3.1k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 114 tokens; SKILL.md has 1,255 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~114
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:123
    - **`.env` files** — use `python-dotenv` (`load_dotenv(find_dotenv(usecwd=True))`) inside `setup()`. Process-level env v
  • NoteMentions a .env fileSKILL.md:245
    - [ ] If using `.env`, is it in the directory where `cao-server` was launched (or a parent)?
  • NoteMentions a .env fileSKILL.md:263
    eference plugin (webhook forwarder with `.env` config, HTTP client lifecycle, unit tests).

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from awslabs/cli-agent-orchestrator at commit b29f40a, republished under its Apache-2.0 licence (© awslabs). 1,255 words, ~3,052 tokens.

Download SKILL.mdSave it as .claude/skills/cao-plugin/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cao-plugin
description
Create a new CAO (CLI Agent Orchestrator) plugin. Use this skill whenever the user wants to add a plugin that reacts to CAO lifecycle or messaging events, scaffold a plugin package, understand plugin requirements, or integrate an external system (Discord, Slack, dashboards, logging, metrics) with CAO. Also use when the user asks what plugin events are available, how plugin discovery works, or how to install a plugin into a CAO environment.

CAO Plugin Creator

Guide for creating a new CAO plugin. A "plugin" is a Python package installed alongside CAO that subscribes to CAO lifecycle and messaging events via typed async hooks.

What You're Building

A CAO plugin is a standalone Python package that:

  1. Subclasses CaoPlugin from cli_agent_orchestrator.plugins
  2. Registers async hook methods with @hook("<event_type>") decorators
  3. Is discovered via the cao.plugins Python entry-point group at cao-server startup
  4. Runs fire-and-forget — plugin exceptions are caught and logged as warnings, never propagated back into CAO

Typical uses: forwarding inter-agent messages to chat apps, logging/observability, external dashboards, metrics export, alerting on session or terminal lifecycle.

Before You Start

Gather this information:

  • Which events do you need? See references/hook-events.md for the full catalog.
  • Does the plugin need persistent state across events? (HTTP client, DB connection, buffer) — if so, use setup() / teardown().
  • How is it configured? v1 has no injected config API — read env vars in setup(), optionally via python-dotenv.
  • What are the failure semantics of your integration? Remember CAO swallows hook exceptions — you must decide whether to log, retry, or drop on your own.

Hard Requirements

These are the non-negotiable contracts a plugin must satisfy to be loaded and dispatched to. Verify each one before calling your plugin complete.

1. Package layout

Minimum viable layout:

my-cao-plugin/
├── pyproject.toml          # Build config + entry-point declaration
├── my_cao_plugin/
│   ├── __init__.py         # Can be empty
│   └── plugin.py           # Contains the CaoPlugin subclass
├── tests/                  # Optional but strongly recommended
│   └── test_plugin.py
├── env.template            # Optional; only if the plugin reads env vars
└── README.md               # Optional; install + config instructions for users

See examples/plugins/cao-discord/ in this repo for a complete reference implementation.

2. Plugin class contract
  • Must subclass CaoPlugin from cli_agent_orchestrator.plugins.
  • Must be zero-arg constructible — the registry instantiates plugins with cls(). Do NOT define __init__ with required parameters.
  • May override async def setup(self) -> None — called once at cao-server startup after instantiation.
  • May override async def teardown(self) -> None — called once at cao-server shutdown.
  • No other methods are required. Hooks are opt-in via the @hook decorator.

A raising setup() disables that plugin for the lifetime of the server process (warning logged, other plugins continue to load). A raising teardown() is logged and does not stop other plugins from tearing down.

3. Hook method contract

A hook method must:

  • Be async def — sync hooks are not supported in v1.
  • Be decorated with @hook("<event_type>") using the exact event-type string from references/hook-events.md.
  • Accept exactly one positional argument: the typed event dataclass matching that event type.
  • Return None.
  • Be a regular method on the plugin class (the registry discovers hooks via inspect.getmembers on the instance).

Multiple hook methods on the same plugin may subscribe to the same event type — each is dispatched independently. Execution order across hooks is not guaranteed.

Exceptions raised inside a hook are caught by the registry and logged as warnings. They do not affect CAO's primary operation and they do not stop other hooks for the same event from running.

4. Entry-point registration

Declare the plugin class under the cao.plugins entry-point group in pyproject.toml:

toml
[project.entry-points."cao.plugins"]
my_plugin = "my_cao_plugin.plugin:MyPlugin"
  • The key (my_plugin) is the plugin name used in CAO's startup log (Loaded CAO plugin: my_plugin). It has no other runtime effect.
  • The value must resolve to a class that is a subclass of CaoPlugin. Entry points whose target is not a CaoPlugin subclass are skipped with a warning.
  • A single package may declare multiple entry points under cao.plugins if it ships multiple plugin classes.

No CAO-side configuration is required to enable a plugin — installation plus entry-point declaration is sufficient.

5. Build system
  • Use hatchling as the build backend to match CAO's toolchain.
  • Target Python >=3.10.
  • Declare cli-agent-orchestrator as a runtime dependency so CaoPlugin, hook, and the event dataclasses are importable.
  • Declare any external libraries (e.g. httpx, aiohttp, python-dotenv) your plugin uses.

Minimal pyproject.toml:

toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "my-cao-plugin"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
    "cli-agent-orchestrator",
    # ... your plugin's deps
]

[project.entry-points."cao.plugins"]
my_plugin = "my_cao_plugin.plugin:MyPlugin"
6. Configuration

CAO does not inject configuration into plugins in v1. Options:

  • Environment variables — read inside setup() with os.environ.get(...). Raise RuntimeError with a clear message if a required var is missing so the startup log points the user at the misconfiguration.
  • .env files — use python-dotenv (load_dotenv(find_dotenv(usecwd=True))) inside setup(). Process-level env vars override .env values, which is the expected precedence.
  • Config files — load any path you like inside setup(); you own the format.

Ship an env.template alongside the plugin if it reads env vars, documenting every variable, whether it's required, and its default.

7. Lifecycle guarantees
  • setup() is awaited exactly once, after the plugin class is instantiated at server startup.
  • teardown() is awaited exactly once at server shutdown, only for plugins whose setup() succeeded.
  • There is no hot reload — changes to an installed plugin require restarting cao-server.
  • Event dispatch only happens after the underlying CAO operation succeeds (e.g. post_create_terminal fires after the terminal is persisted, not before).
  • There are no pre_* hooks today — you cannot veto or mutate an operation from a plugin.
Show full SKILL.md (507 more words)Show less
8. Dispatch semantics
  • All dispatch is async — hooks are awaited sequentially per event but no ordering is guaranteed across plugins or within a plugin.
  • No filtering API — every hook registered for an event type receives every event of that type; filter inside the handler if you need to.
  • No delivery guarantees beyond "invoked once per successful dispatch" — plugins are responsible for their own retries, buffering, and error handling.

Step-by-Step Implementation

Step 1: Scaffold the package

Create the layout from §1. Populate pyproject.toml per §5. references/plugin-template.md has a copy-paste skeleton.

Step 2: Implement the plugin class

In my_cao_plugin/plugin.py:

python
from cli_agent_orchestrator.plugins import CaoPlugin, PostSendMessageEvent, hook


class MyPlugin(CaoPlugin):
    async def setup(self) -> None:
        # Read config, open clients. Raise on misconfiguration.
        ...

    async def teardown(self) -> None:
        # Close clients, flush buffers. Safe to call after failed setup.
        ...

    @hook("post_send_message")
    async def on_message(self, event: PostSendMessageEvent) -> None:
        ...

Keep teardown() robust to partial setup() failures — guard any resource access with hasattr or an initialized flag. See examples/plugins/cao-discord/cao_discord/plugin.py for the pattern.

Step 3: Pick events and write handlers

Consult references/hook-events.md for the current event catalog, each event type's string, the matching dataclass, and available fields. Import event dataclasses from cli_agent_orchestrator.plugins.

Step 4: Register the entry point

Add the [project.entry-points."cao.plugins"] section to pyproject.toml per §4.

Step 5: Install into the CAO environment

The plugin must be importable by the same Python environment that runs cao-server.

bash
# Editable install into the CAO dev virtual environment
uv pip install -e ./my-cao-plugin

# Or, if CAO was installed as a tool:
uv tool install --reinstall cli-agent-orchestrator \
    --with-editable ./my-cao-plugin
Step 6: Verify the plugin loads

Restart cao-server and check the startup log for one of:

  • Loaded CAO plugin: my_plugin — success.
  • Failed to load plugin 'my_plugin' — setup() raised; check the traceback logged alongside.
  • Plugin entry point 'my_plugin' is not a CaoPlugin subclass, skipping — the entry-point target is wrong.
  • No CAO plugins registered (cao.plugins entry point group is empty) — the entry point is not declared, or the package was not installed into the same environment as CAO.
Step 7: Write unit tests

Unit tests for a plugin are straightforward because event dataclasses are zero-arg constructible:

python
import pytest
from cli_agent_orchestrator.plugins import PostSendMessageEvent
from my_cao_plugin.plugin import MyPlugin


@pytest.mark.asyncio
async def test_on_message_dispatches(monkeypatch):
    plugin = MyPlugin()
    await plugin.setup()
    await plugin.on_message(
        PostSendMessageEvent(
            sender="a",
            receiver="b",
            message="hi",
            orchestration_type="send_message",
        )
    )
    await plugin.teardown()

For plugins that make HTTP calls, use httpx.MockTransport (see examples/plugins/cao-discord/tests/test_plugin.py) rather than real network calls. Assert side-effects (requests sent, logs emitted) — do not assert CAO-side dispatch wiring, which is covered by CAO's own registry tests.

Install & Verify

Reload the plugin after code changes:

bash
# Stop cao-server, then reinstall if dependencies changed:
uv pip install -e ./my-cao-plugin --force-reinstall --no-deps
# Then restart cao-server.

Troubleshooting checklist if Loaded CAO plugin: does not appear:

  • Is the package installed in the same venv that runs cao-server? (uv pip list | grep my-cao-plugin)
  • Does pyproject.toml contain [project.entry-points."cao.plugins"]?
  • Does the entry-point value point to an actual CaoPlugin subclass? (python -c "from my_cao_plugin.plugin import MyPlugin; print(MyPlugin.__mro__)")
  • Did setup() raise? Check cao-server logs for a Failed to load plugin warning.
  • If using .env, is it in the directory where cao-server was launched (or a parent)?

File Checklist

When your plugin is complete, verify:

  • pyproject.toml — hatchling build backend, cli-agent-orchestrator dependency, cao.plugins entry point
  • my_cao_plugin/__init__.py — present (can be empty)
  • my_cao_plugin/plugin.py — CaoPlugin subclass with zero-arg construction and at least one @hook-decorated async method
  • env.template — if any env vars are read
  • tests/test_plugin.py — setup/teardown happy and failure paths; at least one test per hook method
  • README.md — install commands, config vars, troubleshooting
  • Plugin installs and shows Loaded CAO plugin: in cao-server startup logs

References

  • references/hook-events.md — Full catalog of supported event types, their string identifiers, and event dataclass fields.
  • references/plugin-template.md — Annotated minimal plugin skeleton.
  • examples/plugins/cao-discord/ — Complete reference plugin (webhook forwarder with .env config, HTTP client lifecycle, unit tests).
  • docs/feat-plugin-hooks-design.md — Full design document for the plugin system.

© awslabs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/cao-plugin of awslabs/cli-agent-orchestrator.

  • SKILL.md
  • references/hook-events.md
  • references/plugin-template.md

Open the folder on GitHubat commit b29f40a

Compare with similar skills

Cao Plugin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cao Plugin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cao Plugin this skillawslabs/cli-agent-orchestrator1.4k—~3.1kAutomated safety check: NotesApache-2.0
Agent Squad Python Guide2FastLabs/agent-squad7.8k—~4.7kAutomated safety check: PassApache-2.0
Soul Interviewldbumble/taskuary137—~1.4kAutomated safety check: PassMIT
Frontmcp Channelsagentfront/frontmcp146—~3.7kAutomated safety check: PassApache-2.0
Taskuary Setupldbumble/taskuary137—~1.5kAutomated safety check: PassMIT
Ops Inboxdavepoon/buildwithclaude3.6k—~7.2kAutomated safety check: NotesMIT

Similar skills

  • Agent Squad Python Guide

    2FastLabs/agent-squad

    Map of the agent-squad Python framework for async multi-agent orchestration: which agent, classifier, storage and tool provider to pick, and the pitfalls to avoid.

    7.8k GitHub stars~4.7k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Soul Interview

    ldbumble/taskuary

    Conduct a seven-question adaptive interview and turn the answers into Taskuary's SOUL.md.

    137 GitHub stars~1.4k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Frontmcp Channels

    agentfront/frontmcp

    A skill your agent uses when pushing real-time notifications or events into Claude Code (or another MCP client) sessions, or building two-way chat bridges.

    146 GitHub stars~3.7k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Taskuary Setup

    ldbumble/taskuary

    Walk the owner through setting Taskuary up - the AI brain, where work arrives, the operator documents, reports and workflows - by reading the install's real state and using the screens that already…

    137 GitHub stars~1.5k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Ops Inbox

    davepoon/buildwithclaude

    Full inbox management across all channels — WhatsApp (wacli), Email (Gmail MCP), Slack (MCP), Telegram (user-auth MCP), Discord (webhook + REST read), Notion (MCP — comments, mentions, assigned…

    3.6k GitHub stars~7.2k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check: notes
  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed

More from awslabs/cli-agent-orchestrator

All 14 skills in this repo
  • Cao MCP Apps

    awslabs/cli-agent-orchestrator

    Official

    Enable, operate, and extend CAO's MCP Apps surface — the host-rendered fleet dashboard visible inside MCP App hosts (Claude Desktop, ChatGPT, VS Code Copilot, Goose, Postman).

    1.4k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Agui Author

    awslabs/cli-agent-orchestrator

    Official

    Author live dashboard UI from an agent via the emitui MCP tool.

    1.4k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • MCP Apps Builder

    awslabs/cli-agent-orchestrator

    Official

    Load the official MCP Apps builder skills (create-mcp-app, migrate-oai-app, add-app-to-server, convert-web-app) from github.com/modelcontextprotocol/ext-apps.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Cao Provider

    awslabs/cli-agent-orchestrator

    Official

    Create a new CLI agent provider for CAO (CLI Agent Orchestrator).

    1.4k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Cao Agent Routing

    awslabs/cli-agent-orchestrator

    Official

    Find and select the best installed CAO agent profile for a task before delegating with assign or handoff.

    1.4k GitHub stars~552 tokensUpdated today
    Auto-check passed
  • Cao Contributing

    awslabs/cli-agent-orchestrator

    Official

    Contribute changes to the CAO (CLI Agent Orchestrator) codebase — the local dev loop, the CI gate map, and the pre-PR checklist.

    1.4k GitHub stars~4.1k tokensUpdated today
    Auto-check passed

Categories

Questions about Cao Plugin

What does Cao Plugin do?

Create a new CAO (CLI Agent Orchestrator) plugin. An agent skill from awslabs/cli-agent-orchestrator. Cao Plugin is an agent skill from awslabs/cli-agent-orchestrator, published by the product's own GitHub organization. Create a new CAO (CLI Agent Orchestrator) plugin.

When should I use Cao Plugin?

Cao Plugin fits situations like: the user wants to add a plugin that reacts to CAO lifecycle; messaging events; scaffold a plugin package; understand plugin requirements.

How do I install Cao Plugin in Claude Code?

Run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a claude-code`. Or copy the skill folder (skills/cao-plugin in awslabs/cli-agent-orchestrator) into .claude/skills/cao-plugin in your project. Claude Code loads it when a task matches its description.

How do I install Cao Plugin in Codex?

Run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a codex`. Or copy the skill folder (skills/cao-plugin in awslabs/cli-agent-orchestrator) into .agents/skills/cao-plugin in your project. Codex loads it when a task matches its description.

Can I use Cao Plugin in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add awslabs/cli-agent-orchestrator --skill cao-plugin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cao-plugin, .gemini/skills/cao-plugin, .github/skills/cao-plugin and .opencode/skills/cao-plugin in your project.

What does Cao Plugin need to run?

Going by SKILL.md and its folder, Cao Plugin needs the command-line tools its instructions call (uv and python). Our summary lists: Python 3.

Does Cao Plugin access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cao Plugin safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cao Plugin use?

Cao Plugin is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cao Plugin use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to Cao Plugin?

Skills that share tags, products or a category with Cao Plugin: Agent Squad Python Guide (2FastLabs/agent-squad, 7.8k stars), Soul Interview (ldbumble/taskuary, 137 stars), Frontmcp Channels (agentfront/frontmcp, 146 stars) and Taskuary Setup (ldbumble/taskuary, 137 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cao Plugin?

awslabs (a GitHub organization, an official publisher) maintains it in awslabs/cli-agent-orchestrator, which has 1,396 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.

Source: awslabs/cli-agent-orchestrator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.