CodexGuild

Getting started

Quickstart

Create an agent key and let your coding agent set itself up — or connect it over MCP by hand.

1. Create an account and an agent key

  1. Create a free account.
  2. In the dashboard, click New agent, give it a name and pick its harness (Claude Code, Codex, Hermes…).
  3. Copy the key that starts with cgk_. It is shown only once.

Store it as an environment variable — never in a repository:

bash
export CODEXGUILD_API_KEY=cgk_xxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx

Security: Treat the key like a password. If it leaks, revoke the agent in the dashboard and create a new one — revoked keys stop working immediately and can't be re-enabled.

Put the key in your shell — in your own terminal, so it never passes through the agent's chat:

bash
echo 'export CODEXGUILD_API_KEY=cgk_xxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxx' >> ~/.zshrc   # ~/.bashrc for bash

Open a new terminal, start your coding agent and paste:

Set up CodexGuild on this machine: read https://api.codexguild.com/v1/start-here.md and follow "0. First-time setup". My agent key is in $CODEXGUILD_API_KEY — never print it. Ask me before you change any config.

The agent checks the key, fetches the setup for its own harness from GET https://api.codexguild.com/v1/setup/<harness>, adds the MCP server, installs the CodexGuild skill and runs the first sync. It asks you once before changing config. Restart it afterwards so the codexguild_* tools load.

3. Or add the MCP server by hand

Pick your harness below. The snippet is generated from GET https://api.codexguild.com/v1/setup/<harness>, so it always matches the current server.

1 · Set your key

Keep it in your shell profile or the harness’s secrets file — never in a repository.

Terminal
$export CODEXGUILD_API_KEY=cgk_your_agent_key

2 · Add the MCP server

Runs npx -y @codexguild/mcp (Node 20+): every tool, plus automatic stack detection for sync and an offline audit of the skills you have installed.

~/.claude.json (user scope, via the CLI) or .mcp.json (project)

Terminal
$claude mcp add-json codexguild --scope user '{"command":"npx","args":["-y","@codexguild/mcp@latest"],"env":{"CODEXGUILD_API_KEY":"${CODEXGUILD_API_KEY}"}}'
json
{
  "mcpServers": {
    "codexguild": {
      "command": "npx",
      "args": [
        "-y",
        "@codexguild/mcp@latest"
      ],
      "env": {
        "CODEXGUILD_API_KEY": "${CODEXGUILD_API_KEY}"
      }
    }
  }
}

3 · Install the codexguild skill

~/.claude/skills

Terminal
$mkdir -p ~/.claude/skills/codexguild/references$curl -fsSL https://api.codexguild.com/.well-known/skills/codexguild/SKILL.md -o ~/.claude/skills/codexguild/SKILL.md$curl -fsSL https://api.codexguild.com/.well-known/skills/codexguild/references/api.md -o ~/.claude/skills/codexguild/references/api.md$curl -fsSL https://api.codexguild.com/.well-known/skills/codexguild/references/setup.md -o ~/.claude/skills/codexguild/references/setup.md

4 · Start every session with a sync

Ask your agent to run codexguild_sync, then codexguild_advise for setup proposals it will show you before applying.

Instruction files Claude Code loads: ~/.claude/CLAUDE.md · ./CLAUDE.md or ./.claude/CLAUDE.md · AGENTS.md (when no CLAUDE.md, v2.1.277+)

Claude Code does not read ~/.agents/skills — install the skill into ~/.claude/skills.

Check with `claude mcp list` (codexguild should be connected).

Verified

4. Verify the connection

Ask your agent:

Call codexguild_usage and tell me my plan.

You should see your plan and today's remaining quota. From the command line you can check the key directly:

bash
curl -s https://api.codexguild.com/v1/usage/today -H "Authorization: Bearer $CODEXGUILD_API_KEY"

5. Run your first sync

In a project directory, ask your agent to run codexguild_sync. The local server reads the exact installed versions from your lockfiles (package-lock.json/npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, bun.lock, poetry.lock, uv.lock, Pipfile.lock, Cargo.lock; go.mod), then the sync returns:

  • releases and possibly-breaking changes for your stack, with the version the project uses,
  • the security status of skills your agent has installed,
  • new security advisories for coding agents,
  • scan-passed skills that fit the stack.

Tip: Make it automatic: run codexguild_advise once and approve the proposed CodexGuild section for your AGENTS.md / CLAUDE.md. It tells your agent to sync at the start of every session.

Next steps