resend-cli
Original:🇺🇸 English
Translated
1 scripts
Use this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
5installs
Added on
NPX Install
npx skill4agent add tristanmanchester/agent-skills resend-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Resend CLI
This skill is for agents that should operate Resend through the official CLI first, not by
dropping straight to raw REST.
The goal is not just “know the commands”. The goal is to make an agent:
- choose the right Resend primitive,
- choose the right CLI command,
- run it in a deterministic non-interactive way,
- detect the important CLI coverage gaps before it gets stuck, and
- fall back to MCP/API only when the CLI genuinely does not cover the job.
Start here
Load only the files that match the task:
- — the default decision process for live Resend work
references/agent-operating-model.md - — install methods, auth priority, profiles, config paths
references/install-auth-and-profiles.md - — how agents should invoke
references/subprocess-contract.mdsafely and parse outputresend - — fast routing from user intent to the right command(s)
references/command-selection.md - — transactional sends, schedules, tags, attachments, batch limits
references/sending-scheduling-and-batch.md - — domain creation, verification, receiving, TLS, tracking, 403/domain mismatch
references/domains-dns-and-deliverability.md - — webhook creation, update, signature handling, temporary local listeners
references/webhooks-and-listeners.md - — inbound list/get/attachments/forward/listen flows
references/inbound-receiving-and-threading.md - — subscription modelling, targeting, campaigns
references/contacts-topics-segments-and-broadcasts.md - — template lifecycle and the important current CLI gaps
references/templates-and-coverage-gaps.md - — debug order, CLI quirks, when to fall back to MCP/API
references/diagnostics-and-fallbacks.md - — short end-to-end playbooks
references/recipes.md - — first-party source manifest and refresh notes
references/sources.md
Machine-readable assets:
- — command index with detail levels (
assets/command-catalog.json,source_inspected,readme_confirmed)tree_confirmed - — route common tasks to command sequences
assets/task-router.json - — fast-fail diagnosis hints
assets/error-map.json - — current CLI limitations and ambiguities that matter to agents
assets/coverage-gaps.json - — deterministic invocation defaults
assets/subprocess-contract.json - — reusable command/file scaffolds
assets/scaffold-index.json - — authoritative URLs used to build this skill
assets/source-manifest.json
Bundled helper:
- — agent wrapper for probing, routing, scaffolding, batch linting, diagnosis, and safe subprocess execution
scripts/resend_cli.py
Core operating rules
1) Prefer the official CLI for live Resend work
Default order of preference:
- Official Resend CLI for live terminal/CI/agent operations
- Official Resend MCP server if the environment already exposes it and the CLI is unavailable
- Official SDK when editing app code inside an existing integration
- Raw REST only for stack-neutral examples, protocol debugging, or feature gaps
Do not choose raw REST just because it is familiar.
2) For agents, stay non-interactive by default
For bounded commands:
- pass all required flags explicitly
- use global
--json -q - prefer or a stored profile over typing secrets interactively
RESEND_API_KEY - set for deterministic output
RESEND_NO_UPDATE_NOTIFIER=1 - capture both stdout and stderr defensively
3) Run doctor
early when the environment is unknown
doctorWhen you do not know whether the CLI is installed, authenticated, or pointed at the right account:
bash
resend --json -q doctorThis is usually the fastest first read on:
- CLI availability/version
- whether an API key is being resolved
- whether verified domains exist
- whether the machine looks like an AI-agent environment
4) Choose the primitive before the command
- One logical transactional email →
emails send - Up to 100 distinct transactional emails in one request →
emails batch - Scheduled transactional email mutation → /
emails updateemails cancel - Campaign to a segment → /
broadcasts createbroadcasts send - Reusable hosted content →
templates * - Sender or receiving setup →
domains * - Inbound processing → +
emails receiving *webhooks * - Scoped credentials →
api-keys * - Recipient data and preferences → ,
contacts,contact-properties,topicssegments - Local dev event loop → or
webhooks listenemails receiving listen
5) Know the current CLI gaps
This version of the skill treats these as especially important:
- Template send gap: the CLI manages templates, but the current command surface does not expose a direct
emails send/template-vars flow.--template-id - Domain capability update gap: exposes TLS/open/click tracking, but not an explicit sending/receiving capability toggle, while inbound help text references such a toggle.
domains update - Stream commands are special: and
webhooks listenare long-running and should be treated as NDJSON/event streams in agent mode.emails receiving listen - JSON error channel discrepancy: the README promises machine JSON on stdout only, but the current source writes JSON errors with , so wrappers must parse stderr too.
console.error
6) Keep IDs and file paths
Most multi-step flows become much easier if the agent persists:
- domain IDs
- email IDs
- webhook IDs
- topic IDs
- segment IDs
- template IDs/aliases
- API key IDs
- the file paths it generated for HTML or batch JSON
The mutation ladder
For state-changing live operations:
- classify the task
- confirm the command sequence
- make any needed file assets (, batch JSON)
.html - run with
--json -q - verify with ,
get, or a follow-up checklist - persist returned IDs and next-step context
- only then continue to the next mutation
Bundled helper script
scripts/resend_cli.pyCommands:
- — find the CLI, report install hints, and show environment basics
probe - — list known commands from the bundled catalogue
catalog - — inspect one command and its notes/gaps
info - — route a free-text task to the best CLI sequence
recommend - — print or materialise sample commands/files
scaffold - — statically validate an
lint-batchJSON fileemails batch - — explain likely causes of common CLI/API failures
doctor - — execute the official CLI with deterministic defaults and tolerant JSON parsing
run
Examples:
bash
python3 scripts/resend_cli.py probe
python3 scripts/resend_cli.py catalog --resource emails
python3 scripts/resend_cli.py info "emails send"
python3 scripts/resend_cli.py recommend "send 70 different shipment notifications"
python3 scripts/resend_cli.py scaffold batch-send --write-dir ./tmp
python3 scripts/resend_cli.py lint-batch ./tmp/batch-emails.json
python3 scripts/resend_cli.py doctor --command "emails send" --status 403 --message "1010 forbidden"
python3 scripts/resend_cli.py run -- emails list --limit 5Response shape this skill should produce
A strong answer usually includes:
- the exact Resend primitive,
- the exact CLI command or command sequence,
- any file scaffolding the user needs,
- the operational caveats that matter here,
- the verification step,
- the fallback path if the CLI does not currently cover the flow.
Example prompts this skill should handle
- “Use the Resend CLI to send a scheduled password reset email”
- “Should I use ,
emails send, oremails batch?”broadcasts create - “Create a sending + receiving domain in ”
eu-west-1 - “Set up local webhook listening with ngrok”
- “Why is my batch file failing?”
- “How do I manage multiple Resend accounts from one agent?”
- “Can the CLI send a hosted template directly?”
- “How should my agent parse output safely?”
resend