Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
docs(cli): update Cap skill documentation
Richie McIlroy9c787418a9d3
diff --git a/apps/cli/skill/cap/SKILL.md b/apps/cli/skill/cap/SKILL.mdindex 606a2c75f..3da734a3b 100644--- a/apps/cli/skill/cap/SKILL.md+++ b/apps/cli/skill/cap/SKILL.md@@ -1,94 +1,99 @@---name: capdescription: >-- Record the screen, capture screenshots, and create shareable video links from the command line using- the Cap CLI. Use when the user wants to record a screen demo or bug repro, capture a screenshot of a- screen/window, produce a Loom-style shareable video link, or automate/script screen recording. Requires- the `cap` command to be installed (Cap Desktop, https://cap.so).+ 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).---# Cap CLI-`cap` is a command-line screen recorder built to be driven by agents. Every command takes `--json` for-machine-readable output on stdout; stderr stays human-readable; failures exit non-zero and, in `--json`-mode, print a final object/event with an `error` field.--**`cap guide --json` is the authoritative contract** (output convention, env vars, exit codes, and every-command's output mode + event tags). Prefer it over guessing, and `cap <command> --help` for flags.--## First: check it's available+Start by reading the installed CLI's authoritative contract:```sh-cap doctor --json+cap guide --json```-- If `cap` is not found, it isn't installed. Tell the user to install Cap Desktop from- https://cap.so/download, then enable the CLI (Settings → Command Line), or run- `curl -fsSL https://cap.so/install-cli.sh | sh` (Windows: `irm https://cap.so/install-cli.ps1 | iex`).-- Read `captureReady` and `permissions.screenRecording` from the output. On macOS, recording fails until- Screen Recording permission is granted in System Settings.+Use `--json` for machine-readable output. Treat stdout as authoritative, stderr as diagnostics, exit code+`1` as a runtime failure, and exit code `2` as invalid usage. Do not guess output schemas that are available+from `cap guide --json` or `cap <command> --help`.-## Discover capture targets+## Cap library-```sh-cap targets --json # screens, windows, cameras, mics-```+Authorize once with `cap auth login --json`. Login defaults to the least-privileged `creator` profile; request+`admin` or `full` only when the task requires it. Use `cap auth status --json` to verify the credential with the+server. For headless use, `CAP_AGENT_TOKEN` overrides the OS-stored credential. Existing Cap Desktop and+`CAP_API_KEY` credentials remain supported.-Use a screen's `id` (or a window's `id`) for `--screen`/`--window`, a camera's `deviceId` for `--camera`,-and a mic's `name` for `--mic`.+Use `cap caps list --json` for discovery, `cap caps get <id-or-url> --json` for lightweight metadata and+capabilities, and `cap caps context <id-or-url> --json` for title, AI title, summary, chapters, transcript,+comments, reactions, views, sharing, permissions, and processing state.-## Record (background lifecycle — the usual agent pattern)+`cap caps wait <id-or-url> --for transcript|ai|all --json` only observes existing processing. Reads and+waits must never be described as starting transcription, AI generation, or any paid work.-When you don't know the duration in advance: start detached, do the work, then stop.+Stream large content to disk:```sh-cap record start --screen <id> --json --detach # -> {"type":"started","recordingId","pid","path"}-# ... perform the actions to capture ...-cap record stop --id <recordingId> --json # -> {"type":"stopped","path","recordingMetaExists":true}-cap record status --json # list active sessions+cap caps transcript <id-or-url> --format text --output transcript.txt --json+cap caps download <id-or-url> --output recording.mp4 --json```-A `stopped` event is only a complete recording when `recordingMetaExists` is `true`.+For `PASSWORD_REQUIRED`, ask the user to run `cap caps unlock <id-or-url>` in a secure terminal. Never request a+password in an agent prompt, argument, JSON object, log, or MCP tool call.-Fixed-length alternative (no detach): `cap record start --screen <id> --duration 10 --json`.+Before any mutation, show the exact proposed action and obtain explicit user confirmation. This includes+posting or deleting content, changing metadata or visibility, starting paid processing, replacing transcripts,+moving or deleting Caps, changing membership or storage, creating checkout links, and rotating credentials.+Pass `--yes` or MCP `confirmed=true` only after that confirmation. Reads and waits do not require confirmation.-## Screenshot+## Dashboard-independent management-```sh-cap screenshot --screen <id> --path shot.png --json # -> {"path","width","height"}-```+Use `cap account`, `cap organizations`, `cap library`, `cap notifications`, `cap analytics`, `cap developers`,+and `cap jobs` for account, organization, sharing, storage, billing, analytics, developer, and asynchronous+operation workflows. Inspect each command's current arguments with `--help`; do not reconstruct them from this+skill.-## Export and share+Organization invites deliver email by default. Use `cap organizations invite add ... --no-email` only when the+user explicitly wants a link-only invite, and report the returned `emailDelivery` state.-```sh-cap project validate <path.cap> --json # confirm the recording is complete-cap export <path.cap> --output out.mp4 --json # render (here --format means container: mp4|gif|mov)-cap upload out.mp4 --json # -> {"type":"uploaded","id","link"}-```+Some secure or local-file actions are intentionally CLI-only: Cap passwords, S3 credentials, profile and+organization images, and newly issued developer credentials. Never ask the user to paste those values into+chat or an MCP call. Ask them to run the exact secure terminal command. S3 accepts hidden prompts or+`--credentials-stdin`, never credential arguments.-`cap upload` authenticates automatically by reusing the user's Cap Desktop login — check with-`cap auth status --json`. If it reports `authenticated:false`, tell the user to sign into Cap Desktop,-or set `CAP_API_KEY` (a Cap auth key from Settings) for headless use. `cap upload <path.cap> --export---json` exports then uploads in one step.+Stripe checkout, the billing portal, Google Drive authorization, and `cap account referrals` return a URL and+may open a browser. These are focused provider handoffs, not a dependency on the Cap dashboard. The agent may+continue after the user completes the handoff and should re-read state to verify the result.-## Automations+Use `cap jobs wait <operationId> --json` for durable operations. Do not infer success from an accepted or queued+response. Warn that `cap account sign-out-all` revokes every device and agent session, including the current CLI+credential.-Automations are `trigger -> (conditions) -> actions` rules authored in Cap Desktop (Settings →-Automations) and shared with the CLI. After `cap screenshot`, a `cap record` finish, and `cap upload`,-the CLI evaluates the matching rules and runs their actions (save to a folder, run a command, send a-webhook, export, etc.).+Use `cap caps import loom <url> --organization <id> --yes --json` for Loom imports. Organization managers may+add `--owner-email` and `--space` to perform CSV-style migrations one durable, idempotent row at a time. Wait for+the returned operation before treating the import as complete.-```sh-cap automations list --json # the rules the CLI will honor-```+## Local MCP++`cap mcp serve` is a stdio server; its stdout is protocol-only. Prefer MCP for structured reads, safe writes,+resource links, and browser-handoff URLs. Fall back to the CLI for secure-input and local-file actions.++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.-Desktop-only actions (copy to clipboard, OCR, notifications, open editor) are skipped on the CLI; all-others run. `cap doctor --json` reports the configured rule count under `automations`.+## Recording and sharing-## Conventions to rely on+Check readiness with `cap doctor --json` and discover devices with `cap targets --json`. For an unknown+duration, use the detached lifecycle:++```sh+cap record start --screen <id> --detach --json+cap record stop --id <recordingId> --json+cap project validate <path.cap> --json+cap export <path.cap> --output out.mp4 --json+cap upload out.mp4 --json+```-- Add `--json` to any command; it overrides each command's `--format`.-- Detect failure with a single check: the process exits non-zero and the JSON carries an `error` field.-- `record` and `export` stream newline-delimited JSON (NDJSON) events; everything else returns one object.-- `doctor`, `project validate`, and `recordings list` are reports — branch on their fields- (`ok`/`captureReady`, `valid`), not just the exit code.+A stopped recording is complete only when `recordingMetaExists` is `true`.