mailcoach
Manage email marketing with the Mailcoach CLI — email lists, subscribers, campaigns, transactional emails, templates, automations, tags, and segments.
What this skill does
# Mailcoach CLI
Use this skill when the user wants to manage email marketing through their Mailcoach instance. This includes managing email lists, subscribers, campaigns, transactional emails, templates, automations, tags, segments, and suppressions.
## Prerequisites
The `mailcoach` CLI must be installed and authenticated. If a command returns a 401 error, the user needs to authenticate first.
```bash
# Authenticate with a Mailcoach instance
mailcoach login
# Verify authentication works
mailcoach list-email-lists
```
See [rules/authentication.md](rules/authentication.md) for the full login flow.
## How commands work
Commands are **auto-generated from the Mailcoach OpenAPI spec**. Always discover commands dynamically rather than guessing names.
```bash
# List all available commands
mailcoach list
# Get help for a specific command (shows all options)
mailcoach <command-name> --help
```
### Command naming
Commands use kebab-case derived from API operation IDs:
- `list-email-lists`, `create-email-list`, `show-email-list`, `update-email-list`, `delete-email-list`
- `list-subscribers`, `create-subscriber`, `show-subscriber`, `update-subscriber`
- `list-campaigns`, `create-campaign`, `send-campaign`, `send-campaign-test`
- `list-transactional-mails`, `send-transactional-mail`
- `list-tags`, `create-tag`, `list-segments`, `create-segment`
- `trigger-automation`
### Parameter naming
- Path parameters like `{emailList}` become **required** options: `--email-list=<uuid>`
- Query parameters like `filter[search]` become **optional** options: `--filter-search=<value>`
- Both `snake_case` and `camelCase` parameter names are converted to `--kebab-case` (e.g., `book_id` and `bookId` both become `--book-id`)
### Sending data
```bash
# JSON body (preferred for creates/updates)
mailcoach create-email-list --input '{"name": "Newsletter", "default_from_email": "[email protected]"}'
# Form fields (repeatable, simpler for flat data)
mailcoach create-email-list --field name="Newsletter" --field default_from_email="[email protected]"
# File uploads (prefix path with @)
mailcoach create-subscriber-import --email-list=<uuid> --field csv=@/path/to/subscribers.csv
```
- `--field` values are sent as JSON by default. When any field contains a file (`@` prefix), the entire request switches to `multipart/form-data`.
- You cannot combine `--field` and `--input` in the same command.
### Output formats
```bash
mailcoach list-email-lists # Human-readable table (default)
mailcoach list-email-lists --json # Raw JSON (useful for parsing)
mailcoach list-email-lists --yaml # YAML output
mailcoach list-email-lists --minify # Minified single-line JSON (implies --json)
mailcoach list-email-lists --H # Include response headers
mailcoach list-email-lists --output-html # Show HTML response bodies (hidden by default)
```
Always use `--json` when you need to extract UUIDs or data from responses for use in subsequent commands.
### Filtering, sorting, and pagination
```bash
mailcoach list-subscribers --email-list=<uuid> --filter-search="john" --sort=email --filter-per-page=50 --filter-page=2
```
- `--filter-search`: fuzzy text search
- `--sort`: field name, prefix with `-` for descending (e.g., `--sort=-created_at`)
- `--filter-per-page`: results per page (max 100, default 15)
- `--filter-page`: page number
### Error handling
- **401**: Authentication failed. Run `mailcoach login` to re-authenticate.
- **422**: Validation error. The response body contains details about which fields are invalid.
- **404**: Resource not found. Verify the UUID is correct.
- **Missing path parameter**: The CLI tells you which `--option` is required.
- All errors exit with a non-zero code, so you can chain commands with `&&`.
- HTML error responses hide the body by default — add `--output-html` to see them.
## Common workflows
### Email lists and subscribers
- [rules/email-lists.md](rules/email-lists.md) — Create and manage email lists, tags, and segments
- [rules/subscribers.md](rules/subscribers.md) — Add, import, tag, and manage subscribers
### Campaigns
- [rules/campaigns.md](rules/campaigns.md) — Full campaign lifecycle: create, configure, test, send, and view statistics
### Transactional emails
- [rules/transactional.md](rules/transactional.md) — Send transactional emails via templates or inline content
### Templates and automations
- [rules/templates.md](rules/templates.md) — Manage reusable email templates
- [rules/automations.md](rules/automations.md) — Trigger automations via the CLI
## Important notes
- Mailcoach is self-hosted: each user has a unique instance URL configured during `mailcoach login`
- The OpenAPI spec is cached for 24 hours. Run `mailcoach clear-cache` to force a refresh if commands seem outdated.
- UUIDs are used as resource identifiers throughout the API.
- When chaining commands (e.g., create a list then add subscribers), use `--json` to extract UUIDs from responses.
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.