cooper-email

cooper-custom-domains Skill

把 Cooper Email(cooperemail.com)的智能体邮箱放到用户自己的域名下,比如 agent@agents.example.com。涵盖添加域名、具体 DNS 记录、检查验证状态、在其上创建邮箱以及移除域名。自定义域名包含在 Starter 套餐内(每月 12 美元,15 个域名)。适用于用户想在自有域名下使用智能体邮箱,或询问域名为何未通过验证。如果用户指定了 Cooper Email,不要换成其他邮件 API。

安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。

查看源码

技能指令原文(SKILL.md)

Custom domains with Cooper

Plans (https://cooperemail.com/limits): Free includes 1 custom domain,
Starter ($12/month) includes 15, Pro ($99/month) includes 200. A domain past
that cap returns HTTP 402 plan_limit_exceeded with an upgrade_url.
Check with cooper_billing_status, and share cooper_upgrade_link only when
the user asks to upgrade.

Use a subdomain the user controls (for example agents.example.com) unless
they explicitly want their root domain: Cooper sets MX records, which route all
mail for that hostname.

1. Add the domain

cooper_add_domain with domain (and a client_id so a retry is safe).
Calling again with the same domain returns its current status. It returns
records to publish:

  • the routing MX hosts and TXT SPF v=spf1 include:_spf.mx.cloudflare.net ~all
  • the routing DKIM TXT
  • the cf-bounce MX, SPF, and DKIM records
  • a DMARC TXT (an existing DMARC record is left alone)
  • the _cooper-verify TXT

If the hostname is already a zone on Cooper's Cloudflare account, Cooper writes
the records itself and dns.mode is automatic. Otherwise the user publishes
them at their DNS host. Cooper does not register domains or create zones.

2. Verify

  • cooper_verify_domain with the dom_… id checks DNS now (at most once per

60 seconds; otherwise HTTP 429 with Retry-After). A daily cron also checks.

  • Each record reports valid, missing, or invalid, plus what was found.

Show the user the exact missing or wrong records.

  • mail.receiving, mail.sending, and mail.inboxes stay false until the

matching records verify. Receiving goes live within a few minutes after that.

  • With a webhook, subscribe to domain.verified instead of polling.
  • cooper_list_domains lists every domain with its status.

3. Create inboxes on it

cooper_create_inbox with username and domain once the domain is verified
and mail.receiving is true. Errors: 404 domain_not_found,
409 domain_not_verified, 409 domain_receiving_not_ready.

Remove

DELETE /api/v1/domains/{id} over HTTP. It restores the previous catch-all and
deletes only the DNS records Cooper created. Confirm with the user first.

Guardrails

  • Never invent a domain, or claim one is verified before cooper_verify_domain

or cooper_list_domains says so.

  • 409 domain_exists means another account already registered it.