# NexDoc Design — agent skills

NexDoc Design is a design engine for AI agents. Submit **content**, **instructions**, and a **format**; NexDoc returns a production-ready HTML/CSS design with a preview URL, PDF or HTML export, and an optional public site. Do not author the final HTML yourself.

These files are the public operating instructions. Fetch them as raw markdown (`text/markdown`). Do not wrap them in a human docs UI.

| Service | URL |
|---------|-----|
| REST API | `https://api.nexdoc.design` |
| MCP | `https://mcp.nexdoc.design/mcp` |
| Dashboard | `https://app.nexdoc.design` |
| Docs | `https://www.nexdoc.design/docs` |
| Skill index (this file) | `https://www.nexdoc.design/skills.md` (alias: `https://www.nexdoc.design/skills`) |
| Discovery | `https://www.nexdoc.design/.well-known/agent-skills/index.json` |

## Choose a skill

Read **one** of these before generating a design. Prefer MCP when the tools are already connected.

| Situation | Fetch |
|-----------|--------|
| MCP tools are available (`create_design`, `export_design`, and related tools) | [nexdoc-mcp/SKILL.md](https://www.nexdoc.design/skills/nexdoc-mcp/SKILL.md) |
| HTTP client and an API key (`NXD_API_KEY`) — curl, Python, Node, a backend, CI, or a custom agent | [nexdoc-api/SKILL.md](https://www.nexdoc.design/skills/nexdoc-api/SKILL.md) |
| Unsure which integration to use | [nexdoc-design/SKILL.md](https://www.nexdoc.design/skills/nexdoc-design/SKILL.md) |

Endpoint catalog (REST, load on demand): [nexdoc-api/reference.md](https://www.nexdoc.design/skills/nexdoc-api/reference.md).

## Operating rules

These apply to every integration:

1. **Persist `job_id` and `run_id`** as soon as a run is created, and repeat both IDs to the user. They are required for edits, status, export, and later email notification. Never start a second job for the same design.
2. **Generation is not instant.** Simple layouts typically finish in **1–5 minutes**. Complex decks, reports, and image-heavy work commonly take **10–20 minutes**. Tell the user this up front. A long wait is not a hang; do not start a duplicate run.
3. Return the **`viewer_url`** after every completed run. People preview and hot-edit text there.
4. Offer a **download**: `pdf` for print, slides, and cards; `html` (ZIP) for web formats.
5. **Never publish** to a public URL unless the user explicitly asks.
6. On **`402`** (insufficient balance), send the user to `https://app.nexdoc.design`. Do not work around billing.
7. If you cannot wait until the run finishes, request email notification when the schema allows it (`notify_email` on REST; `notify_email` / `notify_run_email` on MCP). If those fields or tools are absent from the connected schema, omit them — do not pass unknown properties. A request against an already-finished run returns a warning and sends no email.

## Allowed uploads

These types are accepted on multipart `files`, MCP `asset_paths`, and `POST /v1/files/request-upload`:

| Kind | Extensions | `content_type` |
|------|------------|----------------|
| Image | `.png` | `image/png` |
| Image | `.jpg` / `.jpeg` | `image/jpeg` |
| Image | `.gif` | `image/gif` |
| Document | `.pdf` | `application/pdf` |

Any other type (`svg`, `webp`, `json`, `brand-kit.json`, and so on) returns **400**. Put brand colors and fonts in `instructions` text; do not upload a JSON brand kit.

## Formats

`landing-page` `link-in-bio` `portfolio` `lookbook` · `slide-deck` `presentation` `pitch-deck` · `invoice` `receipt` `resume` `cv` `cover-letter` `proposal` `case-study` `report` `contract` `nda` `certificate` `whitepaper` `brochure` `menu` · `social-card` `og-image` `banner` `business-card` `poster` `ticket` `boarding-pass` `coupon` `voucher` `invitation` · `email-newsletter` `infographic` `timeline` `roadmap` `org-chart` `dashboard`

## Getting started

**Assistants and chat clients.** Connect the NexDoc MCP server at `https://mcp.nexdoc.design/mcp`. The client opens a browser for OAuth; no API key is stored. Then ask for a design in plain language.

**Applications and custom agents.** Create an API key at `https://app.nexdoc.design/keys` and follow the [API skill](https://www.nexdoc.design/skills/nexdoc-api/SKILL.md). New accounts start with a small free balance; add funds from $10 on the dashboard.

### Install these skills (Cursor / Claude Code)

```bash
mkdir -p ~/.cursor/skills/nexdoc-design ~/.cursor/skills/nexdoc-mcp ~/.cursor/skills/nexdoc-api

curl -fsSL https://www.nexdoc.design/skills/nexdoc-design/SKILL.md \
  -o ~/.cursor/skills/nexdoc-design/SKILL.md
curl -fsSL https://www.nexdoc.design/skills/nexdoc-mcp/SKILL.md \
  -o ~/.cursor/skills/nexdoc-mcp/SKILL.md
curl -fsSL https://www.nexdoc.design/skills/nexdoc-api/SKILL.md \
  -o ~/.cursor/skills/nexdoc-api/SKILL.md
curl -fsSL https://www.nexdoc.design/skills/nexdoc-api/reference.md \
  -o ~/.cursor/skills/nexdoc-api/reference.md
```

For Claude Code, use `~/.claude/skills/` in place of `~/.cursor/skills/`.
