# Build with AI

> Give your AI coding agent the Mediux docs and integration rules, so what it builds follows them.

AI coding agents build better integrations when they read the right docs first.
Mediux publishes everything an agent needs as plain text, free to fetch:

| File                                  | What it is                                                               |
| ------------------------------------- | ------------------------------------------------------------------------ |
| [`SKILL.md`](https://docs-preview.mediux.io/skills/mediux/SKILL.md) | The Mediux Agent Skill: the rules every integration follows              |
| [`llms.txt`](https://docs-preview.mediux.io/llms.txt)               | An index of every docs page, linked as Markdown                          |
| [`llms-full.txt`](https://docs-preview.mediux.io/llms-full.txt)     | Every guide and concept page in one file                                 |
| [`openapi.json`](https://docs-preview.mediux.io/openapi.json)       | The OpenAPI 3.1 document, for types and generated clients                |
| `<page>.md`                           | Any docs page as Markdown: add `.md` to its path, as in `/api/errors.md` |

Each page also has **Copy as Markdown** and **View as Markdown** under its title.

## Add the skill

The skill tells your agent how to call the API, cache responses, build image URLs,
handle errors and connect users, and what apps can't do.

In Claude Code, save it as a project skill:

```sh
mkdir -p .claude/skills/mediux
curl -o .claude/skills/mediux/SKILL.md https://docs.mediux.io/skills/mediux/SKILL.md
```

Other agents that support Agent Skills take the same file in their skills folder.
Download it again now and then to pick up changes.

## Or add it to AGENTS.md

For any agent that reads an `AGENTS.md` (or a similar rules file), paste this in:

```md
## Mediux

This project uses the Mediux API. Before writing Mediux code, read
https://docs.mediux.io/skills/mediux/SKILL.md and follow its rules. Look up
endpoints in https://docs.mediux.io/llms.txt and https://docs.mediux.io/openapi.json;
don't guess paths or field names.
```

## Starter prompt

```text
Build <what you want> using the Mediux API. First read
https://docs.mediux.io/skills/mediux/SKILL.md and https://docs.mediux.io/llms.txt,
then the pages you need. Generate types from https://docs.mediux.io/openapi.json.
Follow the skill's rules on caching, image URLs, errors and OAuth, and finish with
its "Before you ship" checklist.
```
