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

# Set Up with Claude Code

> Install the Majordomo skills so Claude Code wires the gateway and library into your codebase for you.

Majordomo ships two open-source [Claude Code skills](https://docs.claude.com/en/docs/claude-code/skills). Install them and Claude Code will connect your code to Majordomo the right way — correct base URL, headers, metadata, and agent-run tracking — without you memorizing any of it.

<CardGroup cols={2}>
  <Card title="majordomo-gateway" icon="network-wired">
    Route **any** client through the gateway — the OpenAI or Anthropic SDK, curl,
    majordomo-llm, Pydantic AI, or Agno. Adds cost tracking, metadata attribution,
    and agent-run waterfalls. Works with Managed Cloud, self-hosted Steward, or the
    open-source gateway.
  </Card>

  <Card title="majordomo-llm" icon="python">
    Use the `majordomo-llm` Python library directly — text, JSON, structured Pydantic
    output, streaming, cost tracking, and provider cascade.
  </Card>
</CardGroup>

## Install

Skills live in a `skills/` directory in each project's repo. Copy the ones you want
into your personal skills folder (`~/.claude/skills/`) or a project's `.claude/skills/`.

<CodeGroup>
  ```bash Personal (all projects) theme={null}
  # Gateway skill — route any client through Majordomo
  git clone https://github.com/go-majordomo/majordomo-gateway /tmp/mdm-gateway
  cp -r /tmp/mdm-gateway/skills/majordomo-gateway ~/.claude/skills/

  # Library skill — use majordomo-llm directly
  git clone https://github.com/go-majordomo/majordomo-llm /tmp/mdm-llm
  cp -r /tmp/mdm-llm/skills/majordomo-llm ~/.claude/skills/
  ```

  ```bash Project (this repo only) theme={null}
  mkdir -p .claude/skills
  git clone https://github.com/go-majordomo/majordomo-gateway /tmp/mdm-gateway
  cp -r /tmp/mdm-gateway/skills/majordomo-gateway .claude/skills/
  ```
</CodeGroup>

Restart Claude Code (or start a new session) so it picks up the skills.

## Use it

Just describe what you want in plain language — the skills load automatically when a
task matches. For example:

* *"Route these OpenAI calls through Majordomo and tag them by feature."*
* *"Wire my Pydantic AI agent through the gateway and group each conversation into one run."*
* *"Add cost tracking to this script with majordomo-llm."*

Claude Code will ask which gateway you're running (Cloud, self-hosted, or open source),
read the relevant environment variables, and write the integration.

<Info>
  The skills are open source under the MIT license — read or fork them in the
  [majordomo-gateway](https://github.com/go-majordomo/majordomo-gateway) and
  [majordomo-llm](https://github.com/go-majordomo/majordomo-llm) repos.
</Info>
