agentmail-cli — Claude Code skill: AgentMail commands from a shell
Gives your agent the official AgentMail CLI: inboxes, messages, drafts, webhooks and domains, with JSON or YAML output.
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a claude-codeWhat agentmail-cli does
The skill spells out agentmail commands and how to call them. Your agent gets ready examples for inboxes, messages and threads, drafts, pods, webhooks and domains — from agentmail inboxes list to agentmail domains verify --domain-id <domain_id>. A resource nested under another becomes a nested subcommand: inboxes messages, pods threads. The colon form inboxes:messages is rejected in CLI 1.x, so older snippets you find elsewhere will fail.
Setup is two steps: npm install -g agentmail-cli, then export AGENTMAIL_API_KEY="am_...". A single call can override the key with --api-key, and --base-url or --environment help when the API is not on the default host. Output is controlled by --format: auto, pretty, json, jsonl, yaml, raw, explore. Handy when a script parses the result.
The skill stays away from SDK code, MCP setup and framework adapters — it is not meant for those. Deleting an inbox cannot be undone, so check the --inbox-id first. Replies need a message ID, and you should fetch the full message before trusting its body. For any administrative command the skill does not cover, run agentmail --help and the resource's own help.
What it helps with
- create an inbox for a support agent
- read and search mail in an inbox
- send a reply to a specific message
- stage a draft and send it after review
- dump thread lists as JSON for a script
Example prompts for the agent
- list all my agentmail inboxes
- send a message from the support inbox with subject Hello
- create a draft reply and show it before sending
How to install agentmail-cli
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a claude-code2Manually: put the files in place
~/.claude/skills/agentmail-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agentmail-cli/
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a codex2Manually: put the files in place
.agents/skills/agentmail-cli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a cursor2Manually: put the files in place
.cursor/skills/agentmail-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install agentmail-to/agentmail-skills agentmail-cli2Manually: put the files in place
.github/skills/agentmail-cli/SKILL.md1Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a gemini-cli2Platform CLI
gemini skills install https://github.com/agentmail-to/agentmail-skills --path agentmail-cliManually: put the files in place
.devin/skills/agentmail-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agentmail-cli
How do I install agentmail-cli in Claude?
Run npx skills add agentmail-to/agentmail-skills --skill agentmail-cli -a claude-code. The skill then lives at ~/.claude/skills/agentmail-cli/SKILL.md.
What does agentmail-cli do?
It hands your agent the official AgentMail CLI commands: list and create inboxes, read and search mail, send and reply, manage drafts, pods, webhooks and domains. Output flags cover JSON, YAML and other formats.
What do I need before using it?
The CLI installed via npm install -g agentmail-cli and an API key in AGENTMAIL_API_KEY. For one call you can pass the key with --api-key instead.