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).
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "action-creator" 技能: 1. 下载 https://raw.githubusercontent.com/anthropics/claude-agent-sdk-demos/main/email-agent/agent/.claude/skills/action-creator/SKILL.md 2. 保存为 ~/.claude/skills/action-creator/SKILL.md 3. 装好后重载技能,告诉我可以用了
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:
import type { ActionTemplate, ActionContext, ActionResult } from "../types";
export const config: ActionTemplate = {
id: "unique_action_id", // kebab-case, user-specific
name: "Human Readable Name", // For UI display
description: "What this action does", // Explain the operation
icon: "📨", // Optional emoji icon
parameterSchema: {
type: "object",
properties: {
paramName: {
type: "string", // or "number", "boolean"
description: "Parameter description",
enum: ["option1", "option2"], // Optional: restrict values
default: "defaultValue" // Optional: default value
}
},
required: ["paramName"] // List required parameters
}
};
export async function handler(
params: Record<string, any>,
context: ActionContext
): Promise<ActionResult> {
const { paramName } = params;
context.log(`Starting action: ${config.name}`);
try {
// 1. Perform operations using context methods
// 2. Use AI for intelligent processing if needed
// 3. Update emails, send emails, etc.
context.notify("Action completed successfully", {
type: "success",
priority: "normal"
});
return {
success: true,
message: "Action completed successfully",
data: { /* optional structured data */ },
refreshInbox: true // Optional: refresh inbox after action
};
} catch (error: any) {
context.log(`Action failed: ${error}`, "error");
return {
success: false,
message: `Failed: ${error.message}`
};
}
}
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.
…
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.
Transforms research findings into executive-ready briefings. Automatically activated when user mentions 'executive', 'briefing', 'C-suite', 'board', 'leadership', or 'presentation'.
生成人员规模、流失率、多元化与组织健康等人力分析报告
帮助你为具体产品场景选择合适的 Zoom 能力层,并清晰说明技术取舍。
根据受众与汇报节奏生成清晰的项目进展与干系人更新
在分享分析结论前,检查方法、计算、偏差与结论是否可靠