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

# Skills

> Hand off email marketing to AI agents with the official Migma skills

Migma skills let AI coding assistants create, update, test, send, and schedule emails with Migma. They can also set up Migma inside an existing app by auditing current email triggers, creating the missing Migma emails, and wiring safe backend sends. For OpenClaw, see the dedicated [OpenClaw page](/openclaw).

For the short app-wiring guide, see [/setup](/setup).

<CardGroup cols={3}>
  <Card title="Guided agent install" icon="download">
    Install paths for supported editors and agents
  </Card>

  <Card title="Natural language" icon="message">
    Ask your agent to handle transactional emails and campaigns
  </Card>

  <Card title="Full API access" icon="code">
    Create, edit, send, campaign, and manage contacts
  </Card>
</CardGroup>

***

## Installation

Use the `skills` CLI when it is available for your agent:

```bash Install script theme={null}
curl -fsSL https://install.migma.ai/skills | sh
```

```bash theme={null}
npx skills add MigmaAI/migma-skills
```

This works with Claude Code, Cursor, Codex, OpenCode, and [35+ other agents](https://github.com/vercel-labs/skills#supported-agents).

### Install to a specific agent

```bash theme={null}
npx skills add MigmaAI/migma-skills -a claude-code
npx skills add MigmaAI/migma-skills -a cursor
npx skills add MigmaAI/migma-skills -a codex
```

### Install one workflow

```bash theme={null}
npx skills add MigmaAI/migma-skills --skill migma
npx skills add MigmaAI/migma-skills --skill setup
```

### Install globally (all projects)

```bash theme={null}
npx skills add MigmaAI/migma-skills -g
```

### Install as a plugin

Add the marketplace once, then install the Migma plugin in your agent.

<CardGroup cols={3}>
  <Card title="Claude Code" icon="https://mintcdn.com/migmaai/QHH_kDlhE97DvfUZ/images/logos/claude-color.svg?fit=max&auto=format&n=QHH_kDlhE97DvfUZ&q=85&s=87dfd67137723cac140274a92b596a9c" width="16" height="16" data-path="images/logos/claude-color.svg">
    ```bash theme={null}
    claude plugin marketplace add MigmaAI/migma-skills
    claude plugin install migma@migma-plugins
    ```
  </Card>

  <Card title="Codex" icon="https://mintcdn.com/migmaai/QHH_kDlhE97DvfUZ/images/logos/openai.svg?fit=max&auto=format&n=QHH_kDlhE97DvfUZ&q=85&s=acbaf5092a31aafd865b5c726ce593ff" width="16" height="16" data-path="images/logos/openai.svg">
    ```bash theme={null}
    codex plugin marketplace add MigmaAI/migma-skills
    codex plugin add migma@migma-plugins
    ```
  </Card>

  <Card title="Cursor" icon="https://mintcdn.com/migmaai/QHH_kDlhE97DvfUZ/images/logos/cursor.svg?fit=max&auto=format&n=QHH_kDlhE97DvfUZ&q=85&s=b3faa266343083f847bbdf001ce1c506" width="16" height="16" data-path="images/logos/cursor.svg">
    Open Settings, go to Plugins, paste `https://github.com/MigmaAI/migma-skills`, then install Migma.
  </Card>
</CardGroup>

<Tip>
  Browse the [skill source on GitHub](https://github.com/MigmaAI/migma-skills/tree/main/skills/migma) or install it with `npx skills add MigmaAI/migma-skills --skill migma`.
</Tip>

***

## Configuration

### API key

Set your Migma API key as an environment variable:

```bash theme={null}
export MIGMA_API_KEY=your_migma_api_key
```

Get your API key from [Settings → Developers → API Keys](https://migma.ai/settings?tab=api-keys).

<Tip>
  No key yet? Your agent can register itself: it fetches `https://api.migma.ai/auth.md`, you approve it with a one-time code, and it receives its own scoped key. See [Agent registration](/agent-registration).
</Tip>

### Default project

Optionally set a default project ID so you don't have to specify it every time:

```bash theme={null}
export MIGMA_PROJECT_ID=proj_abc123
```

***

## Features

| Skill   | What the agent can do                                                                                                     |
| ------- | ------------------------------------------------------------------------------------------------------------------------- |
| `setup` | Audit an existing app's email triggers, create or reuse Migma emails, store `emailId` values, wire safe server-side sends |
| `migma` | Generate, edit, test, send, schedule, validate, export, and manage contacts in Migma                                      |

Capabilities covered by the `migma` skill:

Fetch generated emails by `emailId` to retrieve HTML, subject, preheader, screenshot URLs, and email IDs for single emails or series.

| Capability               | CLI command used                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Generate one email       | `migma generate "..." --wait --json`                                                                                                                                                             |
| Generate a series        | `migma generate "..." --count 3 --wait --json`                                                                                                                                                   |
| Get generated email HTML | `migma emails get <emailId> --output ./email.html --json`                                                                                                                                        |
| Prompt-edit an email     | `migma emails edit <emailId> --prompt "..." --output ./email.html --json`                                                                                                                        |
| Send a test              | `migma send-test --email <emailId> --to test@example.com --json`                                                                                                                                 |
| Send selected email      | `migma send --email <emailId> --to user@example.com --subject "Welcome" --from hello@brand.migma.email --from-name "Brand" --json`                                                               |
| Send marketing campaign  | `migma campaigns create --name "Launch" --conversation <conversationId> --email <emailId> --from hello@brand.migma.email --from-name "Brand" --recipient-type tag --recipient-id <tagId> --json` |

***

## Example usage

Once installed, ask your AI agent things like:

* "Generate a welcome email for new subscribers"
* "Create a three-email onboarding series and show each email ID"
* "Make the welcome email shorter and more transactional"
* "Send that email to [sarah@example.com](mailto:sarah@example.com)"
* "Generate a product launch email and send it to the Newsletter segment"
* "Validate the email for compatibility issues"
* "Import my brand from [https://yourbrand.com](https://yourbrand.com)"
* "Create a managed sending domain called mycompany"
* "List all my contacts tagged VIP"
* "Check the spam score of my email"
* "Export my email for Klaviyo"

***

## Resources

<CardGroup cols={3}>
  <Card title="OpenClaw" icon="lobster" href="/openclaw">
    Use Migma from WhatsApp, Telegram, Discord
  </Card>

  <Card title="MCP" icon="server" href="/mcp-server">
    Connect Cursor, Codex, Claude, and other agents to Migma
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    Migma CLI reference
  </Card>

  <Card title="SDK" icon="code" href="/sdk">
    Node.js SDK
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Full endpoint docs
  </Card>

  <Card title="Discord" icon="discord" href="https://discord.gg/ZB6c2meCUA">
    Get help from the community
  </Card>
</CardGroup>
