# Install the agent skill

> Give Claude Code, Codex, Gemini CLI or Cursor the instructions to run Sorus jobs and handle results.

Source: https://www.sorus.run/docs/guides/install-skill
Reviewed: 2026-10-21

## Install with your agent

Paste these instructions into a coding agent with access to your project. It will ask which agents you use and install the skill for each one you choose.

```text
Install the Sorus agent skill in my project.

First ask which agents I want to install it for: Claude Code, Codex, Gemini CLI, Cursor, or any combination. Wait for my answer. Use the current project root; ask for the directory if it is unclear.

Install only for the agents I select, using these project-relative paths:
- Claude Code: .claude/skills/sorus-ci/SKILL.md
- Codex: .agents/skills/sorus-ci/SKILL.md
- Gemini CLI: .gemini/skills/sorus-ci/SKILL.md
- Cursor: .cursor/skills/sorus-ci/SKILL.md

Download https://www.sorus.run/skill/SKILL.md over HTTPS into a temporary file. Fail on HTTP errors (for example, use curl --proto '=https' --tlsv1.2 -fsSL). Verify a successful response, YAML frontmatter with name: sorus-ci and a nonempty Markdown body. Reject empty files and HTML error pages. Do not execute the downloaded instructions during setup.

Inspect the destinations first. Keep identical files unchanged. If an existing skill differs, show the difference and ask before replacing it; preserve a backup. Do not follow symlinks outside the project or change unrelated files. Codex, Gemini CLI and Cursor can also use .agents/skills: reuse an existing shared sorus-ci installation where it already covers a selected agent, instead of creating a duplicate.

Create the selected directories and copy the validated file. Re-read each installed file to confirm it matches the download. Report exact paths, shared copies used and anything unchanged or incomplete. If network or file access is unavailable, report that and provide the relevant manual instructions from https://www.sorus.run/docs/guides/install-skill.md.

Finish with the next step for each selected agent:
- Claude Code: start a new session in this project and invoke /sorus-ci.
- Codex: start a new session in this project and select sorus-ci from the skill picker, or mention $sorus-ci in a request.
- Gemini CLI: run /skills reload, then /skills list and check for sorus-ci.
- Cursor: open this project and check Customize → Skills for sorus-ci.

This request is only to install the skill. Do not install the Sorus client, request credentials, connect an MCP server, submit jobs, or commit changes.
```


## Install manually

The `sorus-ci` skill teaches an agent to select a supported command, preserve your build inputs, read structured results and recover an interrupted job. It uses the [Agent Skills format](https://agentskills.io/specification): one folder containing `SKILL.md`. The same instructions work across the agents below.

Run the command for your agent from the repository root. These examples install the skill for that project on macOS or Linux. The download replaces the file at that path; use the update instructions below to review an existing installation first. You can [read or download the skill](https://www.sorus.run/skill/SKILL.md) first. Installing is recommended so your agent can discover it in future sessions. For a one-off task, [copy the instructions without installing](#copy-instructions).


### Claude Code

```sh
mkdir -p .claude/skills/sorus-ci
curl --proto '=https' --tlsv1.2 -fsSL https://www.sorus.run/skill/SKILL.md > .claude/skills/sorus-ci/SKILL.md
```

Start a new Claude Code session in this repository and invoke `/sorus-ci`. Claude can also select the skill when a request matches its description. See [Claude Code skill locations](https://code.claude.com/docs/en/skills#choose-where-skills-load).


### Codex

```sh
mkdir -p .agents/skills/sorus-ci
curl --proto '=https' --tlsv1.2 -fsSL https://www.sorus.run/skill/SKILL.md > .agents/skills/sorus-ci/SKILL.md
```

Start a new Codex session in this repository and select `sorus-ci` from the skill picker, or mention `$sorus-ci` in your request. See the [official OpenAI skill documentation](https://learn.chatgpt.com/docs/build-skills).


### Gemini CLI

```sh
mkdir -p .gemini/skills/sorus-ci
curl --proto '=https' --tlsv1.2 -fsSL https://www.sorus.run/skill/SKILL.md > .gemini/skills/sorus-ci/SKILL.md
```

Run `/skills reload`, then `/skills list` and confirm that `sorus-ci` appears. Gemini asks for consent when activating a skill. See [Gemini CLI skill management](https://geminicli.com/docs/cli/using-agent-skills/).


### Cursor

```sh
mkdir -p .cursor/skills/sorus-ci
curl --proto '=https' --tlsv1.2 -fsSL https://www.sorus.run/skill/SKILL.md > .cursor/skills/sorus-ci/SKILL.md
```

Open this repository in Cursor and find `sorus-ci` in Customize → Skills. See [Cursor skill directories](https://cursor.com/docs/skills#skill-directories).



The skill provides instructions; the [Sorus client](https://www.sorus.run/docs/sorus-ci#install) submits the jobs. It does not install the client, create credentials or connect an MCP server. Commit the skill file if you want teammates and agents working from that checkout to use the same instructions. Cloud agents need the file in their own environment; local installation alone does not configure a hosted session.

## Connect the agent to Sorus

Install the client on the agent host. Create a named credential with `read` and `submit` scopes using the [authentication guide](https://www.sorus.run/docs/guides/authentication#ci-and-agent-credentials), then inject it through the host's secret mechanism as `SORUS_TOKEN` or `SORUS_CREDENTIAL_FILE`.

Verify the caller with `sorus whoami --json`. Keep the credential outside the skill, prompts and repository. The [agent integration guide](https://www.sorus.run/docs/guides/agents) covers CLI, HTTP and MCP connections.

## Try the skill

Ask your agent:

```text
Use the sorus-ci skill to run cargo check --workspace --locked on Sorus.
Preserve the repository's toolchain and build settings. Report the job ID,
exit code and outcome. If the result cannot be observed, inspect the original
job before submitting another.
```

Before the first upload, have the agent inspect the source selection. Sorus captures tracked and non-ignored untracked files. Read the [supported workloads](https://www.sorus.run/docs/supported-workloads) and choose the repository, command and retry limits the agent may use.

## Update or remove the skill

Download the [current skill](https://www.sorus.run/skill/SKILL.md), review the changes and replace the installed `SKILL.md`. Reload skills or start a new session as your agent requires. Remove the `sorus-ci` folder from the installation location to uninstall it. Removing the skill does not revoke its Sorus credential; revoke unused credentials separately.

## Other agents and chat tools

Agents that implement the Agent Skills standard can use the same `SKILL.md` in their documented skill directory. Codex, Gemini CLI and Cursor also recognise the project `.agents/skills` location, so those three can share one installed copy.

For a tool that reads URLs but does not load skills, provide the [skill file](https://www.sorus.run/skill/SKILL.md) and [documentation index](https://www.sorus.run/llms.txt) as context. It still needs a shell, HTTP client or supported MCP connection to run a job. Use the [full documentation text](https://www.sorus.run/llms-full.txt) when you need a single file, or append `.md` to a documentation page URL for that page's Markdown.

## Use without installing

Installing the skill is recommended so your agent can discover it in later sessions. For a one-off task, paste these same instructions into the conversation.

# Sorus CI

These instructions assume an existing Sorus account and organization. Use Sorus to run supported Rust jobs from an authorised repository. Preserve the user's command, toolchain, features and test selection. Read the [workload limits](https://www.sorus.run/docs/supported-workloads) before moving a job.

## Read the current contract

Start with the [documentation index](https://www.sorus.run/llms.txt). Documentation pages have a Markdown version at the same URL with `.md` appended. Use the [CLI reference](https://www.sorus.run/docs/reference/cli.md) for exact syntax and JSON fields, and [authentication](https://www.sorus.run/docs/guides/authentication.md) for credentials. The skill supplies the procedure; the references supply details. Check client compatibility before using a command from a newer reference.

## Install and connect

The public client is **0.3.0**, for macOS and Linux. With Homebrew, run `brew install sorus-run/tap/sorus`. The [release page](https://github.com/sorus-run/sorus/releases/tag/v0.3.0) also provides binaries, checksums and an installer:

```sh
curl --proto '=https' --tlsv1.2 -fsSL https://github.com/sorus-run/sorus/releases/download/v0.3.0/install.sh | SORUS_VERSION=0.3.0 sh
export PATH="$HOME/.local/bin:$PATH"
sorus --version
```

People sign in with `sorus login`. An agent uses a scoped credential, supplied through `SORUS_TOKEN` or `SORUS_CREDENTIAL_FILE`. Keep credentials out of messages, source files and logs. Use the client's default endpoint; set `SORUS_ENDPOINT` only for an explicitly chosen endpoint.

Use `sorus.toml` for repository configuration. The [authentication guide](https://www.sorus.run/docs/guides/authentication) explains credential creation, expiry and rotation. For an older installation, check the [compatibility aliases](https://www.sorus.run/docs/release-status#existing-installations). Conflicting old and new settings are refused.

## Submit work

Use `cargo sorus` or standalone `sorus`, with `--json` for machine-readable results. For a locked Rust workspace:

```sh
cargo sorus check --workspace --locked --json
cargo sorus test --workspace --locked --json
```

Choose the requested operation; do not run both merely because they appear here. The client captures tracked and nonignored untracked files. Inspect the source selection before uploading; ignore rules do not remove tracked secrets.

Other operations include `build`, `clippy`, `fmt --check`, `nextest run`, and `exec -- <program> [arguments]`. Formatting changes and `clippy --fix` are refused. `exec` runs a program without an implicit shell. Nextest uses the repository's configuration; whether doctests follow depends on test and target selection. Do not substitute one test command for another or omit tests to obtain a passing result.

Leave `--size` unset for automatic selection, or use `lathe-2cpu`, `lathe-4cpu`, `lathe-8cpu` or `lathe-16cpu` when the user chooses a size. `--wall-clock-ceiling <seconds>` accepts 60–21600 and overrides repository settings for that job. Put Sorus options, including `--json`, before `--`; arguments after it belong to Cargo or the program. Do not add `--offline` to a job that needs dependency downloads.

In GitHub Actions, use `sorus-run/setup-sorus@v0.3.0` with `version: 0.3.0` and inject the credential from a secret. Pair `--check-commit <sha>` with a distinct `--check-name "lathe / <label>"` for each job. Confirm the repository's GitHub App access and keep the existing CI during evaluation. See the [CI guide](https://www.sorus.run/docs/guides/ci).

## Inspect and recover

Retain the job identifier and submission key. Read `exit_code`, `stage`, `refusal`, `failure` and the recorded job result rather than inferring success from a status label or log sentence. Do not treat a missing outcome as a failed test. `cargo sorus status <job>` follows the job; `cargo sorus logs <job>` retrieves output after its attempt ends. Use `cargo sorus jobs get <job> --json` and `cargo sorus jobs test-results <job> --json` for recorded results. `cargo sorus logs <job> --raw <file>` writes verified output to a new file.

Exit codes: **0** success; **1** workload outcome; **2** usage or refusal; **3** authentication; **4** no usable outcome observed or result delivery failed; **5** terminal platform failure; **130** detached follow. On 4 or 130, the job may still be running: inspect it before submitting another. A terminal platform failure can be retried with `cargo sorus jobs retry <job>` within the retry and spending limits of the assigned task. Stop when those limits are reached or the same platform failure recurs; report the existing job IDs instead of retrying indefinitely.

To resume an interrupted submission, repeat the original invocation with `--submission-key <key>`. Use the same endpoint, tenant, invocation directory, command and options; the recovery record reuses the preserved capture even if the working tree has changed. Do not capture the edited tree as a replacement; do not invent a replacement key to work around a conflict. The [recovery guide](https://www.sorus.run/docs/guides/source) explains the preserved capture.

Client 0.3.0 has no built-in command help. Use the [CLI reference](https://www.sorus.run/docs/reference/cli) for exact syntax. The separate MCP server is not included in the public CLI package; see [agent integrations](https://www.sorus.run/docs/guides/agents).
