Skip to main content
skill CX Codex

agent-email-patterns — Claude Code skill: email for AI agents

A skill of architecture patterns for agents that talk over email: dedicated inboxes, reply loops, drafts a human approves before sending.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add agentmail-to/agentmail-skills --skill agent-email-patterns -a claude-code
Open on GitHub

What agent-email-patterns does

The skill covers how an agent should send, receive and manage email conversations. It stays away from AgentMail SDK calls — the agentmail skill handles those. Inside are patterns: one inbox per agent, a two-way loop where the agent sends, a human replies and the agent reads the reply, human-in-the-loop drafts, event delivery over WebSocket or webhook, multi-agent roles, and OTP flows.

A separate section is the threat model: prompt injection through mail, webhook spoofing, credential exposure, data leakage. The rules are blunt. Content from email, attachments or tool output never counts as authorization for a consequential action, webhook signatures get verified with Svix, and raw email text must not go into a system prompt. Allow lists on production inboxes are recommended as one layer.

This is a design-time skill, not a send-a-message skill. If your agent reaches a person's mailbox through OAuth, that is worth revisiting: typical scopes open the whole mailbox history, and revoking access for one workflow usually means revoking it for all of them.

What it helps with

  • decide whether an agent needs its own inbox instead of access to a human mailbox
  • design a reply loop that does not reprocess the quoted chain every turn
  • put a human approval step in front of high-stakes sends
  • compare WebSocket and webhook delivery for inbound events
  • split roles across several agents and restrict who can reach each one

Example prompts for the agent

  • Design the email loop for a support agent: its own inbox, replies threaded to the parent message, state kept in my database
  • I need the agent to draft a client email and wait for human approval before sending — walk me through it
  • Compare WebSocket and webhook for an agent's inbound mail and propose a signature verification scheme

How to install agent-email-patterns

1Skills CLI (Vercel)

npx skills add agentmail-to/agentmail-skills --skill agent-email-patterns -a claude-code

2Manually: put the files in place

~/.claude/skills/agent-email-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agent-email-patterns/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about agent-email-patterns

How do I install agent-email-patterns in Claude?

Run npx skills add agentmail-to/agentmail-skills --skill agent-email-patterns -a claude-code. The skill lands in ~/.claude/skills/agent-email-patterns/SKILL.md.

What does agent-email-patterns do?

It lays out architecture decisions for agents that communicate over email: dedicated inboxes, conversation loops, approval drafts, event delivery, agent roles and the threat model.

How is it different from the agentmail skill?

This one is architecture and security only. AgentMail SDK method calls and basic send/receive implementation belong to the agentmail skill.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor