npx skills add ...
npx skills add anthropics/claude-agent-sdk-demos --skill action-creator
Creates user-specific one-click action templates that execute email operations when clicked in the chat interface. Use when user wants reusable actions for their specific workflows (send payment reminder to ACME Corp, forward bugs to engineering, archive old newsletters from specific sources).
npx skills add anthropics/claude-agent-sdk-demos --skill action-creator
Creates TypeScript action template files that define reusable, user-specific operations users can execute with one click in the chat interface.
Use this skill when the user wants to:
Key difference from listeners: Actions are user-triggered (clicked in chat), while listeners are event-triggered (automatic).
Actions are TypeScript files in agent/custom_scripts/actions/ that:
config object defining the template metadata and parameter schemahandler function that executes the operation with given parametersActionContext methods to perform operations (email API, send emails, call AI, etc.)The agent creates action instances during conversation by providing specific parameters to these templates, which appear as clickable buttons in the chat.
Parse the user's request to identify:
Create a file in agent/custom_scripts/actions/ with this structure:
Use kebab-case that reflects the user-specific operation:
send-payment-reminder-to-acme.ts (not send-email.ts)forward-bugs-to-engineering.ts (not forward-email.ts)archive-newsletters-from-techcrunch.ts (not archive-emails.ts)summarize-weekly-updates-from-ceo.ts (not summarize-emails.ts)Important: Templates should be specific to the user's actual workflows, vendors, teams, and processes.
The ActionContext provides these capabilities:
Always return an ActionResult object:
Reference the template files for common patterns:
context.callAgent() for intelligent processingcontext.log() for debugging and audit trailDefine parameters using JSON Schema:
When the user requests an action template:
Clarify user-specific context:
Write the TypeScript file in agent/custom_scripts/actions/
Use Write tool to create the file with:
Test parameters: Ensure all required parameters are defined
Confirm with user that the action matches their workflow
User-specific → Compose email with template → Send → Return result
Search emails → Filter → Apply operation to each → Return count
Get email → Call AI to analyze → Use AI result → Take action → Return summary
Get email → AI analysis → Compose enhanced forward → Send → Label original
Always import types from the correct location:
After you create an action template:
Example flow:
Full specification: See project root ACTIONS_SPEC.md for complete details on: