> For the complete documentation index, see [llms.txt](https://docs.doma.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.doma.xyz/agentic-commerce/agentroot/discover-and-use.md).

# Discover & Use Skills

This page walks through installing AgentRoot in your AI agent, resolving a domain's published records, and installing a skill into your agent's local skills folder.

## Install AgentRoot in your agent

Three options depending on how your agent loads tools:

### Option 1: As a CLI

```bash
npm install -g agent-root
agent-root --version
```

Then call `agent-root resolve <domain>` directly, or wrap it in a tool definition for your agent.

### Option 2: As an MCP server

Add AgentRoot to your agent's MCP config. The exact location varies per tool:

| Tool           | Config file                                                       |
| -------------- | ----------------------------------------------------------------- |
| Claude Code    | `~/.claude.json` (`mcpServers` block)                             |
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Cursor         | `~/.cursor/mcp.json`                                              |
| Codex CLI      | `~/.codex/mcp.json`                                               |

Generic config snippet:

```json
{
  "mcpServers": {
    "agent-root": {
      "command": "npx",
      "args": ["-y", "agent-root", "mcp"]
    }
  }
}
```

After restart, the agent has access to `agentroot_resolve`, `agentroot_install_record`, and `agentroot_list` tools.

### Option 3: As a library

```bash
npm install @agentroot/core
```

Use programmatically when building your own agent or backend integration.

## Resolve a domain

Discover what a domain offers:

```bash
npx agent-root resolve doma.xyz
```

Sample output:

```json
{
  "domain": "doma.xyz",
  "records": [
    { "type": "skill", "id": "doma-protocol", "name": "Doma Protocol", "skill_md": "..." },
    { "type": "skill", "id": "doma-mpp",      "name": "Doma MPP",      "skill_md": "..." },
    { "type": "skill", "id": "secondary-sales", "name": "Secondary Sales", "skill_md": "..." },
    { "type": "skill", "id": "trade-tokens",  "name": "Trade Tokens",  "skill_md": "..." },
    { "type": "agent", "id": "doma-mpp-payment", "endpoint": "https://mpp.doma.xyz" }
  ]
}
```

This is the same data the agent uses internally to decide which skill to install for a given user intent.

## Install a skill

Pick a record by `id` and install it:

```bash
npx agent-root install doma.xyz/trade-tokens
```

Where the skill lands depends on which agent tool is detected first on `PATH` / config:

| Tool                         | Skill install path                          |
| ---------------------------- | ------------------------------------------- |
| Claude Code / Claude Desktop | `~/.claude/skills/doma.xyz/trade-tokens/`   |
| Cursor                       | `~/.cursor/skills/doma.xyz/trade-tokens/`   |
| Codex CLI                    | `~/.codex/skills/doma.xyz/trade-tokens/`    |
| Gemini CLI                   | `~/.gemini/skills/doma.xyz/trade-tokens/`   |
| OpenCode                     | `~/.opencode/skills/doma.xyz/trade-tokens/` |

Force a specific tool with `--tool=<name>`:

```bash
npx agent-root install doma.xyz/trade-tokens --tool=cursor
```

## List installed skills

```bash
npx agent-root list
```

Output shows skill ID, source domain, install path, and verification status.

{% hint style="info" %}
Skills are downloaded to disk and become part of your agent's runtime context. They update only when you re-install them; there is no auto-refresh. Re-run `agent-root install` after a publisher updates their `SKILL.md`.
{% endhint %}

## Verify the install in your agent

After installing, prompt your agent with one of the skill's trigger phrases (listed in each skill's [reference page](/agentic-commerce/skills.md)). For example, after installing `trade-tokens`:

{% hint style="info" %}
**Example prompt:** Buy 10 USDC worth of `<token-name>` token.
{% endhint %}

The agent should pick up the trigger, follow the workflow encoded in `SKILL.md`, and walk you through prerequisites + execution.

## What's next

* [Zone File Reference](/agentic-commerce/agentroot/zone-file-reference.md): understand what's in the JSON the resolver returns.
* [Publish Your Own](/agentic-commerce/agentroot/publish-your-own.md): author a zone for your own domain.
* [Skills](/agentic-commerce/skills.md): reference pages for the three skills Doma publishes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.doma.xyz/agentic-commerce/agentroot/discover-and-use.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
