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

> ## Agent Instructions
> Setting OneCLI up for your person? Follow https://onecli.sh/docs/quickstart.md. Never ask for or accept a key, token or password in the chat: OneCLI needs none.
> No OneCLI credential? Run `onecli connect`, or follow https://onecli.sh/auth.md. A person approves every new agent in their browser.
> Already connected? `onecli status`, `onecli items` and `onecli check <METHOD> <URL>` tell you what you can use. Full guide: https://onecli.sh/skill.md
> Search these docs over MCP at https://onecli.sh/docs/mcp. Report a wrong or unclear page with its `submit_feedback` tool.

# The OneCLI agent skill: skill.md

> What the OneCLI agent skill is, where it is served, what onecli attach installs, the gateway skill onecli run adds, and which one an agent should read.

The OneCLI skill is a short Markdown page for agents. It says what OneCLI is, how to connect, how to call an API through the gateway, and what to do when a call is held. It holds no key and nothing about your organization, so anyone may read it.

## Where to read it

| Address | What it is | Use it when |
| - | - | - |
| `https://api.onecli.sh/v2/skill` | The source. The API serves it with no credential, the same for every caller. | An agent reads the skill at run time, or you self-host: use your own API address. |
| `https://onecli.sh/skill.md` | The same page, served from the OneCLI site. | You hand an agent one short, memorable link. |
| `https://onecli.sh/docs/skill.md` | A copy of `/v2/skill` with skill frontmatter (`name`, `description`), synced into the docs by a script. | A tool loads skills from a docs site, or reads the docs MCP server. |

All three hold the same text. When they differ for a moment after a release, `/v2/skill` is the one that is right.

```bash theme={null}
curl -s https://api.onecli.sh/v2/skill
```

```text theme={null}
# OneCLI for agents

OneCLI gives an agent access to APIs without ever giving it a key. A person
puts their apps and keys in a vault. You connect to one vault. When you call
an API through the OneCLI gateway, the gateway adds the credential on the way
out. You never see, store or print one, and you never need to ask for one.
...
```

An agent that is not connected yet reads [Sign up as an agent](https://onecli.sh/docs/guides/agent-signup.md) (`auth.md`) first. The skill links the same steps.

## Install it with onecli attach

`onecli attach` puts the skill into an agent's own skills folder, so the agent loads it from its next start:

```bash theme={null}
onecli attach claude
```

It fetches `/v2/skill`, adds frontmatter named `onecli`, and writes it to the agent's skills folder, such as `~/.claude/skills/onecli/SKILL.md`. For Claude Code it also writes the proxy settings into `~/.claude/settings.json`. With no agent named, it attaches to every agent it finds in your home folder: `claude`, `cursor`, `codex`, `hermes`, `opencode` and `openclaw`. `onecli disconnect` undoes it.

Run `onecli attach` only in the place the agent runs, after it is connected. A coding agent that manages your vaults for you never attaches itself.

## The gateway skill that onecli run adds

`onecli run` installs a second, narrower skill named `onecli-gateway`. It tells an agent inside a session what to do when a tool reports a missing credential or a `401`: the gateway adds the key, so it should not start another sign-in flow.

* `onecli run` fetches it from `GET /v1/skill/gateway?agent_framework=<agent>`. Some agents get their own variant.
* It writes it to the agent's folder, such as `~/.claude/skills/onecli-gateway/SKILL.md`, and to `~/.onecli/skills/gateway.md`. The second path is in `ONECLI_GATEWAY_SKILL_PATH`, for any agent to find.
* When the fetch fails, `onecli` uses a copy built into the binary.

You don't install it yourself. It is active only when `HTTPS_PROXY` holds an agent credential, as it does under `onecli run`.

## Which to use

| You want to | Use |
| - | - |
| Teach an agent OneCLI once, in its own config | `onecli attach` |
| Start an agent session through the gateway | `onecli run -- <agent>`. It adds the gateway skill |
| Point an agent at OneCLI with a link | `https://onecli.sh/skill.md` |
| Read the skill from code, or on a self-host | `GET /v2/skill` on your API |
| Get a credential for an agent with none | [Sign up as an agent](https://onecli.sh/docs/guides/agent-signup.md) |

## Next steps

* [Docs MCP server](https://onecli.sh/docs/tools/docs-mcp.md)
* [CLI reference](https://onecli.sh/docs/cli/onecli-cli.md)
* [Coding agents](https://onecli.sh/docs/guides/coding-agents.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.