Pp resend

From mvanhorn/printing-press-library · View interactive version

Pp resend is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. The full Resend API (100 endpoints across emails, broadcasts, audiences, contacts, domains, templates, webhooks)... Trigger phrases: `send an email with resend`, `check resend deliverability`, `list resend audiences`, `what did we send to <email>`, `use resend`, `run resend`.

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/productivity/resend/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Resend — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the resend-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install resend --cli-only

```

  1. Verify: resend-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/productivity/resend/cmd/resend-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Use this CLI when an agent needs to answer cross-resource questions about a Resend account that the dashboard or SDK cannot answer in one call — what did we send to a specific recipient, which audiences is a contact in, how does broadcast performance trend over time, what's the 7-day bounce rate. Stick with npx resend send for one-shot transactional sends or with React Email for templates; this CLI is the agent-facing companion, not a replacement.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Cross-resource queries over local state

_Reach for this when an agent needs to reconstruct what a single user has received — support tickets, GDPR exports, dispute investigations._

```bash

resend-pp-cli emails to <your-email> --json --select id,subject,status,sent_at

```

_Use when debugging 'why didn't this arrive?' — one command shows whether it was sent, delivered, opened, or bounced and when._

```bash

resend-pp-cli emails timeline 4ef9a417-d4ff-4ec5-9af2-c80a4d5d2c1f --json

```

_Use before planning a campaign — quickly see which audiences are healthy and recently engaged._

```bash

resend-pp-cli audiences inventory --json

```

_Use when triaging unsubscribe requests, GDPR deletions, or 'why is bob getting this email?'._

```bash

resend-pp-cli contacts where <contact-email> --json --select audience_name,subscribed

```

Aggregate analytics from local store

_Use to compare campaign performance across the lifetime of the account._

```bash

resend-pp-cli broadcasts performance --json --select broadcasts,count,status

```

_Use on call-out / deliverability incidents to confirm all sending domains are fully verified._

```bash

resend-pp-cli domains health --json

```

_Use weekly to monitor IP/domain reputation trends before they cause deliverability incidents._

```bash

resend-pp-cli deliverability summary --window 7d --json

```

Operational hygiene

_Use during quarterly security reviews — find unused keys that should be rotated or revoked._

```bash

resend-pp-cli api-keys rotation --older-than 90d --json

```

Command Reference

api-keys — Create and manage API Keys through the Resend API.

audiences — Deprecated: Use Segments instead. Create and manage Audiences through the Resend API.

automations — Create and manage Automations through the Resend API.

broadcasts — Create and manage Broadcasts through the Resend API.

contact-properties — Create and manage Contact Properties through the Resend API.

contacts — Create and manage Contacts through the Resend API.

domains — Create and manage domains through the Resend API.

emails — Start sending emails through the Resend API.

events — Create and manage Events through the Resend API.

logs — Retrieve API request logs through the Resend API.

segments — Create and manage Segments through the Resend API.

templates — Create and manage Templates through the Resend API.

topics — Create and manage Topics through the Resend API.

webhooks — Create and manage Webhooks through the Resend API.

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

resend-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Reconstruct what a user has received

resend-pp-cli emails to user@example.com --json --select id,subject,status,sent_at,opened_at --limit 50

Use this for support tickets and GDPR exports — every email sent to one recipient, with delivery state.

Pre-campaign audience check

resend-pp-cli audiences inventory --json --select name,contact_count,unsubscribed_count,last_broadcast_at

Run before scheduling a broadcast — surfaces audiences with high unsubscribe rates or stale engagement.

Weekly deliverability review

resend-pp-cli deliverability summary --window 7d --agent --select bounce_rate,complaint_rate,suppression_count

Trend snapshot for IP/domain reputation; pipe through jq to alert on threshold breaches.

Audit stale API keys

resend-pp-cli api-keys rotation --older-than 90d --json --select name,created_at,last_used_at

Find unused keys during quarterly security reviews.

Search every sent email for a phrase

resend-pp-cli search 'password reset' --json --select id,subject,to,sent_at

FTS5-backed; needs sync --full first.

Auth Setup

Run resend-pp-cli auth setup for the URL and steps to obtain a token (add --launch to open the URL). Then store it:

resend-pp-cli auth set-token YOUR_TOKEN_HERE

Or set RESEND_API_KEY as an environment variable.

Run resend-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

resend-pp-cli api-keys list --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

resend-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
resend-pp-cli feedback --stdin < notes.txt
resend-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.resend-pp-cli/feedback.jsonl. They are never POSTed unless RESEND_FEEDBACK_ENDPOINT is set AND either --send is passed or RESEND_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

resend-pp-cli profile save briefing --json
resend-pp-cli --profile briefing api-keys list
resend-pp-cli profile list --json
resend-pp-cli profile show briefing
resend-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show resend-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:

claude mcp add resend-pp-mcp -- resend-pp-mcp

Verify: claude mcp list

Direct Use

  1. Check if installed: which resend-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

resend-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: resend-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.