Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ Thumbs.db

# Skill eval workspace (generated by skill-creator evals)
skills/resend-cli-workspace/
skills/resend-cli/evals/
66 changes: 66 additions & 0 deletions skill-evals/resend-cli/evals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"skill_name": "resend-cli",
"evals": [
{
"id": 1,
"prompt": "Send a welcome email using template tpl_abc123 with variables name=Alice and plan=pro to alice@example.com",
"expected_output": "Uses `resend emails send --to alice@example.com --template tpl_abc123 --var name=Alice --var plan=pro` without --from or --subject since the template provides those",
"files": [],
"expectations": [
"Uses `emails send` (not `templates send` or other subcommand)",
"Includes `--template tpl_abc123` flag",
"Includes `--var name=Alice` and `--var plan=pro` (or equivalent key=value pairs)",
"Includes `--to alice@example.com`",
"Does NOT include `--from` or `--subject` (template provides these)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: Heads up that from and subject fields are optional to templates, so they might no always exist

]
},
{
"id": 2,
"prompt": "Create a broadcast from newsletter.txt to segment seg_xyz, schedule it for tomorrow at 3pm ET",
"expected_output": "Uses `resend broadcasts create --from ... --subject ... --segment-id seg_xyz --text-file newsletter.txt --send --scheduled-at \"tomorrow at 3pm ET\"`",
"files": [],
"expectations": [
"Uses `broadcasts create` subcommand",
"Includes `--text-file newsletter.txt` (not --text with file contents, not --html-file)",
"Includes `--segment-id seg_xyz`",
"Includes `--send` flag (required for scheduling)",
"Includes `--scheduled-at` with natural language or ISO 8601 datetime"
]
},
{
"id": 3,
"prompt": "List my API keys and tell me which ones haven't been used recently",
"expected_output": "Runs `resend api-keys list` and interprets the last_used_at field to identify stale keys",
"files": [],
"expectations": [
"Uses `api-keys list` subcommand",
"Mentions or references the `last_used_at` field to identify unused keys",
"Does NOT fabricate a flag like `--sort-by` or `--unused` that doesn't exist"
]
},
{
"id": 4,
"prompt": "Open the broadcast bcast_123 in the dashboard",
"expected_output": "Runs `resend broadcasts open bcast_123`",
"files": [],
"expectations": [
"Uses `broadcasts open bcast_123` (not `open` or `resend open`)",
"Does NOT fall back to manually constructing a URL or using `open` with a URL",
"Does NOT use `broadcasts get` as a substitute"
]
},
{
"id": 5,
"prompt": "Create a template called 'Order Confirmation' from the HTML in stdin, with variables ORDER_ID:string and TOTAL:number:0",
"expected_output": "Uses `resend templates create --name \"Order Confirmation\" --html-file - --var ORDER_ID:string --var TOTAL:number:0`",
"files": [],
"expectations": [
"Uses `templates create` subcommand",
"Includes `--name \"Order Confirmation\"` (or equivalent quoting)",
"Uses `--html-file -` or `--html-file \"-\"` for stdin input",
"Includes `--var ORDER_ID:string` and `--var TOTAL:number:0`",
"Does NOT use `--html` with inline content as a substitute for stdin"
]
}
]
}
4 changes: 3 additions & 1 deletion skills/resend-cli/references/api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Detailed flag specifications for `resend api-keys` commands.

## api-keys list

List all API keys (IDs, names, and `created_at` only — tokens never included).
List all API keys (IDs, names, `created_at`, and `last_used_at` — tokens never included).

**Output:** `{"object":"list","data":[{"id":"...","name":"...","created_at":"...","last_used_at":"..."|null}]}`

---

Expand Down
4 changes: 4 additions & 0 deletions skills/resend-cli/references/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ Checks GitHub releases for newer version. Shows upgrade command.
## open

Opens `https://resend.com/emails` in the default browser.

`broadcasts` and `templates` also have their own `open` subcommands:
- `resend broadcasts open [id]` — open a broadcast or the broadcasts list
- `resend templates open [id]` — open a template or the templates list
15 changes: 12 additions & 3 deletions skills/resend-cli/references/broadcasts.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ Detailed flag specifications for `resend broadcasts` commands.
| `--subject <subject>` | string | Yes | Email subject |
| `--segment-id <id>` | string | Yes | Target segment |
| `--html <html>` | string | At least one body flag | HTML body (supports `{{{PROPERTY\|fallback}}}`) |
| `--html-file <path>` | string | At least one body flag | Path to HTML file |
| `--html-file <path>` | string | At least one body flag | Path to HTML file (use `"-"` for stdin) |
| `--text <text>` | string | At least one body flag | Plain-text body |
| `--text-file <path>` | string | At least one body flag | Path to plain-text file (use `"-"` for stdin) |
| `--name <name>` | string | No | Internal label |
| `--reply-to <address>` | string | No | Reply-to address |
| `--preview-text <text>` | string | No | Preview text |
| `--topic-id <id>` | string | No | Topic for subscription filtering |
| `--send` | boolean | No | Send immediately (default: save as draft) |
| `--scheduled-at <datetime>` | string | No | Schedule delivery (only with `--send`) |
| `--scheduled-at <datetime>` | string | No | Schedule delivery — ISO 8601 or natural language (only with `--send`) |

---

Expand All @@ -49,7 +50,7 @@ Send a draft broadcast.

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--scheduled-at <datetime>` | string | No | Schedule instead of immediate send |
| `--scheduled-at <datetime>` | string | No | Schedule instead of immediate send — ISO 8601 or natural language |

**Note:** Dashboard-created broadcasts cannot be sent via API.

Expand Down Expand Up @@ -79,3 +80,11 @@ Send a draft broadcast.
| `--yes` | boolean | Yes (non-interactive) | Skip confirmation |

**Alias:** `rm`

---

## broadcasts open

Open a broadcast (or the broadcasts list) in the Resend dashboard.

**Argument:** `[id]` — Broadcast ID (omit to open the list)
19 changes: 11 additions & 8 deletions skills/resend-cli/references/emails.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ Send an email via the Resend API.

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--from <address>` | string | Yes | Sender address (must be on a verified domain) |
| `--from <address>` | string | Yes (unless `--template`) | Sender address (must be on a verified domain) |
| `--to <addresses...>` | string[] | Yes | Recipient(s), space-separated |
| `--subject <subject>` | string | Yes | Email subject line |
| `--text <text>` | string | One of text/html/html-file | Plain-text body |
| `--html <html>` | string | One of text/html/html-file | HTML body |
| `--html-file <path>` | string | One of text/html/html-file | Path to HTML file |
| `--subject <subject>` | string | Yes (unless `--template`) | Email subject line |
| `--text <text>` | string | One of text/html/file/template | Plain-text body |
| `--text-file <path>` | string | One of text/html/file/template | Path to plain-text file (use `"-"` for stdin) |
| `--html <html>` | string | One of text/html/file/template | HTML body |
| `--html-file <path>` | string | One of text/html/file/template | Path to HTML file (use `"-"` for stdin) |
| `--template <id>` | string | No | Template ID — replaces body/subject/from with template defaults |
| `--var <key=value...>` | string[] | No | Template variables as key=value pairs (e.g. `--var name=John --var count=42`) |
| `--cc <addresses...>` | string[] | No | CC recipients |
| `--bcc <addresses...>` | string[] | No | BCC recipients |
| `--reply-to <address>` | string | No | Reply-to address |
| `--scheduled-at <datetime>` | string | No | Schedule for later (ISO 8601) |
| `--attachment <paths...>` | string[] | No | File paths to attach |
| `--scheduled-at <datetime>` | string | No | Schedule for later ISO 8601 or natural language (e.g. `"in 1 hour"`, `"tomorrow at 9am ET"`) |
| `--attachment <paths...>` | string[] | No | File paths to attach (not compatible with `--template`) |
| `--headers <key=value...>` | string[] | No | Custom headers |
| `--tags <name=value...>` | string[] | No | Email tags |
| `--idempotency-key <key>` | string | No | Deduplicate request |
Expand Down Expand Up @@ -108,7 +111,7 @@ Update a scheduled email.

| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--scheduled-at <datetime>` | string | Yes | New schedule (ISO 8601) |
| `--scheduled-at <datetime>` | string | Yes | New schedule ISO 8601 or natural language |

**Output:** `{"object":"email","id":"..."}`

Expand Down
13 changes: 11 additions & 2 deletions skills/resend-cli/references/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ Detailed flag specifications for `resend templates` commands.
|------|------|----------|-------------|
| `--name <name>` | string | Yes | Template name |
| `--html <html>` | string | One of html/html-file | HTML body with `{{{VAR_NAME}}}` placeholders |
| `--html-file <path>` | string | One of html/html-file | Path to HTML file |
| `--html-file <path>` | string | One of html/html-file | Path to HTML file (use `"-"` for stdin) |
| `--subject <subject>` | string | No | Email subject |
| `--text <text>` | string | No | Plain-text body |
| `--text-file <path>` | string | No | Path to plain-text file (use `"-"` for stdin) |
| `--from <address>` | string | No | Sender address |
| `--reply-to <address>` | string | No | Reply-to address |
| `--alias <alias>` | string | No | Lookup alias |
Expand All @@ -42,7 +43,7 @@ Variable types: `string`, `number`

**Argument:** `<id|alias>` — Template ID or alias

Same optional flags as `create`. At least one required.
Same optional flags as `create` (including `--text-file` and `--html-file` with stdin support). At least one required.

---

Expand All @@ -65,3 +66,11 @@ Same optional flags as `create`. At least one required.
| Flag | Type | Required | Description |
|------|------|----------|-------------|
| `--yes` | boolean | Yes (non-interactive) | Skip confirmation |

---

## templates open

Open a template (or the templates list) in the Resend dashboard.

**Argument:** `[id]` — Template ID (omit to open the list)
14 changes: 10 additions & 4 deletions skills/resend-cli/references/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ resend emails send \
--cc manager@example.com \
--reply-to support@yourdomain.com

# Scheduled email
# Scheduled email (ISO 8601 or natural language)
resend emails send \
--from "you@yourdomain.com" \
--to recipient@example.com \
--subject "Reminder" \
--text "Don't forget!" \
--scheduled-at "<future-ISO-8601-datetime>"
--scheduled-at "tomorrow at 9am ET"

# Check status
resend emails get <email-id>
Expand Down Expand Up @@ -128,8 +128,8 @@ resend broadcasts create \

resend broadcasts send <broadcast-id>

# Schedule for later
resend broadcasts send <broadcast-id> --scheduled-at "<future-ISO-8601-datetime>"
# Schedule for later (ISO 8601 or natural language)
resend broadcasts send <broadcast-id> --scheduled-at "in 2 hours"
```

---
Expand Down Expand Up @@ -218,6 +218,12 @@ resend templates create \
# Publish the template
resend templates publish welcome-email

# Send an email using a template
resend emails send \
--to user@example.com \
--template <template-id> \
--var name=Jane --var plan=pro
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Use variable keys that match the template variable names in this recipe. The example currently defines NAME/PLAN but sends name/plan.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/resend-cli/references/workflows.md, line 225:

<comment>Use variable keys that match the template variable names in this recipe. The example currently defines `NAME`/`PLAN` but sends `name`/`plan`.</comment>

<file context>
@@ -218,6 +218,12 @@ resend templates create \
+resend emails send \
+  --to user@example.com \
+  --template <template-id> \
+  --var name=Jane --var plan=pro
+
 # Duplicate for A/B testing
</file context>
Suggested change
--var name=Jane --var plan=pro
--var NAME=Jane --var PLAN=pro
Fix with Cubic


# Duplicate for A/B testing
resend templates duplicate welcome-email

Expand Down