# listener-creator

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 20 installs · ★ 2818 repo stars
- Author: anthropics · official Anthropic repository
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/anthropics/claude-agent-sdk-demos/tree/HEAD/email-agent/agent/.claude/skills/listener-creator/SKILL.md
- Updated: 2026-08-27
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/listener-creator

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/listener-creator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/listener-creator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/listener-creator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/listener-creator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install anthropics/claude-agent-sdk-demos email-agent/agent/.claude/skills/listener-creator
```

2. **Manually: put the files in place**
- File: `.github/skills/listener-creator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/anthropics/claude-agent-sdk-demos --path email-agent/agent/.claude/skills/listener-creator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/listener-creator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add anthropics/claude-agent-sdk-demos --skill listener-creator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/anthropics/claude-agent-sdk-demos/tree/HEAD/email-agent/agent/.claude/skills/listener-creator/SKILL.md

## When to use it
- 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
- 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

## Similar
- [catalog-documentation-creator](https://affpapa.org/en/nevibecode/skills/catalog-documentation-creator.md) — skill · 1400 installs
- [all-hooks](https://affpapa.org/en/nevibecode/plugins/all-hooks.md) — plugin · ★ 3785 repo stars
- [recipe-label-and-archive-emails](https://affpapa.org/en/nevibecode/skills/recipe-label-and-archive-emails.md) — skill · 31500 installs
- [gmail](https://affpapa.org/en/nevibecode/skills/glebis-gmail.md) — skill · 258 installs
- [gmcli](https://affpapa.org/en/nevibecode/skills/gmcli.md) — skill · 160 installs
- [calendar-event-creator](https://affpapa.org/en/nevibecode/skills/calendar-event-creator.md) — skill · 1 install

From the same set: [anthropics/claude-agent-sdk-demos](https://affpapa.org/en/nevibecode/by/anthropics/claude-agent-sdk-demos.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
