listener-creator

Generate TypeScript email listeners with config and handler functions.

44|4|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/letta-ai/learning-sdk --skill listener-creator-letta-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: listener-creator
Source: https://github.com/letta-ai/learning-sdk/tree/main/examples/claude_email_agent/agent/.claude/skills/listener-creator
Command: npx skills add https://github.com/letta-ai/learning-sdk --skill listener-creator-letta-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables users to build event-driven listeners that monitor emails and trigger custom actions, reducing manual monitoring and enabling automated workflows.

Core Features & Use Cases

  • Listener templates: Generate TypeScript listeners that react to email events (e.g., email_received, scheduled_time) and apply filters and actions.
  • Config + handler: Each listener exports a config object and a handler that processes events via ListenerContext methods (notify, archive, star, label, etc.).
  • AI-assisted decisions: Use context.callAgent() for intelligent classification (urgency, category, action) rather than brittle keyword matching.
  • Real-world patterns: Notify on urgent emails from key senders, auto-archive newsletters, track package updates, or generate daily summaries.

Quick Start

Create a TypeScript file in agent/custom_scripts/listeners/ with a config and handler, then plug it into the event system so it runs when conditions are met.

Frequently Asked Questions about listener-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate email actions based on incoming events?

Event-driven email listeners automatically trigger actions like notifications, archiving, or labeling when specific email events occur. Write a TypeScript handler that exports a config object and listener function, then configure which events (email_received, scheduled_time, etc.) and actions execute in response.

Can I use AI to classify emails instead of keyword matching?

Yes. Email listeners support AI-driven classification through context.callAgent(), which performs intelligent urgency assessment, category detection, and action recommendations. This replaces brittle keyword matching with Claude-powered reasoning.

What are common use cases for email event listeners?

Email listeners handle urgent notifications from key senders, auto-archive newsletters, track package updates, and generate daily summaries. Each listener monitors a specific event and applies filters and actions via ListenerContext methods like notify, archive, star, and label.

How do I set up an email listener in TypeScript?

Create a TypeScript file in agent/custom_scripts/listeners/ that exports a config object specifying the trigger event and a handler function using ListenerContext methods. The listener runs automatically when conditions are met.

Does this work with scheduled email tasks?

Yes. Listeners support scheduled_time events alongside reactive email events, enabling time-based workflows like daily summary generation or periodic email processing tasks.

What email events can triggers monitor?

Listeners react to email_received, email_sent, email_archived, email_labeled, and scheduled_time events. Each event type allows different filter and action combinations for flexible automation.