SendpositoryDocs
Guides

AI coding agents

Install the Sendpository skill so Claude Code, Codex, Cursor and Copilot write your email code correctly.

Updated

Starting fresh? npx sendpository@latest init connects your account (you approve in the browser), saves the API key to your env file and installs everything below in one go. Already set up? Just give your agent Sendpository's instructions:

npx sendpository@latest agents

This adds instruction files only - no code:

AgentFile
Claude Code.claude/skills/sendpository/ (a skill, loaded when email comes up)
Codex, Copilot, Gemini CLI and othersa Sendpository section in AGENTS.md
Cursor, if the project uses it.cursor/rules/sendpository.mdc

Commit them so everyone on the project, and every agent, gets the same rules. Run the command again after upgrading the SDK to update them.

Or paste this into your agent and let it do the rest:

Add Sendpository email to this project. First run `npx sendpository@latest agents` to install the Sendpository skill, then follow it. If you can't run commands, read https://sendpository.com/agents/sendpository/SKILL.md instead.

What the agent learns

  • Keep SENDPOSITORY_API_KEY on the server - never in browser code or a NEXT_PUBLIC_ variable.
  • Send from a verified domain, and what to tell you when it isn't verified.
  • Retry with idempotency keys derived from the event, so nothing is sent twice.
  • Verify webhook signatures on the raw body.
  • Every error type and whether to retry it.
  • Patterns for Next.js, Express, background jobs, serverless and Python.
  • Moving from Resend, SendGrid, Postmark, Mailgun, Amazon SES or Nodemailer: every send found and rewritten, webhook events mapped, and a switch-over behind an EMAIL_PROVIDER flag. Bring the old provider's bounces with Suppressions → Import.

Options

CommandDoes
npx sendpository agents --globalInstalls the Claude Code skill for every project on your machine.
npx sendpository agents --dry-runShows what it would write.
npx sendpository agents --printPrints the skill, for agents that read it from the terminal.

The raw files are also at /agents/sendpository/SKILL.md for agents that read a URL instead.

On this page