Creates and removes Orca IDE worktrees with dedicated branches, agent tabs, and handoff files for parallel task isolation. Useful when splitting off work into separate contexts.
Ships in orca-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, Orca's CLI changed, or a workaround was needed: fix this file and the script immediately, don't defer. Only update for real, reproducible issues.
Use this when a task should continue in its own Orca worktree, with its own branch, sidebar entry and agent session, instead of in the current one. One command, scripts/orca-spinoff, does the whole spin-off and the clean removal. It follows Orca's bundled orca-cli guide (orca skills get orca-cli) and keeps to Orca's native model: worktrees, the built-in agent launcher, repos and projects, hosts, and paired runtimes. Everything here was observed on Orca 1.4.22x to 1.4.255 on Linux and macOS.
codex, gemini, …) through Orca's CLI and GUI, locally and on other devices through paired runtimes.bash, git, python3 and coreutils on macOS, Linux and BSD, so the same commands behave the same everywhere. The script also runs on stock macOS (/bin/bash 3.2, BSD userland) because it uses no GNU-only flags. It needs bash ≥ 3.2, git ≥ 2.20, python3 ≥ 3.9 and the Orca IDE CLI.orca repo add --path <checkout>), and its remote is reachable from the machine where you run the script.SPIN=<this skill's directory>/scripts/orca-spinoff # e.g. from the plugin cache
"$SPIN" create --name my-task --title "My task (issue #12)" \
--handoff ./handoff.md --display "My task: readable name" \
[--issue 12] [--comment "status"] [--link .venv] [--setup skip] [--surface terminal|chat] \
[--setup-timeout 600] [--keep-setup-tab] [--dry-run]
"$SPIN" remove --name my-task [--delete-remote-branch] [--force] [--dry-run]
--title: the prompt's first line. Orca labels the agent's row in the sidebar with it, so keep it short and specific.--handoff FILE: committed as docs/handoff/<file> (--handoff-dir) before the agent starts. The default prompt tells the agent to read it first; --prompt-file replaces the prompt body.--link PATH: symlinks a path of the main checkout into the worktree, for things that are not in git: .venv, node_modules, .env.--handoff and --prompt-file: relative paths are relative to your current directory, also inside a linked worktree.--base). Without a handoff or --base, the script omits --base-branch, so Orca uses the repo's default base, as Orca's orca-cli guide asks for independent top-level handoffs.--dry-run: for create and remove, runs every check (repo, remote, base, collisions, leftovers, unsaved work), prints the plan, and changes no branch or worktree. It may still git fetch.--surface terminal|chat: where the agent starts. Default: not passed, so the user's Chat | CLI setting for that agent decides, as Orca's orca-cli guide directs ("pass it only when the user asked for a chat or a terminal"); the output's surface says which started. chat starts it as an Orca chat tab; then terminal is empty and chat_session names the chat (rename it with orca chat rename --session <chat_session> --name …). Needs Orca 1.4.255 or later (orca worktree create --help lists --surface chat|terminal); on an older Orca the script refuses chat before calling Orca, and leaves the flag out for terminal. Not available on a paired runtime (below). Pass chat only when the user asked for a chat in so many words: "its own session" or "a chat session" in a request means a separate agent session, not Orca's chat surface (an agent read it as a chat on 2026-11-16, and the user, who works in terminal agents, had to have it moved).orca.yaml scripts.setup, or the script in the repo's Orca settings): Orca runs it in a tab of its own, and the script closes that tab once Orca reports exit status 0 (the Setup tab, below). --setup-timeout SEC (default 600) bounds the wait; a setup that fails or is still running keeps its tab, with its output, and is warned. --keep-setup-tab keeps it even on success. --setup skip (Orca's flag) does not run it at all.{"worktree", "path", "branch", "surface", "terminal", "chat_session", "agent_handle", "prompt_outcome", "terminals", "setup_tabs", "setup", "setup_exit", "setup_tab", "prompt_seen"}. setup is none (no setup expected), succeeded, failed, unfinished (still running at the timeout) or not_found (expected, but no Setup tab appeared within 30 s); setup_exit is the script's exit status as Orca reported it, or null; setup_tab is closed, kept or none. surface is what Orca actually started (terminal or chat, read from result.launch.outcome.kind, where a chat is structured), which can differ from the request: Orca falls back to a terminal for an agent without chat support, and the script warns with Orca's reason (receipt.detail). terminals is null if Orca could not list them, and for a chat. Progress and warnings go to stderr. The handoff is complete when prompt_seen is true: for a terminal, the prompt's title was read back from the tab; for a chat, Orca reported prompt.outcome journaled (or handed-to-terminal). Report the worktree and the terminal or chat to the user; do not wait for the new agent to finish.| Goal | Flags | Notes |
|---|---|---|
| This machine | none | Uses the repo registered at this checkout's path |
| A paired Orca runtime (another computer running Orca) | --environment <id> or --pairing-code <code> | orca environment list shows the ids; pair once with orca environment add --name <n> --pairing-code <code>. The repo is matched by its remote's owner/repo, because paths and SSH aliases differ per machine (an SSH-alias host on one side and github.com on the other do not match: pass --repo-id). The agent starts differently there; see below |
A host of a project (ssh:<id>, runtime:<id>) | --host <host> | orca host list. Uses --project (resolved from the repo) instead of --repo, as Orca requires |
| Ambiguous match | --repo-id <id> | From orca repo list --json on the target |
The handoff is staged on the forge (handoff/<name>, deleted after creation), so it reaches any device that can fetch the repository. On a paired runtime the base is named with that clone's own remote (Orca's gitRemoteIdentity.remoteName), and orca repo search-refs must find it there first; if that clone has not fetched yet, the script stops and removes the staging branch. Whether a worktree is on this machine is decided from Orca's data (--environment, or the row's hostId), never from whether its path exists here: two machines with the same user name have the same workspace paths. --link applies only when the worktree is on this machine. remove on another runtime or host removes the worktree there and leaves that machine's local branch for you to delete there. remove --host picks among same-named worktrees on several hosts.
On a paired runtime the built-in launcher is refused, so the agent is started in the worktree's own shell tab instead. worktree create --agent and agent launch against a runtime reached with --environment both fail with agent_launch_replay_unsupported (measured with the Orca 1.4.235 and 1.4.237 CLIs against a 1.4.237 runtime: the CLI does not advertise agent.launch.v2 to a remote runtime, which that call requires). The script then creates the worktree bare, types <agent> '<prompt>' into the one shell tab Orca opens there (terminal send, so there is still a single tab), and titles it after the agent. Three differences follow: the remote Orca's agentDefaultArgs are not applied (a shell alias or wrapper still is, since it is that machine's interactive shell); the prompt cannot be read back from the tab, so prompt_seen is false and the script says so instead of waiting; and Claude Code asks its folder-trust question unless that machine already trusts the repository (see the pitfalls).
orca worktree create --agent <id> --prompt … is the only path to a single agent tab.settings.agentDefaultArgs) in a login shell, so aliases and wrappers apply. It titles the tab after the agent, attaches Orca's agent-status hooks, and submits the prompt at launch: no wait-then-send race.worktree create opens a fallback shell; adding the agent later with terminal create --command … gives two tabs, a raw command as the title, and a prompt that is lost if sent before the TUI is ready.--setup run, or the repo's setupRunPolicy run-by-default, Orca's default), Orca opens a shell tab with the pane title "Setup" a few seconds after worktree create returns. It types bash -lc '<worktree git dir>/orca/setup-runner.sh'; status=$?; printf '\n__ORCA_SETUP_COMPLETE__:<run id>:%s\n' "$status"; exit "$status" into that shell. The exit ends only the inner bash -lc, so the tab's own shell stays open beside the agent's, for good: that is the second tab users see. orca terminal wait --for exit therefore never fires for it, and worktree create's JSON carries no setup receipt. The script waits up to 30 s for the tab, reads its output (terminal read, the tail preview) until the marker line appears, takes the status from it, and closes the tab with orca terminal close on 0. Orca stays the one that decides whether and what to run (its policy, its approval of the script), so nothing of Orca's setup logic is copied. Where the tab's own process ends instead, terminal wait --for exit gives the exit code. setup_tabs counts what is left.handoff/<name> from a temporary worktree outside Orca, and pushed. Orca creates the worktree from that ref; the staging branch is then deleted (the new branch contains it). The branch's recorded base (branch.<b>.base) is reset to the real base. If any step fails, a trap removes the staging branch and the temporary worktree.settings.branchPrefix = git-username, Orca names the branch <forge login>/<name>. The prefix follows the live remote: a forge Orca does not recognise gives a plain <name>. Tell the agent its real branch (git branch --show-current) if the handoff names another.worktree create has no display-name flag, so the script follows with orca worktree set --display-name.--no-parent by default, so the task is a top-level entry and an independent concern. Pass --parent active for stacked work. --activate is off by default, so your current view is not switched; the new entry appears in the sidebar at once.orca worktree rm is asynchronous (removing: true), so the script waits for the folder to disappear. Orca deletes the branch only when it equals the worktree name, so the script deletes a prefixed branch itself. Without --force it refuses if there are uncommitted changes, untracked files (other than the links it made), or commits on no remote branch. Ignored files (.venv, build output) are deleted with the folder. The main worktree is never matched, and names are checked against Orca's complete listing (--repo, no truncation; hosts it could not reach are reported).A paired runtime's clone fetches after the push, not at it (measured 2026-11-23, Orca 1.4.25x). The script checked orca repo search-refs for the staged handoff branch once, right after pushing it, and stopped with "the target runtime's clone has no ref …" twice, even while that clone ran git fetch every 3 s. It now asks again every 3 s for up to SPINOFF_REF_WAIT seconds (default 60). If the clone never fetches by itself, run git fetch there during that minute.
The prompt's title is read without spaces (measured 2026-11-16, Claude Code under Orca 1.4.255). orca terminal read returns the accumulated stream, which drops the spaces a full-screen agent draws by moving the cursor (orca terminal read --help). The tab held Probe2:Setuptabclose for the title "Probe 2: Setup tab close", so the check reported prompt_seen: false and waited 90 s although the agent had the prompt. The comparison now ignores whitespace on both sides.
A chat launch is not a terminal (measured 2026-11-10, Orca 1.4.255). Orca's worktree create --agent follows the user's Chat | CLI setting for that agent. Before --surface was passed, a user with Chat selected got a chat, and the script warned "0 terminals … expected the agent's tab", waited 90 s for the prompt's title in a terminal that did not exist, and returned "terminal": "" and "prompt_seen": false, although the chat had started and read its handoff. The script now reads the result's launch.outcome ({"kind": "structured", "sessionId", "handle", "tabId"} for a chat, {"kind": "terminal", "handle"} for a terminal) and launch.prompt.outcome, as Orca's orca-cli guide describes.
orca may not be Orca. On Linux desktops, /usr/bin/orca is often the GNOME screen reader. The script uses $ORCA_CLI if set, else an orca whose help mentions worktree create, else the IDE's own CLI: ~/.config/orca/linux-orca-cli-shim/orca on Linux, /Applications/Orca.app/Contents/Resources/bin/orca on macOS.
A broken macOS CLI link. If orca fails with "Unable to determine Orca.app path from symlink", the link it runs is unreadable (for example a root-owned /usr/local/bin/orca with mode lrwx------). Without sudo, a user-owned link earlier on PATH fixes it: ln -s /Applications/Orca.app/Contents/Resources/bin/orca ~/.local/bin/orca.
Forge features need a real host in the remote URL. Orca treats a remote host without a dot (git@work-alias:owner/repo) as an unresolved SSH alias, or as a self-hosted forge called by that name. Its tasks, PR links and branch prefix then stay off or fail. Keep the real host in the URL and pin the key per repository: git config core.sshCommand 'ssh -i ~/.ssh/<key> -o IdentitiesOnly=yes'.
Orca caches the remote identity. It probes the remote when the repo is added (orca repo show → gitRemoteIdentity, orca project list → providerIdentity). A corrected URL takes effect after an Orca restart, at a moment when no agent session is mid-task.
Claude Code's folder trust is per repository root, not inherited from a parent folder. A worktree of a repository whose root is not trusted on that machine stops at "Is this a project you created or one you trust?", even when a parent folder such as ~/orca/workspaces is trusted (measured 2026-10-22). Orca's own launcher passes trust for you; on the paired-runtime route, trust the repository root once on that machine (~/.claude.json → projects.<repo root>.hasTrustDialogAccepted, or answer the question once). The same machine also asks "Do you want to use this API key?" when a key in the environment is not in customApiKeyResponses.approved; never answer that one blind, because the default is No.
Removing a repository or deleting its folder leaves its terminal tabs open. After a repo was removed from Orca (orca repo list empty, orca worktree list empty) and its folders deleted, orca terminal list still returned its tabs, the sidebar showed them under "Unknown", and their shells sat in the deleted folder. Starting Claude Code in one fails with "The current working directory was deleted" (measured 2026-10-22, on a paired runtime). Once the worktree is gone, orca terminal close --worktree … --all returns selector_not_found, so close each tab by handle: orca terminal close --terminal <handle> --tab. Clean up in this order: tabs first, then the worktree (remove above), then the repo.
Sign-in waits on the keyring. Orca's forge sign-in reads the system keyring. A locked keyring (on Linux, an "Unlock Login Keyring" dialog) leaves the sidebar on "Refreshing sign-in" and forge views empty.
A repo added while the sidebar's Projects filter is active stays hidden. orca repo add registers the repo (orca project list shows it) but does not add it to the filter, an explicit allowlist (ui.filterRepoIds in Orca's profile state), so the sidebar never shows it (measured on Orca 1.4.245). No CLI command changes the filter: open the sliders button beside "Projects" ("Workspace options (N filters active)") → Projects → "Add project…" and pick the repo. Prove it from Orca's state rather than the command's ok: the repo id is in ui.filterRepoIds and the sidebar's accessibility tree (orca computer get-app-state --query <name>) has the project row.
Orca's GitHub views use the default gh account. Orca runs /opt/homebrew/bin/gh (macOS) with gh's active account, not a per-folder wrapper or GH_CONFIG_DIR (observed: gh repo view github.com/<owner>/<repo> started by the Orca process). A repo that only a second account can see gets "Could not resolve to a Repository", and its PR and task views stay empty. Bind the repo to that account in Settings → the repo → GitHub Account (Refresh GitHub accounts, then pick it); Orca then passes gh auth token --user <account> as GH_TOKEN. The account must be logged in to gh's default config from the keyring (gh auth status lists it, inactive is fine); environment-token accounts are refused. The CLI exposes no flag for this binding (orca repo set sets only worktree visibility).
The new worktree runs a new agent session. Sessions are filed per folder. Continuity comes from the committed handoff and the repository, so put the previous session's transcript path in the handoff if details may be needed.
Talking to the agent:
orca terminal send --terminal <handle> --text "…" --enter;orca terminal read --terminal <handle> --cursor 0 --json;orca terminal close --all deletes resume records.Visual check (optional): take a screenshot and read it.
grim -s 0.6 shot.png.import -window root shot.png.screencapture -x shot.png.Expect the display name in bold, the branch below it, and one agent row labelled with the prompt's title.
After this skill completes, check before closing:
orca worktree create --help, orca skills get orca-cli), update the script and the tables here to match.Only update if the issue is real and reproducible, not speculative.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/floating-terminalThe default terminal for an AI coding agent running under the Orca IDE (macOS and Linux) - run any command that needs a person or a real TTY (Touch ID, a password manager's desktop-app integration, a passkey, sudo, an interactive prompt, a long visible run) in Orca's own floating terminal through Orca's CLI, and get the command's REAL exit code and output back as JSON. Use instead of opening iTerm, Terminal.app, gnome-terminal or any osascript/open-launched window, and instead of asking the person to paste a command into their shell. TRIGGERS - run this in a terminal, needs Touch ID, needs a TTY, interactive command, op signin, sudo prompt, open a terminal, floating terminal, Orca terminal, run where I can see it, human in the loop command./full-width-artifactPublish a Markdown or HTML file as an Orca artifact (share.onorca.dev link) that uses the FULL browser width, with no fixed-width column and no hard line breaks. Orca renders a Markdown artifact through its own template, which caps the page at a fixed pixel width, so a bare `orca artifacts share report.md` always gives a narrow page. The script renders Markdown to full-width HTML with pandoc, repairs uploaded HTML, publishes (keeping the same link when re-published), then fetches the served page to prove it is still full width. Use for any report, explainer or page shared through Orca artifacts. TRIGGERS - orca artifact, share an artifact, share.onorca.dev, publish a report to Orca, orca artifacts share, artifact full width, artifact narrow column, artifact too narrow, page width, no hard wrap.Other plugins' skills for the same job
/orca-tools:worktree-spinofffrom orca-tools
npx claudepluginhub terrylica/cc-skills --plugin orca-tools