listener-creator — Claude Code skill: automate email workflows
listener-creator is a skill that generates TypeScript email listeners to filter messages by conditions and notify, archive, star, or label them, automating email handling.
no license 20 installs ★ 2,818 updated 2026-08-27
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a claude-codeWhat listener-creator does
listener-creator writes listener files to agent/custom_scripts/listeners/. Each listener watches email events: arrival, send, star, archive, label. Inside is TypeScript with a handler function that filters emails and calls actions through context: notify, archive, star, mark read, add label.
The skill emphasizes AI-powered classification over hard-coded keyword lists. To determine if an email is urgent or what category it belongs to, a listener calls context.callAgent() with a prompt and result schema — for instance, classifying urgency through context understanding rather than word matching. This yields better accuracy than keyword search.
You need type imports from ../types (ListenerConfig, Email, ListenerContext) and understanding of config structure (id, name, event, enabled). Listeners load automatically on system startup if enabled: true. The skill recommends "haiku" model for fast classification.
What it helps with
- notify when urgent emails arrive from specific senders
- auto-archive newsletters and service notifications
- label and sort emails by delivery type or origin
- intercept emails by content and trigger actions without manual review
- build complex email workflows with AI-powered categorization
Example prompts for the agent
- Create a listener that stars all urgent emails from my manager
- Set up automation to archive marketing newsletters and delivery notifications
- Write a listener that sends me a notification when a package tracking update arrives
How to install listener-creator
1Skills CLI (Vercel)
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a claude-code2Manually: put the files in place
~/.claude/skills/listener-creator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/listener-creator/
1Skills CLI (Vercel)
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a codex2Manually: put the files in place
.agents/skills/listener-creator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a cursor2Manually: put the files in place
.cursor/skills/listener-creator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install anthropics/claude-agent-sdk-demos email-agent/agent/.claude/skills/listener-creator2Manually: put the files in place
.github/skills/listener-creator/SKILL.md1Skills CLI (Vercel)
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a gemini-cli2Platform CLI
gemini skills install https://github.com/anthropics/claude-agent-sdk-demos --path email-agent/agent/.claude/skills/listener-creatorManually: put the files in place
.devin/skills/listener-creator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -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 listener-creator
How do I install listener-creator in Claude Code?
Run npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a claude-code in your terminal, then open ~/.claude/skills/listener-creator/SKILL.md to review. For other platforms, change the -a flag to codex, cursor, or check docs for GitHub Copilot and Gemini CLI.
What does listener-creator do?
The skill generates TypeScript listener files that monitor email events (arrival, archive, labels) and perform actions: notify, archive, star, label. Listeners can use AI for intelligent categorization instead of hard-coded rules.
Do I write code by hand or does the skill generate everything?
The skill generates the listener structure and provides examples. You describe what to watch for and what to do; the skill writes TypeScript with a handler and context methods — context.notify(), context.archiveEmail(), context.callAgent() for AI analysis.