Agent Skill
Install the deeprelay skill into Claude Code, Codex or OpenCode so your agent can check quota, credit, usage and request logs, run models, and explain API errors through the deeprelay CLI.
The deeprelay skill teaches a coding agent — Claude Code, Codex or OpenCode —
to use your deeprelay account through the deeprelay CLI: check how much of
your plan is left (including the rolling 7-day windows), read your credit,
spend limits, usage and request log, run chat, embeddings, image and video
models, point other coding tools at deeprelay, and explain an API error when
a call fails. You install it with one command and then ask your agent in
plain English — "how much of my weekly quota is left?",
"why did that request fail?" — instead of looking up commands yourself.
What installs where
| What you get | The skill body — the operating rules, the read-only account commands and the inference commands — and reference files for account and billing detail, inference flags and the video lifecycle, and troubleshooting API errors |
| Supported agents | claude (Claude Code), codex, opencode, all, or auto — the default, which installs for every agent whose config directory already exists on this machine |
| Claude Code | A directory, ~/.claude/skills/deeprelay/, holding SKILL.md and a managed references/ directory |
| OpenCode | The same directory layout in ~/.config/opencode/skills/deeprelay/ (under $XDG_CONFIG_HOME when that is set) |
| Codex | A managed block in ~/.codex/AGENTS.md, between BEGIN deeprelay skill / END deeprelay skill markers |
| Authentication | None needed to install — deeprelay skill install only writes local files, so it works before deeprelay login |
Install
# Install for every coding agent already on this machine
deeprelay skill install
# Or target one explicitly (creates its config directory if needed)
deeprelay skill install --agent claude
deeprelay skill install --agent codex
deeprelay skill install --agent opencode
deeprelay skill install --agent all
Restart the agent afterwards so it picks up the new instructions.
Read it before you trust it. deeprelay skill show prints exactly what install
writes and nothing else, so you can review the rules your agent is about to
follow:
deeprelay skill show # SKILL.md, then each reference file
deeprelay skill show --agent codex # the managed block, byte-for-byte as installed
Reinstalling is how you upgrade, and it is safe to repeat: a newer CLI replaces
the skill and its whole references/ set (so a reference file an older
version shipped cannot linger next to current content), and for Codex it
replaces the managed block in place — anything you have written around it in
AGENTS.md is left untouched.
Upgrading from an older CLI. Earlier versions of this command installed a
different skill, which described a product deeprelay does not offer. The
current install cleans it up: installing for Claude Code or OpenCode removes
the old skill's files from ~/.claude/skills/ (and only those files — anything
you added there is kept), and installing for Codex replaces the old managed
block in AGENTS.md with the current one. Run deeprelay skill install once
after upgrading the CLI.
OpenCode reads ~/.claude/skills/ as well as its own directory, so with both
Claude Code and OpenCode installed it finds the skill in both places. The two
copies are identical.
Then give the agent credentials: deeprelay login (browser device flow — the
agent cannot do this for you) or a key in DEEPRELAY_API_KEY. The two checks
the skill makes before anything else are worth running once yourself:
deeprelay version # is the CLI on PATH?
deeprelay quota # auth probe — prints your plan meters when you are logged in
See the per-command reference: skill, skill install, skill show.
What the agent can do
- Answer account questions — plan quota left on each meter (monthly and rolling 7-day, input and output, plus the usage backstop), credit balance, spend limits, usage rollups, the request log, API keys and the plans on offer. These are read-only, so the agent runs them without asking.
- Run models — chat (including tool calling and structured output), embeddings, image generation, and video jobs from creation to download, after checking the model's price and whether your plan covers it.
- Set up coding tools —
deeprelay setupto point Claude Code, Codex, OpenCode and others at deeprelay. - Explain failures — reads the error code and tells you what it means and what will fix it: an exhausted plan window and when it frees up, a spend limit or key budget, a rate limit, or an upstream timeout worth retrying.
The reference files are the depth behind that list. Claude Code and OpenCode
load them on demand. The Codex managed block lives in a file Codex
size-limits and shares with your own notes, so it is written body-first under
a size budget: the operating rules are always present, and reference content
is included as far as the budget allows. Run deeprelay skill show --agent
codex to see exactly what your Codex block contains.
Built-in spending guardrails
An agent that can spend your credit is only useful if it cannot surprise you on the invoice. The skill's rules are part of the product, not a disclaimer:
- Every spend or account change is confirmed first. Before it runs a model, changes a plan, payment method, spend limit, API key or webhook, or writes a coding tool's config, the agent shows you the exact command and what it costs or changes — for a model call, the price and whether your plan covers it — and waits for an explicit yes. One yes covers one command.
- A number you never saw is not an approval. Telling the agent up front to skip the questions does not unlock a spend. It presents the command and its cost and waits for an answer that refers to what it showed you. Running somewhere it cannot get an answer at all, it reports the command and the cost and stops instead of spending.
- Video gets extra care. Video generation is never covered by a plan and is not stopped by your spend limits, so the agent quotes the clip length and price before asking.
- Your key stays secret. The agent never prints or stores your API key, and does not run the commands that would show it.
- Failures are read, not retried blindly. Many errors say a retry cannot succeed; the agent reads the code before trying again.
These rules live in exactly one place — the skill body shipped inside the CLI — and never in a reference file, so a reference file being left out of the Codex block can never weaken them.
Reading the skill without installing it
The skill content ships inside the deeprelay binary, so deeprelay skill show is the
supported way to read it on any machine that has the CLI — no authentication and
no agent config required:
deeprelay skill show > deeprelay-skill.md
A plain-markdown mirror of the same content, for reading or vendoring it without
the CLI at all, is in the works; it is derived from the same source, so it can
never disagree with what deeprelay skill install writes. This page will link it once
it is published.