From 487ffb5c3d2b61469d43438e537159746d7409be Mon Sep 17 00:00:00 2001 From: Felipe Freitag Date: Tue, 24 Mar 2026 11:22:33 -0300 Subject: [PATCH] fix: update skill docs for new CLI features and add evals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skill references drifted behind the CLI — template send (--template, --var), --text-file flag, stdin support, natural language scheduling, broadcasts/templates open subcommands, and api-keys last_used_at were all undocumented. Add skill-evals/ for tracked eval cases outside the distributable skill package. --- .gitignore | 1 - skill-evals/resend-cli/evals.json | 66 ++++++++++++++++++++++ skills/resend-cli/references/api-keys.md | 4 +- skills/resend-cli/references/auth.md | 4 ++ skills/resend-cli/references/broadcasts.md | 15 ++++- skills/resend-cli/references/emails.md | 19 ++++--- skills/resend-cli/references/templates.md | 13 ++++- skills/resend-cli/references/workflows.md | 14 +++-- 8 files changed, 117 insertions(+), 19 deletions(-) create mode 100644 skill-evals/resend-cli/evals.json diff --git a/.gitignore b/.gitignore index 45b37ad5..98ee1b82 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,3 @@ Thumbs.db # Skill eval workspace (generated by skill-creator evals) skills/resend-cli-workspace/ -skills/resend-cli/evals/ diff --git a/skill-evals/resend-cli/evals.json b/skill-evals/resend-cli/evals.json new file mode 100644 index 00000000..b46fe505 --- /dev/null +++ b/skill-evals/resend-cli/evals.json @@ -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)" + ] + }, + { + "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" + ] + } + ] +} diff --git a/skills/resend-cli/references/api-keys.md b/skills/resend-cli/references/api-keys.md index fd490c2b..a6f9615b 100644 --- a/skills/resend-cli/references/api-keys.md +++ b/skills/resend-cli/references/api-keys.md @@ -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}]}` --- diff --git a/skills/resend-cli/references/auth.md b/skills/resend-cli/references/auth.md index d3fb779e..fe80d8df 100644 --- a/skills/resend-cli/references/auth.md +++ b/skills/resend-cli/references/auth.md @@ -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 diff --git a/skills/resend-cli/references/broadcasts.md b/skills/resend-cli/references/broadcasts.md index e49d20f9..347eef50 100644 --- a/skills/resend-cli/references/broadcasts.md +++ b/skills/resend-cli/references/broadcasts.md @@ -22,14 +22,15 @@ Detailed flag specifications for `resend broadcasts` commands. | `--subject ` | string | Yes | Email subject | | `--segment-id ` | string | Yes | Target segment | | `--html ` | string | At least one body flag | HTML body (supports `{{{PROPERTY\|fallback}}}`) | -| `--html-file ` | string | At least one body flag | Path to HTML file | +| `--html-file ` | string | At least one body flag | Path to HTML file (use `"-"` for stdin) | | `--text ` | string | At least one body flag | Plain-text body | +| `--text-file ` | string | At least one body flag | Path to plain-text file (use `"-"` for stdin) | | `--name ` | string | No | Internal label | | `--reply-to
` | string | No | Reply-to address | | `--preview-text ` | string | No | Preview text | | `--topic-id ` | string | No | Topic for subscription filtering | | `--send` | boolean | No | Send immediately (default: save as draft) | -| `--scheduled-at ` | string | No | Schedule delivery (only with `--send`) | +| `--scheduled-at ` | string | No | Schedule delivery — ISO 8601 or natural language (only with `--send`) | --- @@ -49,7 +50,7 @@ Send a draft broadcast. | Flag | Type | Required | Description | |------|------|----------|-------------| -| `--scheduled-at ` | string | No | Schedule instead of immediate send | +| `--scheduled-at ` | string | No | Schedule instead of immediate send — ISO 8601 or natural language | **Note:** Dashboard-created broadcasts cannot be sent via API. @@ -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) diff --git a/skills/resend-cli/references/emails.md b/skills/resend-cli/references/emails.md index a5b18f9a..845e0e41 100644 --- a/skills/resend-cli/references/emails.md +++ b/skills/resend-cli/references/emails.md @@ -10,17 +10,20 @@ Send an email via the Resend API. | Flag | Type | Required | Description | |------|------|----------|-------------| -| `--from
` | string | Yes | Sender address (must be on a verified domain) | +| `--from
` | string | Yes (unless `--template`) | Sender address (must be on a verified domain) | | `--to ` | string[] | Yes | Recipient(s), space-separated | -| `--subject ` | string | Yes | Email subject line | -| `--text ` | string | One of text/html/html-file | Plain-text body | -| `--html ` | string | One of text/html/html-file | HTML body | -| `--html-file ` | string | One of text/html/html-file | Path to HTML file | +| `--subject ` | string | Yes (unless `--template`) | Email subject line | +| `--text ` | string | One of text/html/file/template | Plain-text body | +| `--text-file ` | string | One of text/html/file/template | Path to plain-text file (use `"-"` for stdin) | +| `--html ` | string | One of text/html/file/template | HTML body | +| `--html-file ` | string | One of text/html/file/template | Path to HTML file (use `"-"` for stdin) | +| `--template ` | string | No | Template ID — replaces body/subject/from with template defaults | +| `--var ` | string[] | No | Template variables as key=value pairs (e.g. `--var name=John --var count=42`) | | `--cc ` | string[] | No | CC recipients | | `--bcc ` | string[] | No | BCC recipients | | `--reply-to
` | string | No | Reply-to address | -| `--scheduled-at ` | string | No | Schedule for later (ISO 8601) | -| `--attachment ` | string[] | No | File paths to attach | +| `--scheduled-at ` | string | No | Schedule for later — ISO 8601 or natural language (e.g. `"in 1 hour"`, `"tomorrow at 9am ET"`) | +| `--attachment ` | string[] | No | File paths to attach (not compatible with `--template`) | | `--headers ` | string[] | No | Custom headers | | `--tags ` | string[] | No | Email tags | | `--idempotency-key ` | string | No | Deduplicate request | @@ -108,7 +111,7 @@ Update a scheduled email. | Flag | Type | Required | Description | |------|------|----------|-------------| -| `--scheduled-at ` | string | Yes | New schedule (ISO 8601) | +| `--scheduled-at ` | string | Yes | New schedule — ISO 8601 or natural language | **Output:** `{"object":"email","id":"..."}` diff --git a/skills/resend-cli/references/templates.md b/skills/resend-cli/references/templates.md index ed8f5846..b5273661 100644 --- a/skills/resend-cli/references/templates.md +++ b/skills/resend-cli/references/templates.md @@ -20,9 +20,10 @@ Detailed flag specifications for `resend templates` commands. |------|------|----------|-------------| | `--name ` | string | Yes | Template name | | `--html ` | string | One of html/html-file | HTML body with `{{{VAR_NAME}}}` placeholders | -| `--html-file ` | string | One of html/html-file | Path to HTML file | +| `--html-file ` | string | One of html/html-file | Path to HTML file (use `"-"` for stdin) | | `--subject ` | string | No | Email subject | | `--text ` | string | No | Plain-text body | +| `--text-file ` | string | No | Path to plain-text file (use `"-"` for stdin) | | `--from
` | string | No | Sender address | | `--reply-to
` | string | No | Reply-to address | | `--alias ` | string | No | Lookup alias | @@ -42,7 +43,7 @@ Variable types: `string`, `number` **Argument:** `` — 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. --- @@ -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) diff --git a/skills/resend-cli/references/workflows.md b/skills/resend-cli/references/workflows.md index f2ed4fbf..440fee79 100644 --- a/skills/resend-cli/references/workflows.md +++ b/skills/resend-cli/references/workflows.md @@ -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 "" + --scheduled-at "tomorrow at 9am ET" # Check status resend emails get @@ -128,8 +128,8 @@ resend broadcasts create \ resend broadcasts send -# Schedule for later -resend broadcasts send --scheduled-at "" +# Schedule for later (ISO 8601 or natural language) +resend broadcasts send --scheduled-at "in 2 hours" ``` --- @@ -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 \ + --var name=Jane --var plan=pro + # Duplicate for A/B testing resend templates duplicate welcome-email