Skip to main content
ClaudeWave
Skill1.2k repo starsupdated 2d ago

cao-memory

Store, recall, and forget durable facts with CAO memory — user preferences,

Install in Claude Code
Copy
git clone --depth 1 https://github.com/awslabs/cli-agent-orchestrator /tmp/cao-memory && cp -r /tmp/cao-memory/src/cli_agent_orchestrator/skills/cao-memory ~/.claude/skills/cao-memory
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# CAO Memory

CAO gives every agent a shared, persistent memory. A fact you store in one session is
available to a brand-new agent in a later session — even on a different provider. Use it so
the user never has to repeat themselves.

These are CAO's cross-provider memory tools (`memory_store`, `memory_recall`,
`memory_forget`), exposed by the CAO MCP server. They are **distinct from any
provider-native memory** the CLI tool may have.

## Scopes and types

Every memory has a **scope** (where it applies) and a **type** (what kind of fact it is).

| Scope | Applies to | Use for |
|-------|-----------|---------|
| `project` (default) | This repo / working directory | Conventions, architecture, build rules |
| `global` | Every project | User identity, durable cross-project preferences |
| `federated` | Every project on this machine | Reusable, repo-independent lessons worth sharing across all your work (rejects credentials) |
| `session` | This run only | Short-lived task context |
| `agent` | This agent role | Role-specific working notes |

**Types:** `project` (default), `user` (who the user is / preferences), `feedback`
(corrections and how-to-work guidance), `reference` (pointers to docs, tickets, URLs).

## Recall — check memory BEFORE asking the user

At the start of a task, and whenever you're about to ask the user something they may have
already told you, search memory first.

```
memory_recall(query="database widgets endpoint testing")
```

Omit `scope` to search all scopes (results follow precedence session → project → global → agent → federated).
Filter with `scope=` or `memory_type=` when you know where to look. Recall is for searching
*beyond* what was auto-injected (see below) — don't re-recall what's already in front of you.

## Store — save anything worth remembering, immediately

Store the moment you learn something durable. Don't wait until the end of the session.
**Store conclusions, not transcript.** Keep each memory to 1–2 sentences.

Store when you hit any of these:
- **A correction** — "No, we use DynamoDB here, not SQL." → store it so no agent makes that
  mistake again.
- **A decided convention** — "Every endpoint must have a pytest test before merge."
- **A user preference** — how they like work done, tools they prefer.
- **A non-obvious project constraint** — something you couldn't infer from the code.

```
memory_store(
    content="Use DynamoDB for widgets-api; never SQL.",
    scope="project",
    memory_type="project",
    key="widgets-database",          # optional; auto-slugged from content if omitted
)
```

Same `key` + `scope` upserts (updates in place) rather than duplicating.

### Share across all your projects — `scope="federated"`

When a lesson is durable **and not specific to this repo** — a reusable library gotcha, a
debugging trick, a tooling preference that holds everywhere — store it with
`scope="federated"` so it follows you into every project on this machine, not just this one.

```
memory_store(
    content="tmux paste-buffer needs `-p` or multi-line input loses bracketed-paste framing.",
    scope="federated",
    memory_type="reference",
)
```

Federated memories sit at the **lowest recall precedence** — a project-local fact with the
same key always wins — so federating is safe: it only adds a fallback, never overrides what's
true here. To un-share, `memory_forget(key=..., scope="federated")`.

- **Never federate secrets.** Tokens, keys, and passwords are **rejected automatically** on a
  federated write — and they'd be exposed to every project anyway. Keep credentials out of
  memory entirely.
- **When in doubt, use `project`.** Federate only what you're confident is reusable everywhere.

## Forget — remove what's wrong or superseded

```
memory_forget(key="widgets-database", scope="project")
```

Use this when a stored fact becomes outdated or was wrong. Prefer correcting (re-store with
the same key) over leaving stale facts in memory.

## Auto-injection (already happening)

On launch, CAO writes the most relevant memories for this working directory into the file
your CLI reads on startup (Claude Code: `.claude/CLAUDE.md`; Codex: `AGENTS.md`; Kiro:
`.kiro/steering/cao-memory.md`). So you usually begin a task already knowing the project's
key facts — `memory_recall` is for digging up anything that wasn't injected.

## Habits

1. **Recall before asking.** The answer may already be stored.
2. **Store the instant you learn something durable** — corrections, conventions,
   preferences, constraints.
3. **One fact per memory, 1–2 sentences.** Conclusions, not conversation.
4. **Pick the right scope:** user-wide → `global`; this repo → `project`.
aidlc-portfolioSkill

Coordinate multiple AI-DLC workflows across repositories and Git worktrees using an evidence-backed portfolio catalog and deterministic workspace tooling. Use when initializing an AI-DLC portfolio workspace, discovering organization or business context, registering projects and dependencies, creating child intents and worktrees, validating dispatch readiness, monitoring parallel AI-DLC sessions, or synthesizing cross-project outcomes.

agui-authorSkill

Author live dashboard UI from an agent via the `emit_ui` MCP tool. Emit

cao-agent-routingSkill

Find and select the best installed CAO agent profile for a task before

cao-learningSkill

Report task outcomes and distill lessons so the team improves across

cao-mcp-appsSkill

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). Use when the user says "enable MCP Apps in CAO", "the ui://cao views aren't rendering", "rebuild MCP Apps bundles", "add a new ui://cao/* view", or "configure the MCP Apps OAuth scope layer". Operates on the CAO_MCP_APPS_ENABLED surface and cao_mcp_apps/ build system. Not for the localhost:9889 browser dashboard, not for plugins, providers, or session management.

cao-pluginSkill

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-providerSkill

Create a new CLI agent provider for CAO (CLI Agent Orchestrator). Use this skill whenever the user wants to add support for a new CLI-based AI agent (e.g., a new coding assistant CLI), integrate a new provider, or scaffold a provider implementation. Also use when the user asks about the provider architecture, what files to modify, or how providers work in CAO.

cao-session-livenessSkill

Verify whether a CAO session is actually alive and what it really