---
title: Using Hexclave with AI
description: Teach your coding agent how to use Hexclave — via web fetch, an installable skill, or the Hexclave MCP server.
sidebarTitle: Using Hexclave with AI
---
import { hexclaveAgentRemindersText } from "/snippets/hexclave-agent-reminders.jsx";
{hexclaveAgentRemindersText}
This page is for giving your own coding agent (Claude Code, Cursor, Codex, opencode, …) ongoing knowledge of Hexclave so it writes Hexclave code correctly.
If you would like to use Hexclave to power your own CLI, see the [CLI Authentication](/guides/apps/authentication/cli-authentication) page.
There are three ways to give a coding agent working knowledge of Hexclave. They differ only in how the instructions reach the agent — the knowledge is the same.
Paste a one-line prompt — your agent fetches the live skill on demand.
Install the Hexclave `SKILL.md` file so your agent loads it automatically.
Connect your agent to the Hexclave MCP server for live docs and `ask_hexclave` search.
## Option 1: Web fetch (recommended)
Most coding agents now support web fetch out of the box, so you can simply tell your agent to use Hexclave's skill from the internet.
To do so, paste the prompt below into your coding agent:
````markdown title="One-shot prompt"
Fetch https://skill.hexclave.com and follow it for this task.
````
The fetched `SKILL.md` indexes the entire Hexclave docs sidebar and tells the agent to pull fresh content for whichever surface you're touching (auth, orgs/teams, payments, emails, analytics, the CLI). It is purely a reference — paste it whenever you want the agent to use Hexclave knowledge.
## Option 2: Skill
Install the skill once so your agent loads it automatically every time Hexclave is relevant — no copy-paste required.
The fastest way to install the Hexclave skill for a Claude Code-style agent or similar:
```sh title="Terminal"
npx -y skills add hexclave/hexclave --skill stack-auth
```
This detects your agent and installs the skill in the correct location (per-project or global) automatically. From then on, your agent picks it up whenever the conversation touches Hexclave.
If your agent can't run the `npx` command above, paste the prompt below into the chat. The agent will fetch `SKILL.md` and drop it into the right location for your agent — per-project if a project-scoped agent folder exists, global otherwise.
````markdown title="Skill install prompt"
Install the Hexclave skill (`SKILL.md`) for me so you load it automatically on future Hexclave tasks. The canonical file lives at:
https://raw.githubusercontent.com/hexclave/hexclave/dev/skills/hexclave/SKILL.md
These are the same install locations the `skills` CLI (https://github.com/vercel-labs/skills) uses — match them exactly so the file is picked up the same way.
Do this in one shot using smart defaults; only stop to ask a single multiple-choice question at the end if I want to change anything.
1. **Detect the agent.** Identify which coding agent is running you (Claude Code, Codex, Cursor, opencode, Windsurf, Roo, Kilo, Amp, Antigravity, Cline, Continue, Crush, Augment, etc.). If you genuinely can't tell, default to Claude Code.
2. **Pick the default scope.** Look for an existing agent folder in the current project root: `.claude/`, `.agents/`, `.cursor/`, `.codex/`, `.opencode/`, `.windsurf/`, `.roo/`, `.kilocode/`, `.augment/`, `.continue/`, `.crush/`, etc.
- If any such folder exists → default to **project** scope.
- Otherwise → default to **global** scope.
3. **Resolve the install directory.** Write `SKILL.md` to `/stack-auth/SKILL.md`, where `` comes from this table (mirrors `vercel-labs/skills/src/agents.ts`):
| Agent | Project `` | Global `` |
| --- | --- | --- |
| Claude Code | `.claude/skills` | `~/.claude/skills` (or `$CLAUDE_CONFIG_DIR/skills`) |
| Codex | `.agents/skills` | `~/.codex/skills` (or `$CODEX_HOME/skills`) |
| Cursor | `.agents/skills` | `~/.cursor/skills` |
| opencode | `.agents/skills` | `~/.config/opencode/skills` (XDG) |
| Windsurf | `.windsurf/skills` | `~/.codeium/windsurf/skills` |
| Amp | `.agents/skills` | `~/.config/agents/skills` (XDG) |
| Antigravity | `.agents/skills` | `~/.gemini/antigravity/skills` |
| Cline | `.agents/skills` | `~/.agents/skills` |
| Roo Code | `.roo/skills` | `~/.roo/skills` |
| Kilo Code | `.kilocode/skills` | `~/.kilocode/skills` |
| Augment | `.augment/skills` | `~/.augment/skills` |
| Continue | `.continue/skills` | `~/.continue/skills` |
| Crush | `.crush/skills` | `~/.config/crush/skills` |
For any agent not listed, follow its documented skills directory or fall back to `.agents/skills` (project) / `~/./skills` (global).
4. **Install.** Download `SKILL.md` once to a stable cache location — `~/.cache/stack-auth/SKILL.md` (or `$XDG_CACHE_HOME/stack-auth/SKILL.md`) — then create a **symlink** at `/stack-auth/SKILL.md` pointing to that cached file. Create missing parent directories. If the target path already exists, replace it (overwrite the symlink, or back up and replace a regular file). Symlinking means future re-installs at additional scopes/agents reuse the same source file, and re-running the prompt after an update to the cached file picks up automatically. If the platform doesn't support symlinks (e.g. Windows without dev mode), fall back to copying the file verbatim.
5. **Confirm and offer alternatives.** Print the absolute symlink path and the cache target it points to. Then ask me a single multiple-choice question covering anything I might want to change, e.g.:
```
Installed Hexclave skill at → . Want to change anything?
a) Keep it — done
b) Also symlink at the opposite scope ()
c) Install for a different agent instead
d) Symlink into additional agents too
```
Only act on whichever letter I pick. Don't pre-ask before the first install. Additional installs just create more symlinks pointing at the same cached `SKILL.md`.
Installing the file is the only goal of this prompt — do not act on the skill's contents yet.
````
## Option 3: MCP
The Hexclave MCP server (`https://mcp.hexclave.com/mcp`) gives your agent live access to Hexclave docs and skill via prompts, resources and an `ask_hexclave` tool that searches the docs with citations. Install it once per agent — it stays available across every project.
Opens Cursor and adds `stack-auth` to your MCP config.
Opens VS Code and adds `stack-auth` to your MCP config.
For the up-to-date list of one-click install buttons for every client (Cursor, VS Code, Claude Desktop, Windsurf, ChatGPT, Gemini, …), visit [`mcp.hexclave.com`](https://mcp.hexclave.com) in your browser.
Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):
```json title="mcp.json"
{
"mcpServers": {
"stack-auth": {
"url": "https://mcp.hexclave.com/mcp"
}
}
}
```
```sh title="Terminal"
claude mcp add --transport http stack-auth https://mcp.hexclave.com/mcp
```
```sh title="Terminal"
code --add-mcp '{"type":"http","name":"stack-auth","url":"https://mcp.hexclave.com/mcp"}'
```
```sh title="Terminal"
codex mcp add stack-auth --url https://mcp.hexclave.com/mcp
```
Or add to `~/.codex/config.toml`:
```toml title="config.toml"
[mcp_servers.stack-auth]
url = "https://mcp.hexclave.com/mcp"
```
```json title="mcp.json"
{
"mcpServers": {
"stack-auth": {
"serverUrl": "https://mcp.hexclave.com/mcp"
}
}
}
```
Add to `~/.gemini/settings.json`:
```json title="settings.json"
{
"mcpServers": {
"stack-auth": {
"httpUrl": "https://mcp.hexclave.com/mcp",
"headers": {
"Accept": "application/json, text/event-stream"
}
}
}
}
```
For Claude Desktop, ChatGPT, and copy-paste markdown blocks you can drop into your project README, visit [`mcp.hexclave.com`](https://mcp.hexclave.com).
If your agent can edit its own config, paste this prompt:
```markdown title="MCP install prompt"
Install the Hexclave MCP server for me. The server URL is https://mcp.hexclave.com/mcp (HTTP transport).
Detect which coding agent I'm using and add the server to the correct config file:
- Claude Code → run `claude mcp add --transport http stack-auth https://mcp.hexclave.com/mcp`
- Cursor → `~/.cursor/mcp.json`
- VS Code → run `code --add-mcp '{"type":"http","name":"stack-auth","url":"https://mcp.hexclave.com/mcp"}'`
- Codex → `~/.codex/config.toml`
- opencode → `~/.config/opencode/opencode.json`
- Gemini CLI → `~/.gemini/settings.json`
If this repo already has a project-scoped MCP config (`.cursor/mcp.json`, `.vscode/mcp.json`, `.claude.json`, `.codex/config.toml`, etc.), install it there instead of the global location.
After installing, confirm by listing the registered MCP servers.
```
## Project vs. global scope
The install prompts above follow the same rule for picking project-vs-global scope:
| Detected in project root | Skill / MCP install scope |
| --- | --- |
| `.claude/`, `.cursor/`, `.vscode/mcp.json`, `.codex/`, `.opencode/` | **Project** (inside the existing folder) |
| None of the above | **Global** (user-level config for the detected agent) |
This keeps shared repos clean (project-scoped config lives next to the code) and keeps your personal projects ergonomic (one global install, available everywhere).