workflow-automation – skill Agent & Tự động hóa cho agent AI
Tự động hóa quy trình là hạ tầng giúp AI agent hoạt động đáng tin cậy. Nếu không có durable execution, một lần mất kết nối giữa chừng luồng thanh toán 10 bước có thể gây mất tiền và khiến khách hàng bất mãn. Có cơ chế này, quy trình tiếp tục đúng từ bước đang dở.
Cài skill workflow-automation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/workflow-automation-88a51.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /workflow-automation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/workflow-automation-88a51.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $workflow-automation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/workflow-automation-88a51.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /workflow-automation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/workflow-automation-88a51.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /workflow-automation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Workflow Automation
Workflow automation is the infrastructure that makes AI agents reliable.
Without durable execution, a network hiccup during a 10-step payment
flow means lost money and angry customers. With it, workflows resume
exactly where they left off.
This skill covers the platforms (n8n, Temporal, Inngest) and patterns
(sequential, parallel, orchestrator-worker) that turn brittle scripts
into production-grade automation.
Key insight: The platforms make different tradeoffs. n8n optimizes for
accessibility, Temporal for correctness, Inngest for developer experience.
Pick based on your actual needs, not hype.
Reliability and example limits
Durability does not guarantee exactly-once external effects. Payment/shipment helpers must forward a stable operation key to the provider and reconcile ambiguous success; email needs an outbox/deduplication strategy. Examples are incomplete fragments with version-specific SDK signatures. Validate them against installed types, use test accounts, and keep payloads/credentials out of workflow history and logs.
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Inngest Example (TypeScript)
import { inngest } from "./client";
export const processOrder = inngest.createFunction(
{ id: "process-order" },
{ event: "order/created" },
async ({ event, step }) => {
// Step 1: Validate order
const validated = await step.run("validate-order", async () => {
return validateOrder(event.data.order);
});
// Step 2: Process payment (durable - survives crashes)
const payment = await step.run("process-payment", async () => {
return chargeCard(validated.paymentMethod, validated.total, { idempotencyKey: `order-${event.data.orderId}-payment` });
});
// Step 3: Create shipment
const shipment = await step.run("create-shipment", async () => {
return createShipment(validated.items, validated.address);
});
// Step 4: Send confirmation
await step.run("send-confirmation", async () => {
return sendEmail(validated.email, { payment, shipment });
});
return { success: true, orderId: event.data.orderId };
}
);Temporal Example (TypeScript)
import { proxyActivities } from '@temporalio/workflow';
import type * as activities from './activities';
const { validateOrder, chargeCard, createShipment, sendEmail } =
proxyActivities<typeof activities>({
startToCloseTimeout: '30 seconds',
retry: {
maximumAttempts: 3,
backoffCoefficient: 2,
}
});
export async function processOrderWorkflow(order: Order): Promise<void> {
const validated = await validateOrder(order);
const payment = await chargeCard(validated.paymentMethod, validated.total, { idempotencyKey: `order-${order.id}-payment` });
const shipment = await createShipment(validated.items, validated.address);
await sendEmail(validated.email, { payment, shipment });
}Inngest Example
export const analyzeDocument = inngest.createFunction(
{ id: "analyze-document" },
{ event: "document/uploaded" },
async ({ event, step }) => {
// Run analyses in parallel
const [security, performance, compliance] = await Promise.all([
step.run("security-analysis", () =>
analyzeForSecurityIssues(event.data.document)
),
step.run("performance-analysis", () =>
analyzeForPerformance(event.data.document)
),
step.run("compliance-analysis", () =>
analyzeForCompliance(event.data.document)
),
]);
// Aggregate results
const report = await step.run("generate-report", () =>
generateReport({ security, performance, compliance })
);
return report;
}
);Temporal Example
export async function orchestratorWorkflow(task: ComplexTask) {
// Orchestrator decides what work needs to be done
const plan = await analyzeTask(task);
// Dispatch to specialized worker workflows
const results = await Promise.all(
plan.subtasks.map(subtask => {
switch (subtask.type) {
case 'create':
return executeChild(createWorkerWorkflow, { args: [subtask] });
case 'modify':
return executeChild(modifyWorkerWorkflow, { args: [subtask] });
case 'delete':
return executeChild(deleteWorkerWorkflow, { args: [subtask] });
}
})
);
// Aggregate results
return aggregateResults(results);
}When to Use
- User mentions or implies: workflow
- User mentions or implies: automation
- User mentions or implies: n8n
- User mentions or implies: temporal
- User mentions or implies: inngest
- User mentions or implies: step function
- User mentions or implies: background job
- User mentions or implies: durable execution
- User mentions or implies: event-driven
- User mentions or implies: scheduled task
- User mentions or implies: job queue
- User mentions or implies: cron
- User mentions or implies: trigger
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- workflow-orchestration-patterns – Nắm vững kiến trúc điều phối quy trình với Temporal, gồm các quyết định thiết kế nền…
- workflow-patterns – Dùng skill này khi thực hiện tác vụ theo quy trình TDD của Conductor, xử lý checkpoint…
- workflow-yylo – Tạo và duy trì các bản ghi Workflow của YYLO Ledger đã được xác thực, đồng thời tách…
- wrike-automation – Tự động hóa quản lý dự án Wrike qua Rube MCP (Composio): tạo tác vụ/thư mục, quản lý dự…
- x-twitter-scraper – Dùng Xquik cho các quy trình dữ liệu X: tìm kiếm tweet, tra cứu người dùng, xuất danh…
- x402-express-wrapper – Wrapper chính thức của M2MCent (Node.js) để gắn paywall x402 vào API hoặc máy chủ Model…
- yao-meta-skill – Tạo, tái cấu trúc, đánh giá và đóng gói agent skill từ quy trình, prompt, bản ghi hội…
- zendesk-automation – Tự động hóa tác vụ Zendesk qua Rube MCP (Composio): ticket, người dùng, tổ chức, phản…