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…
Об этом скилле
Action Creator
Creates TypeScript action template files that define reusable, user-specific operations users can execute with one click in the chat interface.
When to Use This Skill
Use this skill when the user wants to:
- Create reusable actions for their specific workflows ("I often need to send payment reminders to ACME Corp")
- Set up one-click operations for their vendors/customers ("Forward bugs to engineering team")
- Automate repetitive email tasks with their specific context ("Archive newsletters from TechCrunch/Morning Brew")
- Build personalized email management tools for their business processes
Key difference from listeners: Actions are user-triggered (clicked in chat), while listeners are event-triggered (automatic).
How Actions Work
Actions are TypeScript files in agent/custom_scripts/actions/ that:
- Export a
configobject defining the template metadata and parameter schema - Export a
handlerfunction that executes the operation with given parameters - Use
ActionContextmethods 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.
Creating an Action Template
1. Understand User-Specific Workflow
Parse the user's request to identify:
- User context: Who are their specific vendors/customers/teams?
- Operation: What specific action do they need? (send to ACME Corp, forward to engineering team, etc.)
- Parameters: What varies per execution? (invoice number, priority level, days old)
- Frequency: How often will they use this?
2. Write the Action Template File
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}`
};
}
}
3. File Naming Convention
Use kebab-case that reflects the user-specific operation:
send-payment-reminder-to-acme.ts(notsend-email.ts)forward-bugs-to-engineering.ts(notforward-email.ts)archive-newsletters-from-techcrunch.ts(notarchive-emails.ts)summarize-weekly-updates-from-ceo.ts(notsummarize-emails.ts)
Important: Templates should be specific to the user's actual workflows, vendors, teams, and processes.
4. Available Context Methods
The ActionContext provides these capabilities:
// Email API operations
const emails = await context.emailAPI.getInbox({ limit: 30, includeRead: false });
const results = await context.emailAPI.searchEmails({ from: "[email protected]" });
const results = await context.emailAPI.searchWithGmailQuery("from:sender after:2024/01/01");
const emails = await context.emailAPI.getEmailsByIds(["id1", "id2"]);
const email = await context.emailAPI.getEmailById("email-id");
// Direct email operations
await context.archiveEmail(emailId);
await context.starEmail(emailId);
await context.unstarEmail(emailId);
await context.markAsRead(emailId);
await context.markAsUnread(emailId);
await context.addLabel(emailId, "label-name");
await context.removeLabel(emailId, "label-name");
// Send emails
const result = await context.sendEmail({
to: "[email protected]",
subject: "Email subject",
body: "Email body content",
cc: "[email protected]", // Optional
bcc: "[email protected]", //
Установить action-creator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
WriteEditReadGlobВложенные файлы
FAQ
Что делает скилл 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).
Как установить скилл action-creator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл action-creator запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic