# v42 CLI agent skill

> Install the optional v42-cli SKILL.md so your coding agent knows how to operate Vibe42 terminals, layouts, Workspaces, files, and copies from a shell.

Vibe42 ships a ready-to-use agent skill (`v42-cli`) that teaches coding agents how to operate Vibe42 from a shell using the `v42` CLI. Following Vibe42's [zero-injection policy](/docs/agents/zero-injection), Vibe42 never writes skills, hooks, or plugins into your agent directories on its own—installing the skill is completely optional and up to you.

## What the skill covers

The `v42-cli` skill (`SKILL.md`) gives a coding agent:

- **How to discover flags on demand**: Instructs the agent to treat `v42 --help`, `v42 <group> --help`, and `v42 <group> <command> --help` as the authoritative reference before calling commands.
- **Conventions**: The `{"ok":true,"data":...}` JSON output envelope, `jq` parsing, exit codes (including exit `2` for `confirmation_required` / `terminal_busy` and exit `8` for `wait_timeout`), `V42_AGENT_NAME` attribution, and `<computer>`, `<workspace>`, and `<target>` (`@N`, `%N`, `session:@N`) selectors.
- **Step-by-step workflows**:
  - Finding and closing idle terminals (`term list --idle`, `term close --idle --dry-run`)
  - Starting a coding agent in a Workspace and waiting for its turn (`agents list`, `term new --launcher`, `term wait --until`, `term read`)
  - Sending text, keys, and bracketed pastes (`term send`, `term read --history`)
  - Streaming terminal events (`term watch`)
  - Inspecting and arranging tabs and blocks (`layout show`, `tab`, `block`)
  - Working with remote files (`ls`, `stat`, `find`, `mkdir`, `rm`, `cp`, `sync`)
  - Managing isolated copies over the network (`copy ... --workspace ... --copy ...`)
  - Managing Workspaces and memos (`ws`, `memo`)
  - Seeing and controlling a Computer's desktop (`desktop screenshot`, `click`, `type`, `key`, `control`, `clipboard copy`)
- **Safety rules**: Never passing `--force` or `--yes` without explicit user permission, running `--dry-run` first, leaving other terminals alone, respecting busy/unknown terminal protections, using `term wait` instead of polling loops, and on the desktop never typing secrets or unlocking the screen unless the user asks.

## How to install `v42-cli`

The exact same `SKILL.md` file is available both from the `v42` binary (`v42 skill`) and over HTTPS at [`https://vibe42.ai/skills/v42-cli/SKILL.md`](https://vibe42.ai/skills/v42-cli/SKILL.md) (also listed in [`https://vibe42.ai/llms.txt`](https://vibe42.ai/llms.txt)).

### Option 1: From the installed `v42` CLI

```sh
mkdir -p ~/.claude/skills/v42-cli
v42 skill > ~/.claude/skills/v42-cli/SKILL.md
```

### Option 2: With `curl`

```sh
mkdir -p ~/.claude/skills/v42-cli
curl -fsSL https://vibe42.ai/skills/v42-cli/SKILL.md -o ~/.claude/skills/v42-cli/SKILL.md
```

For other coding agents (such as Codex CLI, OMP, Pi, OpenCode, or Cursor Agent), save the file to the user or project directory where that agent loads `SKILL.md` files (for example `.claude/skills/v42-cli/SKILL.md` inside a single repository).

## Separate skill for isolated terminals: `v42 copy skill`

In addition to `v42 skill` (which teaches an agent how to drive Vibe42 as a whole), `v42` includes a second, focused skill (`v42-copy`) for coding agents running *inside* a [terminal-isolation](/docs/workspaces/terminal-isolation) copy (`V42_COPY` is set):

```sh
mkdir -p ~/.claude/skills/v42-copy
v42 copy skill > ~/.claude/skills/v42-copy/SKILL.md
```

`v42 copy skill` explains how copy-on-write directories work, how to check status and diffs with `v42 copy status`, `v42 copy changes`, and `v42 copy diff`, how to save version snapshots (`v42 copy save -m "..."`) and push review branches (`v42 copy push --branch ...`), and that applying changes back to the main Workspace directory (`v42 copy apply`) is always the user's decision.
