Claude Code skills give Claude deep knowledge of the Lumail CLI, so it can run commands on your behalf directly from conversation. Unlike MCP which exposes raw tools, skills teach Claude _how_ to use the CLI effectively.

## Setup: send this to your agent

Paste this into your agent — Claude Code, Codex, or any agent with a terminal — and it does the whole setup for you: CLI install, browser sign-in, skill, verification.

<AgentPrompt
  label="Prompt"
  prompt="Read lumail.io/cli/install and set up the Lumail CLI for me."
/>

Your agent fetches the machine-readable guide at [lumail.io/cli/install](https://lumail.io/cli/install), installs the CLI, walks you through the browser sign-in, and drops the `lumail` skill into its skills directory.

## Setup: by hand

Install the CLI and sign in through your browser — no API token to create:

```bash
npm install -g lumail
lumail auth login
lumail auth test
```

## Automatic Setup (Legacy)

```bash
pnpm dlx lumail setup
```

Choose **Skills (CLI)** to install the skill and save your Lumail API token, or choose **Both** to configure MCP and the skill in the same guided flow.

The command downloads the Lumail skill to `~/.claude/skills/lumail/` so Claude Code knows every CLI command and SDK method.

## Manual Setup

Install the skill with the Skills CLI:

```bash
pnpm dlx skills add Melvynx/lumail-skills -g
```

Then install the CLI and set your token:

```bash
npm install -g lumail
lumail auth set lum_your_api_token_here
```

If you prefer to download the skill directly:

```bash
# Download the skill manually
curl -o ~/.claude/skills/lumail/SKILL.md --create-dirs \
  https://raw.githubusercontent.com/Melvynx/lumail-skills/main/skills/lumail/SKILL.md
```

## What Can Claude Do With Skills?

Once the skill is installed, Claude knows every CLI command and SDK method. Just ask naturally:

```
"Add user@example.com to my newsletter with the vip tag"
→ Claude runs: lumail subscribers create --email user@example.com --tags vip

"Show me all draft campaigns"
→ Claude runs: lumail campaigns list --status DRAFT

"Send the Welcome campaign now"
→ Claude runs: lumail campaigns send <id>

"Export my subscribers as CSV"
→ Claude runs: lumail tools run list_subscribers --params '{"limit":1000}' --format csv
```

## Skills vs MCP

|                  | Skills (CLI)                              | MCP                                  |
| ---------------- | ----------------------------------------- | ------------------------------------ |
| **How it works** | Claude runs CLI commands in your terminal | Claude calls tools via HTTP protocol |
| **Setup**        | `pnpm dlx lumail setup` + choose Skills   | `pnpm dlx lumail setup` + choose MCP |
| **Works in**     | Claude Code                               | Claude Code, Claude Desktop, Cursor  |
| **Output**       | Visible in terminal (text, JSON, CSV)     | Returned as tool results             |
| **Offline**      | Yes (after install)                       | No (requires API connection)         |
| **Best for**     | Terminal workflows, scripting, piping     | IDE integration, desktop assistants  |

Both methods give Claude access to the same capabilities. Skills are better when you want to see and control what's happening in your terminal. MCP is better for seamless IDE integration.

## Available CLI Commands

The skill teaches Claude all of these:

```bash
lumail subscribers create --email x --name y --tags a b
lumail subscribers get <email>
lumail subscribers update <email> --name y
lumail subscribers unsubscribe <email>
lumail subscribers add-tags <email> --tags a b
lumail subscribers remove-tags <email> --tags a
lumail subscribers events <email>

lumail campaigns list --status DRAFT
lumail campaigns create --subject "Hello" --name "My Campaign"
lumail campaigns get <id>
lumail campaigns update <id> --subject "Updated"
lumail campaigns delete <id>
lumail campaigns send <id>

lumail tags list / create / get / update
lumail emails send --to x --from y --subject z --content "..."
lumail emails verify <email>
lumail events create --type SUBSCRIBED --subscriber <email>
lumail tools list / get / run
```

All commands support `--json`, `--format csv`, `--no-header` for scripting.

## Open Source

The skill file is open source at [github.com/Melvynx/lumail-skills](https://github.com/Melvynx/lumail-skills). Contributions welcome.

## Related

- [Claude (MCP)](/docs/ai-integration/mcp-claude) - Alternative: MCP integration
- [CLI Reference](/docs/api-reference/cli) - Full CLI documentation
- [TypeScript SDK](/docs/api-reference/sdk) - Programmatic usage
