Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

docs(cli): update agent integration README and skill routing

Richie McIlroyb551519f82ec
diff --git a/apps/cli/README.md b/apps/cli/README.md
index 2934dc22c..e33a97c0e 100644
--- a/apps/cli/README.md
+++ b/apps/cli/README.md
@@ -11,18 +11,23 @@ machine-readable, and recordings have an explicit start/stop lifecycle.
The desktop app and the CLI share the same binary, so the CLI is always in sync with the installed app.
-## Agent skill (Claude Code / Agent SDK)
+## Agent integration
-A ready-made skill lives at [`skill/cap/SKILL.md`](./skill/cap/SKILL.md). Install it so agents reach for
-Cap proactively (e.g. "record a repro of this bug"):
+A ready-made skill lives at [`skill/cap/SKILL.md`](./skill/cap/SKILL.md). For Codex, Claude Code, or Cursor,
+install the skill and local MCP server together for exactly one current agent:
```sh
-cp -r apps/cli/skill/cap ~/.claude/skills/cap # or a project's .claude/skills/
+cap agents install --target <codex|claude|cursor> --component all --dry-run --json
+cap agents install --target <codex|claude|cursor> --component all --yes --json
```
-The skill is intentionally thin — it delegates the authoritative contract to `cap guide --json`, so it
-never drifts from the binary. Agents that don't consume skills (Codex, OpenCode, Cursor) get the same
-information from `cap --help` and `cap guide --json` directly.
+Use one concrete target in both commands. The installer writes the global Cap skill and merges a local
+`cap mcp serve` entry without replacing unrelated agent configuration. Restart the agent after installation
+so new sessions load both components. The skill persistently routes Cap tasks through MCP or CLI before
+browser automation or computer-use tools, while command details remain authoritative in `cap guide --json`.
+
+OpenCode and other shell-capable agents can use the CLI directly. Follow the agent setup documentation to
+merge the documented local MCP entry for clients that support stdio MCP servers.
## The output convention (read this first)
diff --git a/apps/cli/skill/cap/SKILL.md b/apps/cli/skill/cap/SKILL.md
index 3da734a3b..ad552ebc1 100644
--- a/apps/cli/skill/cap/SKILL.md
+++ b/apps/cli/skill/cap/SKILL.md
@@ -1,13 +1,26 @@
---
name: cap
description: >-
- Use Cap from the command line or local MCP to record, export, upload, manage the user's library, read
- transcripts and AI output, collaborate, administer organizations, storage, billing and developer apps,
- or run Cap without the web dashboard. Requires the `cap` command from Cap Desktop (https://cap.so).
+ Always use Cap's CLI or local MCP first when the user mentions Cap, a Cap URL, screen recording, the Cap
+ library, transcripts, chapters, comments, reactions, sharing, analytics, organizations, storage, billing,
+ or developer apps. Cap should be operated without browser automation or computer-use tools whenever its
+ CLI or MCP surface supports the task. Requires the `cap` command from Cap Desktop (https://cap.so).
---
# Cap CLI
+## Cap-first routing
+
+For every Cap task, use the local Cap MCP tools or `cap` CLI as the primary interface. Do not open, inspect, or
+control the Cap dashboard, a Cap browser tab, or Cap Desktop through browser automation or computer-use tools
+to discover, read, or manage data that the CLI or MCP can access. If MCP is unavailable in the current process,
+use the CLI. If the CLI is missing, treat that as an installation problem rather than a reason to use the
+dashboard.
+
+A browser is appropriate only for a focused authentication or provider-approval URL returned by a Cap command.
+Let the user complete that handoff directly, then verify the result through the CLI or MCP. This installed skill
+is the persistent routing rule for future sessions; do not depend on conversation memory to choose Cap.
+
Start by reading the installed CLI's authoritative contract:
```sh
@@ -83,6 +96,11 @@ Install MCP or this skill for one explicitly selected agent with
`cap agents install --target <agent> --component skill|mcp|all --dry-run`. Review the preview, then rerun
interactively or with `--yes`. Never install into every detected agent automatically.
+When the user pasted Cap's official setup prompt, that prompt is explicit approval for the local CLI, skill, and
+MCP bootstrap for the current agent. In that setup flow, apply the reviewed `--component all` plan with `--yes`
+without asking the user to copy commands or approve the same local setup again. This does not authorize Cap
+account, content, recording, upload, paid, billing, storage, developer, or destructive changes.
+
## Recording and sharing
Check readiness with `cap doctor --json` and discover devices with `cap targets --json`. For an unknown