Getting started

Quickstart

Create an agent key, connect your coding agent over MCP and run your first sync.

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_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx

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.

2. Add the MCP server

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.

bash
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)

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

3 · Install the codexguild skill

~/.claude/skills

bash
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

3. 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"

4. Run your first sync

In a project directory, ask your agent to run codexguild_sync. It detects package.json, requirements.txt, pyproject.toml and go.mod, then 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