[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CG1QRFM5S4VXSF01FC12Y9":3,"skill-same:01M6CG1QRFM5S4VXSF01FC12Y9":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6CG1QRFM5S4VXSF01FC12Y9","action-creator",null,"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).","foksa\u002Fopen-claude-agent-sdk","foksa","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2655696?v=4","01M6CG18CS8KTJE4F6AS39QD62","Djordje Radakovic","01M6CG18GZKNTK5H70NW3VB6SF",8,"MIT","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"action creator","workflows","actions","email","engineering","templates","archive","read","write","edit","user","execute","operations","use","reusable","2026-11-10 10:12:30",false,"---\nname: action-creator\ndescription: 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).\nallowed-tools: Write, Edit, Read, Glob\n---\n\n# Action Creator\n\nCreates TypeScript action template files that define reusable, user-specific operations users can execute with one click in the chat interface.\n\n## When to Use This Skill\n\nUse this skill when the user wants to:\n- Create reusable actions for their specific workflows (\"I often need to send payment reminders to ACME Corp\")\n- Set up one-click operations for their vendors\u002Fcustomers (\"Forward bugs to engineering team\")\n- Automate repetitive email tasks with their specific context (\"Archive newsletters from TechCrunch\u002FMorning Brew\")\n- Build personalized email management tools for their business processes\n\n**Key difference from listeners**: Actions are **user-triggered** (clicked in chat), while listeners are **event-triggered** (automatic).\n\n## How Actions Work\n\nActions are TypeScript files in `agent\u002Fcustom_scripts\u002Factions\u002F` that:\n1. Export a `config` object defining the template metadata and parameter schema\n2. Export a `handler` function that executes the operation with given parameters\n3. Use `ActionContext` methods to perform operations (email API, send emails, call AI, etc.)\n\nThe agent creates **action instances** during conversation by providing specific parameters to these templates, which appear as clickable buttons in the chat.\n\n## Creating an Action Template\n\n### 1. Understand User-Specific Workflow\n\nParse the user's request to identify:\n- **User context**: Who are their specific vendors\u002Fcustomers\u002Fteams?\n- **Operation**: What specific action do they need? (send to ACME Corp, forward to engineering team, etc.)\n- **Parameters**: What varies per execution? (invoice number, priority level, days old)\n- **Frequency**: How often will they use this?\n\n### 2. Write the Action Template File\n\nCreate a file in `agent\u002Fcustom_scripts\u002Factions\u002F` with this structure:\n\n```typescript\nimport type { ActionTemplate, ActionContext, ActionResult } from \"..\u002Ftypes\";\n\nexport const config: ActionTemplate = {\n  id: \"unique_action_id\",                    \u002F\u002F kebab-case, user-specific\n  name: \"Human Readable Name\",                \u002F\u002F For UI display\n  description: \"What this action does\",       \u002F\u002F Explain the operation\n  icon: \"?\",                                 \u002F\u002F Optional emoji icon\n  parameterSchema: {\n    type: \"object\",\n    properties: {\n      paramName: {\n        type: \"string\",                      \u002F\u002F or \"number\", \"boolean\"\n        description: \"Parameter description\",\n        enum: [\"option1\", \"option2\"],        \u002F\u002F Optional: restrict values\n        default: \"defaultValue\"              \u002F\u002F Optional: default value\n      }\n    },\n    required: [\"paramName\"]                  \u002F\u002F List required parameters\n  }\n};\n\nexport async function handler(\n  params: Record\u003Cstring, any>,\n  context: ActionContext\n): Promise\u003CActionResult> {\n  const { paramName } = params;\n\n  context.log(`Starting action: ${config.name}`);\n\n  try {\n    \u002F\u002F 1. Perform operations using context methods\n    \u002F\u002F 2. Use AI for intelligent processing if needed\n    \u002F\u002F 3. Update emails, send emails, etc.\n\n    context.notify(\"Action completed successfully\", {\n      type: \"success\",\n      priority: \"normal\"\n    });\n\n    return {\n      success: true,\n      message: \"Action completed successfully\",\n      data: { \u002F* optional structured data *\u002F },\n      refreshInbox: true  \u002F\u002F Optional: refresh inbox after action\n    };\n  } catch (error: any) {\n    context.log(`Action failed: ${error}`, \"error\");\n    return {\n      success: false,\n      message: `Failed: ${error.message}`\n    };\n  }\n}\n```\n\n### 3. File Naming Convention\n\nUse kebab-case that reflects the **user-specific** operation:\n- `send-payment-reminder-to-acme.ts` (not `send-email.ts`)\n- `forward-bugs-to-engineering.ts` (not `forward-email.ts`)\n- `archive-newsletters-from-techcrunch.ts` (not `archive-emails.ts`)\n- `summarize-weekly-updates-from-ceo.ts` (not `summarize-emails.ts`)\n\n**Important**: Templates should be specific to the user's actual workflows, vendors, teams, and processes.\n\n### 4. Available Context Methods\n\nThe `ActionContext` provides these capabilities:\n\n```typescript\n\u002F\u002F Email API operations\nconst emails = await context.emailAPI.getInbox({ limit: 30, includeRead: false });\nconst results = await context.emailAPI.searchEmails({ from: \"sender@example.com\" });\nconst results = await context.emailAPI.searchWithGmailQuery(\"from:sender after:2024\u002F01\u002F01\");\nconst emails = await context.emailAPI.getEmailsByIds([\"id1\", \"id2\"]);\nconst email = await context.emailAPI.getEmailById(\"email-id\");\n\n\u002F\u002F Direct email operations\nawait context.archiveEmail(emailId);\nawait context.starEmail(emailId);\nawait context.unstarEmail(emailId);\nawait context.markAsRead(emailId);\nawait context.markAsUnread(emailId);\nawait context.addLabel(emailId, \"label-name\");\nawait context.removeLabel(emailId, \"label-name\");\n\n\u002F\u002F Send emails\nconst result = await context.sendEmail({\n  to: \"recipient@example.com\",\n  subject: \"Email subject\",\n  body: \"Email body content\",\n  cc: \"cc@example.com\",           \u002F\u002F Optional\n  bcc: \"bcc@example.com\",          \u002F\u002F Optional\n  replyTo: \"reply@example.com\"     \u002F\u002F Optional\n});\n\n\u002F\u002F AI-powered processing\nconst analysis = await context.callAgent\u003CResultType>({\n  prompt: \"Analyze this email and extract key info...\",\n  systemPrompt: \"You are an expert at...\",  \u002F\u002F Optional\n  tools: [\"Read\", \"WebSearch\"],              \u002F\u002F Optional\n  maxTokens: 2000                            \u002F\u002F Optional\n});\n\n\u002F\u002F Session messaging (inject into chat)\ncontext.addUserMessage(\"User said this\");\ncontext.addAssistantMessage(\"Assistant responds\");\ncontext.addSystemMessage(\"System notification\");\n\n\u002F\u002F Notifications\ncontext.notify(\"Operation completed\", {\n  priority: \"high\" | \"normal\" | \"low\",\n  type: \"info\" | \"success\" | \"warning\" | \"error\"\n});\n\n\u002F\u002F External API access\nconst response = await context.fetch(\"https:\u002F\u002Fapi.example.com\u002Fdata\");\nconst data = await response.json();\n\n\u002F\u002F Logging (visible in server logs)\ncontext.log(\"Info message\", \"info\");\ncontext.log(\"Warning message\", \"warn\");\ncontext.log(\"Error message\", \"error\");\n```\n\n## Action Result\n\nAlways return an `ActionResult` object:\n\n```typescript\nreturn {\n  success: true,                          \u002F\u002F Required: boolean\n  message: \"Human-readable result\",       \u002F\u002F Required: string\n  data: { key: \"value\" },                \u002F\u002F Optional: structured data\n  suggestedActions: [],                   \u002F\u002F Optional: follow-up actions\n  refreshInbox: true                      \u002F\u002F Optional: refresh inbox\n};\n```\n\n## Examples and Templates\n\nReference the template files for common patterns:\n\n- **[send-payment-reminder.ts](templates\u002Fsend-payment-reminder.ts)**: Send invoice reminders to specific vendor\n- **[forward-bug-report.ts](templates\u002Fforward-bug-report.ts)**: Forward bugs to engineering with AI analysis\n- **[archive-old-newsletters.ts](templates\u002Farchive-old-newsletters.ts)**: Archive newsletters from specific sources\n\n## Best Practices\n\n1. **User-Specific Templates**: Create templates tailored to user's actual vendors, customers, teams, and processes\n2. **Descriptive Naming**: Use specific names that reflect the operation (not generic like \"send-email\")\n3. **Rich Parameter Schemas**: Define clear parameter types with descriptions\n4. **AI-Powered**: Use `context.callAgent()` for intelligent processing\n5. **Error Handling**: Always wrap operations in try-catch and return meaningful errors\n6. **Clear Messages**: Return human-readable success\u002Ffailure messages\n7. **Idempotency**: Design handlers to be safely re-runnable when possible\n8. **Logging**: Use `context.log()` for debugging and audit trail\n\n## Parameter Schema Guidelines\n\nDefine parameters using JSON Schema:\n\n```typescript\nparameterSchema: {\n  type: \"object\",\n  properties: {\n    \u002F\u002F String parameter\n    emailId: {\n      type: \"string\",\n      description: \"Email ID to process\"\n    },\n\n    \u002F\u002F Number parameter with default\n    daysOld: {\n      type: \"number\",\n      description: \"Number of days old\",\n      default: 30\n    },\n\n    \u002F\u002F Enum parameter (dropdown)\n    priority: {\n      type: \"string\",\n      description: \"Priority level\",\n      enum: [\"P0 - Critical\", \"P1 - High\", \"P2 - Medium\", \"P3 - Low\"]\n    },\n\n    \u002F\u002F Boolean parameter\n    sendNotification: {\n      type: \"boolean\",\n      description: \"Send notification when complete\"\n    }\n  },\n  required: [\"emailId\", \"priority\"]  \u002F\u002F List required params\n}\n```\n\n## Creating the File\n\nWhen the user requests an action template:\n\n1. **Clarify user-specific context**:\n   - Who are their vendors\u002Fcustomers\u002Fteams?\n   - What are their specific workflows?\n   - What parameters vary per execution?\n\n2. **Write the TypeScript file** in `agent\u002Fcustom_scripts\u002Factions\u002F`\n\n3. **Use Write tool** to create the file with:\n   - Proper imports from \"..\u002Ftypes\"\n   - User-specific config (not generic)\n   - Parameter schema with all required fields\n   - Handler with error handling\n   - Clear success\u002Ffailure messages\n\n4. **Test parameters**: Ensure all required parameters are defined\n\n5. **Confirm with user** that the action matches their workflow\n\n## Common Patterns\n\n### 1. Send Email to Specific Recipient\nUser-specific → Compose email with template → Send → Return result\n\n```typescript\nconst body = `Hi ${recipientName},\nYour invoice ${invoiceNumber} for ${amount} is ${daysPastDue} days past due...`;\n\nawait context.sendEmail({\n  to: \"accounts.payable@acmecorp.com\",\n  subject: `Payment Reminder: Invoice ${invoiceNumber}`,\n  body\n});\n```\n\n### 2. Bulk Email Operation\nSearch emails → Filter → Apply operation to each → Return count\n\n```typescript\nconst emails = await context.emailAPI.searchWithGmailQuery(query);\nfor (const email of emails) {\n  await context.archiveEmail(email.messageId);\n}\nreturn { success: true, message: `Archived ${emails.length} emails` };\n```\n\n### 3. AI-Powered Email Processing\nGet email → Call AI to analyze → Use AI result → Take action → Return summary\n\n```typescript\nconst email = await context.emailAPI.getEmailById(emailId);\nconst analysis = await context.callAgent({\n  prompt: `Analyze this bug report: ${email.body}...`,\n  maxTokens: 1000\n});\nawait context.sendEmail({ to: \"engineering@company.com\", ... });\n```\n\n### 4. Email Forwarding with Enhancement\nGet email → AI analysis → Compose enhanced forward → Send → Label original\n\n```typescript\nconst email = await context.emailAPI.getEmailById(emailId);\nconst analysis = await context.callAgent({ \u002F* analyze *\u002F });\nawait context.sendEmail({\n  to: \"team@company.com\",\n  subject: `[${priority}] ${email.subject}`,\n  body: `AI Analysis:\\n${analysis}\\n\\nOriginal:\\n${email.body}`\n});\nawait context.addLabel(emailId, \"FORWARDED\");\n```\n\n## Type Imports\n\nAlways import types from the correct location:\n\n```typescript\nimport type { ActionTemplate, ActionContext, ActionResult } from \"..\u002Ftypes\";\n\n\u002F\u002F ActionTemplate: Template metadata and parameter schema\n\u002F\u002F ActionContext: Runtime context with all capabilities\n\u002F\u002F ActionResult: Return type for handler function\n```\n\n## How Users Trigger Actions\n\nAfter you create an action template:\n\n1. **Agent discovers template**: During conversation, agent reads available actions\n2. **Agent creates instance**: Agent provides specific parameters for user's situation\n3. **User sees button**: Action instance appears as clickable button in chat\n4. **User clicks**: Action executes with pre-filled parameters\n5. **Result appears**: Success\u002Ffailure message shown in chat\n\nExample flow:\n```\nUser: \"I need to follow up on the ACME invoice\"\nAgent: [searches emails, finds Invoice #2024-001 is 15 days overdue]\nAgent: Creates action instance with parameters:\n  {\n    templateId: \"send_payment_reminder_acme\",\n    params: { invoiceNumber: \"INV-2024-001\", amount: \"$5,000\", daysPastDue: 15 }\n  }\nUser: [sees button \"Send payment reminder to ACME Corp for Invoice #2024-001\"]\nUser: [clicks button]\nAction: Executes, sends email, returns \"Payment reminder sent to ACME Corp\"\n```\n\n## Reference\n\nFull specification: See project root `ACTIONS_SPEC.md` for complete details on:\n- Complete type definitions\n- ActionsManager implementation\n- WebSocket protocol\n- Frontend integration\n- Advanced examples\n- Logging and audit trail\n","# Action Creator\n\nCreates TypeScript action template files that define reusable, user-specific operations users can execute with one click in the chat interface.\n\n## When to Use This Skill\n\nUse this skill when the user wants to:\n- Create reusable actions for their specific workflows (\"I often need to send payment reminders to ACME Corp\")\n- Set up one-click operations for their vendors\u002Fcustomers (\"Forward bugs to engineering team\")\n- Automate repetitive email tasks with their specific context (\"Archive newsletters from TechCrunch\u002FMorning Brew\")\n- Build personalized email management tools for their business processes\n\n**Key difference from listeners**: Actions are **user-triggered** (clicked in chat), while listeners are **event-triggered** (automatic).\n\n## How Actions Work\n\nActions are TypeScript files in `agent\u002Fcustom_scripts\u002Factions\u002F` that:\n1. Export a `config` object defining the template metadata and parameter schema\n2. Export a `handler` function that executes the operation with given parameters\n3. Use `ActionContext` methods to perform operations (email API, send emails, call AI, etc.)\n\nThe agent creates **action instances** during conversation by providing specific parameters to these templates, which appear as clickable buttons in the chat.\n\n## Creating an Action Template\n\n### 1. Understand User-Specific Workflow\n\nParse the user's request to identify:\n- **User context**: Who are their specific vendors\u002Fcustomers\u002Fteams?\n- **Operation**: What specific action do they need? (send to ACME Corp, forward to engineering team, etc.)\n- **Parameters**: What varies per execution? (invoice number, priority level, days old)\n- **Frequency**: How often will they use this?\n\n### 2. Write the Action Template File\n\nCreate a file in `agent\u002Fcustom_scripts\u002Factions\u002F` with this structure:\n\n```typescript\nimport type { ActionTemplate, ActionContext, ActionResult } from \"..\u002Ftypes\";\n\nexport const config: ActionTemplate = {\n  id: \"unique_action_id\",                    \u002F\u002F kebab-case, user-specific\n  name: \"Human Readable Name\",                \u002F\u002F For UI display\n  description: \"What this action does\",       \u002F\u002F Explain the operation\n  icon: \"?\",                                 \u002F\u002F Optional emoji icon\n  parameterSchema: {\n    type: \"object\",\n    properties: {\n      paramName: {\n        type: \"string\",                      \u002F\u002F or \"number\", \"boolean\"\n        description: \"Parameter description\",\n        enum: [\"option1\", \"option2\"],        \u002F\u002F Optional: restrict values\n        default: \"defaultValue\"              \u002F\u002F Optional: default value\n      }\n    },\n    required: [\"paramName\"]                  \u002F\u002F List required parameters\n  }\n};\n\nexport async function handler(\n  params: Record\u003Cstring, any>,\n  context: ActionContext\n): Promise\u003CActionResult> {\n  const { paramName } = params;\n\n  context.log(`Starting action: ${config.name}`);\n\n  try {\n    \u002F\u002F 1. Perform operations using context methods\n    \u002F\u002F 2. Use AI for intelligent processing if needed\n    \u002F\u002F 3. Update emails, send emails, etc.\n\n    context.notify(\"Action completed successfully\", {\n      type: \"success\",\n      priority: \"normal\"\n    });\n\n    return {\n      success: true,\n      message: \"Action completed successfully\",\n      data: { \u002F* optional structured data *\u002F },\n      refreshInbox: true  \u002F\u002F Optional: refresh inbox after action\n    };\n  } catch (error: any) {\n    context.log(`Action failed: ${error}`, \"error\");\n    return {\n      success: false,\n      message: `Failed: ${error.message}`\n    };\n  }\n}\n```\n\n### 3. File Naming Convention\n\nUse kebab-case that reflects the **user-specific** operation:\n- `send-payment-reminder-to-acme.ts` (not `send-email.ts`)\n- `forward-bugs-to-engineering.ts` (not `forward-email.ts`)\n- `archive-newsletters-from-techcrunch.ts` (not `archive-emails.ts`)\n- `summarize-weekly-updates-from-ceo.ts` (not `summarize-emails.ts`)\n\n**Important**: Templates should be specific to the user's actual workflows, vendors, teams, and processes.\n\n### 4. Available Context Methods\n\nThe `ActionContext` provides these capabilities:\n\n```typescript\n\u002F\u002F Email API operations\nconst emails = await context.emailAPI.getInbox({ limit: 30, includeRead: false });\nconst results = await context.emailAPI.searchEmails({ from: \"sender@example.com\" });\nconst results = await context.emailAPI.searchWithGmailQuery(\"from:sender after:2024\u002F01\u002F01\");\nconst emails = await context.emailAPI.getEmailsByIds([\"id1\", \"id2\"]);\nconst email = await context.emailAPI.getEmailById(\"email-id\");\n\n\u002F\u002F Direct email operations\nawait context.archiveEmail(emailId);\nawait context.starEmail(emailId);\nawait context.unstarEmail(emailId);\nawait context.markAsRead(emailId);\nawait context.markAsUnread(emailId);\nawait context.addLabel(emailId, \"label-name\");\nawait context.removeLabel(emailId, \"label-name\");\n\n\u002F\u002F Send emails\nconst result = await context.sendEmail({\n  to: \"recipient@example.com\",\n  subject: \"Email subject\",\n  body: \"Email body content\",\n  cc: \"cc@example.com\",           \u002F\u002F Optional\n  bcc: \"bcc@example.com\",          \u002F\u002F Optional\n  replyTo: \"reply@example.com\"     \u002F\u002F Optional\n});\n\n\u002F\u002F AI-powered processing\nconst analysis = await context.callAgent\u003CResultType>({\n  prompt: \"Analyze this email and extract key info...\",\n  systemPrompt: \"You are an expert at...\",  \u002F\u002F Optional\n  tools: [\"Read\", \"WebSearch\"],              \u002F\u002F Optional\n  maxTokens: 2000                            \u002F\u002F Optional\n});\n\n\u002F\u002F Session messaging (inject into chat)\ncontext.addUserMessage(\"User said this\");\ncontext.addAssistantMessage(\"Assistant responds\");\ncontext.addSystemMessage(\"System notification\");\n\n\u002F\u002F Notifications\ncontext.notify(\"Operation completed\", {\n  priority: \"high\" | \"normal\" | \"low\",\n  type: \"info\" | \"success\" | \"warning\" | \"error\"\n});\n\n\u002F\u002F External API access\nconst response = await context.fetch(\"https:\u002F\u002Fapi.example.com\u002Fdata\");\nconst data = await response.json();\n\n\u002F\u002F Logging (visible in server logs)\ncontext.log(\"Info message\", \"info\");\ncontext.log(\"Warning message\", \"warn\");\ncontext.log(\"Error message\", \"error\");\n```\n\n## Action Result\n\nAlways return an `ActionResult` object:\n\n```typescript\nreturn {\n  success: true,                          \u002F\u002F Required: boolean\n  message: \"Human-readable result\",       \u002F\u002F Required: string\n  data: { key: \"value\" },                \u002F\u002F Optional: structured data\n  suggestedActions: [],                   \u002F\u002F Optional: follow-up actions\n  refreshInbox: true                      \u002F\u002F Optional: refresh inbox\n};\n```\n\n## Examples and Templates\n\nReference the template files for common patterns:\n\n- **[send-payment-reminder.ts](templates\u002Fsend-payment-reminder.ts)**: Send invoice reminders to specific vendor\n- **[forward-bug-report.ts](templates\u002Fforward-bug-report.ts)**: Forward bugs to engineering with AI analysis\n- **[archive-old-newsletters.ts](templates\u002Farchive-old-newsletters.ts)**: Archive newsletters from specific sources\n\n## Best Practices\n\n1. **User-Specific Templates**: Create templates tailored to user's actual vendors, customers, teams, and processes\n2. **Descriptive Naming**: Use specific names that reflect the operation (not generic like \"send-email\")\n3. **Rich Parameter Schemas**: Define clear parameter types with descriptions\n4. **AI-Powered**: Use `context.callAgent()` for intelligent processing\n5. **Error Handling**: Always wrap operations in try-catch and return meaningful errors\n6. **Clear Messages**: Return human-readable success\u002Ffailure messages\n7. **Idempotency**: Design handlers to be safely re-runnable when possible\n8. **Logging**: Use `context.log()` for debugging and audit trail\n\n## Parameter Schema Guidelines\n\nDefine parameters using JSON Schema:\n\n```typescript\nparameterSchema: {\n  type: \"object\",\n  properties: {\n    \u002F\u002F String parameter\n    emailId: {\n      type: \"string\",\n      description: \"Email ID to process\"\n    },\n\n    \u002F\u002F Number parameter with default\n    daysOld: {\n      type: \"number\",\n      description: \"Number of days old\",\n      default: 30\n    },\n\n    \u002F\u002F Enum parameter (dropdown)\n    priority: {\n      type: \"string\",\n      description: \"Priority level\",\n      enum: [\"P0 - Critical\", \"P1 - High\", \"P2 - Medium\", \"P3 - Low\"]\n    },\n\n    \u002F\u002F Boolean parameter\n    sendNotification: {\n      type: \"boolean\",\n      description: \"Send notification when complete\"\n    }\n  },\n  required: [\"emailId\", \"priority\"]  \u002F\u002F List required params\n}\n```\n\n## Creating the File\n\nWhen the user requests an action template:\n\n1. **Clarify user-specific context**:\n   - Who are their vendors\u002Fcustomers\u002Fteams?\n   - What are their specific workflows?\n   - What parameters vary per execution?\n\n2. **Write the TypeScript file** in `agent\u002Fcustom_scripts\u002Factions\u002F`\n\n3. **Use Write tool** to create the file with:\n   - Proper imports from \"..\u002Ftypes\"\n   - User-specific config (not generic)\n   - Parameter schema with all required fields\n   - Handler with error handling\n   - Clear success\u002Ffailure messages\n\n4. **Test parameters**: Ensure all required parameters are defined\n\n5. **Confirm with user** that the action matches their workflow\n\n## Common Patterns\n\n### 1. Send Email to Specific Recipient\nUser-specific → Compose email with template → Send → Return result\n\n```typescript\nconst body = `Hi ${recipientName},\nYour invoice ${invoiceNumber} for ${amount} is ${daysPastDue} days past due...`;\n\nawait context.sendEmail({\n  to: \"accounts.payable@acmecorp.com\",\n  subject: `Payment Reminder: Invoice ${invoiceNumber}`,\n  body\n});\n```\n\n### 2. Bulk Email Operation\nSearch emails → Filter → Apply operation to each → Return count\n\n```typescript\nconst emails = await context.emailAPI.searchWithGmailQuery(query);\nfor (const email of emails) {\n  await context.archiveEmail(email.messageId);\n}\nreturn { success: true, message: `Archived ${emails.length} emails` };\n```\n\n### 3. AI-Powered Email Processing\nGet email → Call AI to analyze → Use AI result → Take action → Return summary\n\n```typescript\nconst email = await context.emailAPI.getEmailById(emailId);\nconst analysis = await context.callAgent({\n  prompt: `Analyze this bug report: ${email.body}...`,\n  maxTokens: 1000\n});\nawait context.sendEmail({ to: \"engineering@company.com\", ... });\n```\n\n### 4. Email Forwarding with Enhancement\nGet email → AI analysis → Compose enhanced forward → Send → Label original\n\n```typescript\nconst email = await context.emailAPI.getEmailById(emailId);\nconst analysis = await context.callAgent({ \u002F* analyze *\u002F });\nawait context.sendEmail({\n  to: \"team@company.com\",\n  subject: `[${priority}] ${email.subject}`,\n  body: `AI Analysis:\\n${analysis}\\n\\nOriginal:\\n${email.body}`\n});\nawait context.addLabel(emailId, \"FORWARDED\");\n```\n\n## Type Imports\n\nAlways import types from the correct location:\n\n```typescript\nimport type { ActionTemplate, ActionContext, ActionResult } from \"..\u002Ftypes\";\n\n\u002F\u002F ActionTemplate: Template metadata and parameter schema\n\u002F\u002F ActionContext: Runtime context with all capabilities\n\u002F\u002F ActionResult: Return type for handler function\n```\n\n## How Users Trigger Actions\n\nAfter you create an action template:\n\n1. **Agent discovers template**: During conversation, agent reads available actions\n2. **Agent creates instance**: Agent provides specific parameters for user's situation\n3. **User sees button**: Action instance appears as clickable button in chat\n4. **User clicks**: Action executes with pre-filled parameters\n5. **Result appears**: Success\u002Ffailure message shown in chat\n\nExample flow:\n```\nUser: \"I need to follow up on the ACME invoice\"\nAgent: [searches emails, finds Invoice #2024-001 is 15 days overdue]\nAgent: Creates action instance with parameters:\n  {\n    templateId: \"send_payment_reminder_acme\",\n    params: { invoiceNumber: \"INV-2024-001\", amount: \"$5,000\", daysPastDue: 15 }\n  }\nUser: [sees button \"Send payment reminder to ACME Corp for Invoice #2024-001\"]\nUser: [clicks button]\nAction: Executes, sends email, returns \"Payment reminder sent to ACME Corp\"\n```\n\n## Reference\n\nFull specification: See project root `ACTIONS_SPEC.md` for complete details on:\n- Complete type definitions\n- ActionsManager implementation\n- WebSocket protocol\n- Frontend integration\n- Advanced examples\n- Logging and audit trail\n",{"name":5,"description":7,"allowed-tools":47},"Write, Edit, Read, Glob","main","960015366472fde8935051e41bf06ab968a089a7","demos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator",0,"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk","https:\u002F\u002Fgithub.com\u002Ffoksa","https:\u002F\u002Ffoksa.dev","2026-11-12 05:09:11",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add foksa\u002Fopen-claude-agent-sdk --skill action-creator",{"tool":62,"command":63},"bunx","bunx skills add foksa\u002Fopen-claude-agent-sdk --skill action-creator",{"tool":65,"command":66},"pnpm","pnpm dlx skills add foksa\u002Fopen-claude-agent-sdk --skill action-creator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002FSKILL.md",true,[70,76,80],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"templates\u002Farchive-old-newsletters.ts","SCRIPT","脚本",2768,"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002Ftemplates\u002Farchive-old-newsletters.ts",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"templates\u002Fforward-bug-report.ts",3675,"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002Ftemplates\u002Fforward-bug-report.ts",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"templates\u002Fsend-payment-reminder.ts",2777,"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002Ftemplates\u002Fsend-payment-reminder.ts",[85,94,109,115,122],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":92,"publishedAt":42},"01M6CG21C0E5ETCJD0252Q463M","greeting","Respond with a friendly greeting when asked to greet someone","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002F.claude\u002Fskills\u002Fgreeting\u002FSKILL.md",[91],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[87,93],"greet",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":101,"publishedAt":42},"01M6CG1TTBHBK8J2JM5T25HN6F","listener-creator","Creates event-driven email listeners that monitor for specific conditions (like urgent emails from boss, newsletters to archive, package tracking) and execute custom actions. Use when user wants to be notified about emails, automatically handle certain emails, or set up email automation workflows.","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fopen\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Flistener-creator\u002FSKILL.md",[100],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[102,30,103,28,104,105,29,106,33,34,35,36,107,37,38,40,108],"listener creator","automation","monitor","package","SET","tracking","up",{"skillNo":110,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":42},"01M6CG1HW3W7WWXQ4NN9PPXFSW","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fofficial\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Flistener-creator\u002FSKILL.md",[113],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[102,34,35,36,107,37,38,40,108,33,103,28,104,105,29,30,106],{"skillNo":116,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":121,"publishedAt":42},"01M6CG1EGMNW6F7EDPTJHC85VW","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002Fdemos\u002Fofficial\u002Femail-agent\u002Fagent\u002F.claude\u002Fskills\u002Faction-creator\u002FSKILL.md",[119,120],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[27,36,28,29,30,31,32,33,34,35,37,38,39,40,41],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":129,"publishedAt":42},"01M6CG1AT9HEE4J84GZ8DTK4Z5","sdk-parity","Automate SDK parity updates — bump the official @anthropic-ai\u002Fclaude-agent-sdk dependency, discover new features, implement them, add tests, and update docs. Use when updating to match a new version of the official Claude Agent SDK.","https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fopen-claude-agent-sdk\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsdk-parity\u002FSKILL.md",[128],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[130,131,132,133,134,135,136,137,138,139,140,40,141],"sdk","sdk parity","official","implement","docs","version","dependency","update docs","bump","claude agent sdk","automate","update"]