Agent skill
orca-cli
Use the Orca CLI to orchestrate worktrees and live terminals through a running Orca editor. Use when an agent needs to create, inspect, update, or remove Orca worktrees; inspect repo state known to Orca; or read, send to, wait on, or stop Orca-managed terminals. Coding agents should also keep the current worktree comment updated with the latest meaningful work-in-progress checkpoint whenever useful; this is an expected default behavior, not a special trigger-only action. Triggers include "use orca cli", "manage Orca worktrees", "read Orca terminal", "reply to Claude Code in Orca", "create a worktree in Orca", "update Orca worktree comment", or any task where the agent should operate through Orca instead of talking to git worktrees and terminal processes directly.
Install this agent skill to your Project
npx add-skill https://github.com/stablyai/orca/tree/main/skills/orca-cli
SKILL.md
Orca CLI
Use this skill when the task should go through Orca's control plane rather than directly through git, shell PTYs, or ad hoc filesystem access.
When To Use
Use orca for:
- worktree orchestration inside a running Orca app
- updating the current worktree comment with meaningful progress checkpoints
- reading and replying to Orca-managed terminals
- stopping or waiting on Orca-managed terminals
- accessing repos known to Orca
Do not use orca when plain shell tools are simpler and Orca state does not matter.
Examples:
- creating one Orca worktree per GitHub issue
- updating the current worktree comment after a significant checkpoint, such as reproducing a bug, validating a fix, or handing off for review
- finding the Claude Code terminal for a worktree and replying to it
- checking which Orca worktrees have live terminal activity
Preconditions
- Prefer the public
orcacommand first - Orca editor/runtime should already be running, or the agent should start it with
orca open - Do not begin by inspecting Orca source files just to decide how to invoke the CLI. The first step is to check whether the installed
orcacommand exists. - Do not assume a generic shell environment variable proves the agent is "inside Orca". For normal agent flows, the public CLI is the supported surface, but avoid wasting a round trip on probe-only checks when a direct Orca action would answer the question.
First verify the public CLI is installed:
command -v orca
Then use the public command:
orca status --json
If the task is about Orca worktrees or Orca terminals, do this before any codebase exploration:
command -v orca
orca status --json
If the agent truly needs to confirm that the current directory is inside an Orca-managed worktree, use:
orca worktree current --json
If orca is not on PATH, say so explicitly and stop or ask the user to install/register the CLI before continuing.
Core Workflow
- Confirm Orca runtime availability:
orca status --json
If Orca is not running yet:
orca open --json
orca status --json
- Discover current Orca state:
orca worktree ps --json
orca terminal list --json
-
Resolve a target worktree or terminal handle.
-
Act through Orca:
worktree create/set/rmterminal read/send/wait/stop
- When the agent reaches a significant checkpoint in the current worktree, update the Orca worktree comment so the UI reflects the latest work-in-progress:
orca worktree set --worktree active --comment "reproduced auth failure with aws sts; testing credential-chain fix" --json
Why: the worktree comment is Orca's lightweight, agent-writable status field. Keeping it current gives the user an at-a-glance summary of what the agent most recently proved, changed, or is waiting on.
Command Surface
Repo
orca repo list --json
orca repo show --repo id:<repoId> --json
orca repo add --path /abs/repo --json
orca repo set-base-ref --repo id:<repoId> --ref origin/main --json
orca repo search-refs --repo id:<repoId> --query main --limit 10 --json
Worktree
orca worktree list --repo id:<repoId> --json
orca worktree ps --json
orca worktree current --json
orca worktree show --worktree id:<worktreeId> --json
orca worktree create --repo id:<repoId> --name my-task --issue 123 --comment "seed" --json
orca worktree set --worktree id:<worktreeId> --display-name "My Task" --json
orca worktree set --worktree active --comment "reproduced bug; collecting logs from staging" --json
orca worktree set --worktree active --comment "waiting on review" --json
orca worktree rm --worktree id:<worktreeId> --force --json
Worktree selectors supported in focused v1:
id:<worktree-id>path:<absolute-path>branch:<branch-name>issue:<number>active/currentto resolve the enclosing Orca-managed worktree from the shellcwd
Terminal
Use selectors to discover terminals, then use the returned handle for repeated live interaction.
orca terminal list --worktree id:<worktreeId> --json
orca terminal show --terminal <handle> --json
orca terminal read --terminal <handle> --json
orca terminal send --terminal <handle> --text "continue" --enter --json
orca terminal wait --terminal <handle> --for exit --timeout-ms 5000 --json
orca terminal stop --worktree id:<worktreeId> --json
Why: terminal handles are runtime-scoped and may go stale after reloads. If Orca returns terminal_handle_stale, reacquire a fresh handle with terminal list.
Agent Guidance
- If the user says to create/manage an Orca worktree, use
orca worktree ..., not rawgit worktree .... - Treat Orca as the source of truth for Orca worktree and terminal tasks. Do not mix Orca-managed state with ad hoc git worktree commands unless Orca explicitly cannot perform the requested action.
- Prefer
--jsonfor all machine-driven use. - Use
worktree psas the first summary view when many worktrees may exist. - Use
worktree currentor--worktree activewhen the agent is already running inside the target worktree. - Treat
orca worktree set --worktree active --comment ... --jsonas a default coding-agent behavior whenever the agent reaches a meaningful checkpoint in the current Orca-managed worktree; the user does not need to explicitly ask for each update. - Update the worktree comment at significant checkpoints, not every trivial command. Good checkpoints include reproducing a bug, confirming a hypothesis, starting a risky migration, finishing a meaningful implementation slice, switching from investigation to fix, or blocking on external input.
- Write comments as short status snapshots of the current state, for example
debugging AWS CLI profile resolution,confirmed flaky test is caused by temp-dir race, orfix implemented; running integration tests. - Prefer optimistic execution over probe-first flows for checkpoint updates: if
orcais onPATH, callorca worktree set --worktree active --comment ... --jsondirectly at the checkpoint instead of spending an extra cycle onorca worktree current. - If that direct update fails because Orca is unavailable or the shell is not inside an Orca-managed worktree, continue the main task and treat the comment update as best-effort unless the user explicitly made Orca state part of the task.
- Use
orca worktree current --jsononly when the agent actually needs the worktree identity for later logic, not as a preflight before every comment update. - Orca only injects
ORCA_WORKTREE_PATH-style variables for some setup-hook flows, so they are not a general detection contract for agents. - Use
terminal listto reacquire handles after Orca reloads. - Use
terminal readbeforeterminal sendunless the next input is obvious. - Use
terminal wait --for exitonly when the task actually depends on process completion. - Prefer Orca worktree selectors over hardcoded paths when Orca identity already exists.
- If the user asks for CLI UX feedback, test the public
orcacommand first. Only inspectsrc/clior usenode out/cli/index.jsif the public command is missing or the task is explicitly about implementation internals. - If a command fails, prefer retrying with the public
orcacommand before concluding the CLI is broken, unless the failure already came fromorcaitself.
Important Constraints
- Orca CLI only talks to a running Orca editor.
- Terminal handles are ephemeral and tied to the current Orca runtime.
terminal waitin focused v1 supports only--for exit.- Orca is the source of truth for worktree/terminal orchestration; do not duplicate that state with manual assumptions.
- The public
orcacommand is the interface users experience. Agents should validate and use that surface, not repo-local implementation entrypoints.
References
See these docs in this repo when behavior is unclear:
docs/orca-cli-focused-v1-status.mddocs/orca-cli-v1-spec.mddocs/orca-runtime-layer-design.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
auto-pr-merge
Create PR, wait for checks, fix issues iteratively, and merge with --admin
react-useeffect
React useEffect best practices from official docs. Use when writing/reviewing useEffect, useState for derived values, data fetching, or state synchronization. Teaches when NOT to use Effect and better alternatives.
typescript
This skill should be used when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.
auto-submit
End-to-end autonomous pipeline that runs auto-review-fix, then auto-pr-merge
auto-review-fix
Automated iterative code review and fix loop with parallel review agents
electron
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.
Didn't find tool you were looking for?