> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r3al.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Coding agents

> Use R3AL from Claude Code and other coding agents.

The CLI exists partly so coding agents can quantize models without importing a
Python library. The package ships an agent skill describing the workflow, the
flags, and how to read the errors, so an agent does not have to infer any of it.

## Install the skill

The skill ships inside the Python package, so installing it needs nothing but
pip:

```bash theme={null}
pip install r3alai
r3al skill install --agent claude      # or codex, or cursor
export R3AL_API_KEY=r3l_live_...
```

`r3al skill --path` prints where the bundled copy lives if you would rather
copy it yourself, and `--dest` installs to an explicit directory.

<Note>
  This is the supported route. The R3AL SDK repository is private, so
  `/plugin marketplace add R3AL-AI/SDK` only works for accounts with access to it —
  an external tester following an earlier version of this page hit "repository not
  found" and had to reconstruct the skill by hand.
</Note>

## How your plan is protected

An agent that retries a failing command could otherwise spend several runs
before anyone notices. Two independent layers prevent that.

<Steps>
  <Step title="The skill pre-approves only free commands">
    Its `allowed-tools` list covers `methods`, `validate`, `inspect`, `usage` and
    `benchmark`. `quantize` and `qat` are deliberately absent, so invoking either
    requires your explicit approval in the moment.
  </Step>

  <Step title="The CLI refuses unconfirmed spending">
    Even when approved, `quantize` and `qat` validate locally and then exit `6`
    unless `--yes` is present. The skill instructs agents not to add `--yes`
    without telling you what it costs, and never to set `R3AL_ASSUME_YES`.
  </Step>
</Steps>

An agent can therefore iterate freely on the free commands — including composing
and correcting a `quantize` invocation — at zero cost, and cannot spend a run
behind your back.

## What the skill teaches

A `SKILL.md` entrypoint with the workflow and core principles, plus reference
documents loaded only when relevant:

| Reference            | Covers                                                                  |
| -------------------- | ----------------------------------------------------------------------- |
| `cli.md`             | every flag, the exit-code table, JSON output shapes                     |
| `calibration.md`     | how much data, what makes a good set, what to do when the user has none |
| `qat.md`             | when to escalate from PTQ, and how to read the fidelity figures         |
| `troubleshooting.md` | an error catalogue keyed by exit code                                   |

Two behaviours worth knowing, because they shape what an agent will do:

* **It will ask you for calibration data** rather than proceeding without it. The
  CLI refuses to substitute random tensors, and the skill explains why, so a
  well-behaved agent asks instead of working around it.
* **It will benchmark before claiming success.** `benchmark` is free and local,
  and the skill treats an unmeasured quantization as a guess.

## Other agents

The plugin manifest targets Claude Code. The skill itself is a plain directory of
markdown, so it can be installed manually into any agent that reads skills from a
directory:

```bash theme={null}
r3al skill --path        # prints the bundled skill's directory
r3al skill install --dest /path/to/your/agent/skills
```

## Without the plugin

Nothing about the CLI requires it. An agent with shell access can use `r3al`
directly — `--json` for parseable output and the exit codes for branching are
what make that workable. See the [command reference](/cli/commands).
