# offrouter-adapter-claude

Claude Code adapter for OffRouter. Installs into a Claude Code profile as a `UserPromptSubmit` hook with automatic rollback support.

## Install

```bash
npm install offrouter-adapter-claude
```

Then register with the CLI:

```bash
offrouter install claude --profile claude-personal
```

This writes the hook config into the profile's `~/.claude/claude-personal.json` and creates a rollback backup.

### How it works

OffRouter intercepts every `UserPromptSubmit` event, evaluates routing policy, and either routes to the selected provider or lets the Claude Code primary model handle it. The primary model is unchanged in V1 — OffRouter only routes delegated sub-tasks.

## Links

- [offrouter.com](https://offrouter.com)
- [GitHub](https://github.com/pooriaarab/offrouter)
- [Docs](https://offrouter.com/docs/quickstart.html)
