inngest
Skill này làm gì
Inngest giúp tạo các tác vụ nền, quy trình nhiều bước và các tiến trình liên tục mà không cần quản lý hàng đợi hay máy chủ phụ.
Khi nào nên dùng
- ✓Khi bạn cần một tác vụ tự động chạy vào một thời điểm cụ thể.
- ✓Khi một sự kiện (như người dùng mới đăng ký) cần kích hoạt một chuỗi hành động.
- ✓Khi bạn muốn ứng dụng xử lý nhiều yêu cầu cùng lúc mà không bị sập.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/inngest/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một luồng gửi email chào mừng khi người dùng đăng ký, rồi gửi các mẹo sử dụng sau 24 giờ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn định nghĩa các bước mà tác vụ cần thực hiện. Inngest đảm bảo mỗi bước được thực thi và kết quả được lưu lại. Nó cũng xử lý việc thử lại nếu có lỗi và cho phép tạm dừng thực sự mà không làm nghẽn hệ thống.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Inngest Integration
Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers.
Principles
- Events are the primitive - everything triggers from events, not queues
- Steps are your checkpoints - each step result is durably stored
- Sleep is not a hack - Inngest sleeps are real, not blocking threads
- Retries are automatic - but you control the policy
- Functions are just HTTP handlers - deploy anywhere that serves HTTP
- Concurrency is a first-class concern - protect downstream services
- Idempotency keys prevent duplicates - use them for critical operations
- Fan-out is built-in - one event can trigger many functions
Capabilities
- inngest-functions
- event-driven-workflows
- step-functions
- serverless-background-jobs
- durable-sleep
- fan-out-patterns
- concurrency-control
- scheduled-functions
Scope
- redis-queues -> bullmq-specialist
- serverless-queues -> upstash-qstash
- workflow-orchestration -> temporal-craftsman
- message-streaming -> event-architect
- infrastructure -> infra-architect
Tooling
Core
- inngest
- inngest-cli
Frameworks
- nextjs
- express
- hono
- remix
- sveltekit
Deployment
- vercel
- cloudflare-workers
- netlify
- railway
- fly-io
Patterns
- step-functions
- event-fan-out
- scheduled-cron
- webhook-handling
Patterns
Basic Function Setup
Inngest function with typed events in Next.js
When to use: Starting with Inngest in any Next.js project
// lib/inngest/client.ts import { Inngest } from 'inngest';
export const inngest = new Inngest({ id: 'my-app', schemas: new EventSchemas().fromRecord<Events>(), });
// Define your events with types type Events = { 'user/signed.up': { data: { userId: string; email: string } }; 'order/placed': { data: { orderId: string; total: number } }; };
// lib/inngest/functions.ts import { inngest } from './client';
export const sendWelcomeEmail = inngest.createFunction( { id: 'send-welcome-email' }, { event: 'user/signed.up' }, async ({ event, step }) => { // Step 1: Get user details const user = await step.run('get-user', async () => { return await db.users.findUnique({ where: { id: event.data.userId } }); });
// Step 2: Send welcome email
await step.run('send-email', async () => {
await resend.emails.send({
to: user.email,
subject: 'Welcome!',
template: 'welcome',
});
});
// Step 3: Wait 24 hours, then send tips
await step.sleep('wait-for-tips', '24h');
await step.run('send-tips', async () => {
await resend.emails.send({
to: user.email,
subject: 'Getting Started Tips',
template: 'tips',
});
});
} );
// app/api/inngest/route.ts (Next.js App Router) import { serve } from 'inngest/next'; import { inngest } from '@/lib/inngest/client'; import { sendWelcomeEmail } from '@/lib/inngest/functions';
export const { GET, POST, PUT } = serve({ client: inngest, functions: [sendWelcomeEmail], });
Multi-Step Workflow
Complex workflow with parallel steps and error handling
When to use: Processing that involves multiple services or long waits
export const processOrder = inngest.createFunction( { id: 'process-order', retries: 3, concurrency: { limit: 10 }, // Max 10 orders processing at once }, { event: 'order/placed' }, async ({ event, step }) => { const { orderId } = event.data;
// Parallel steps - both run simultaneously
const [inventory, payment] = await Promise.all([
step.run('check-inventory', () => checkInventory(orderId)),
step.run('validate-payment', () => validatePayment(orderId)),
]);
if (!inventory.available) {
// Send event instead of direct call (fan-out pattern)
await step.sendEvent('notify-backorder', {
name: 'order/backordered',
data: { orderId, items: inventory.missing },
});
return { status: 'backordered' };
}
// Process payment
const charge = await step.run('charge-payment', async () => {
return await stripe.charges.create({
amount: event.data.total,
customer: payment.customerId,
});
});
// Ship order
await step.run('ship-order', () => fulfillment.ship(orderId));
return { status: 'completed', chargeId: charge.id };
} );
Scheduled/Cron Functions
Functions that run on a schedule
…
Câu hỏi thường gặp
“Events” là gì?
Sự kiện là các thông báo cho biết một điều gì đó đã xảy ra, ví dụ “người dùng đã đăng ký” hoặc “đơn hàng đã được đặt”. Inngest dùng các sự kiện này để bắt đầu hoặc tiếp tục tác vụ.
“Steps” là gì?
Bước là từng phần riêng lẻ của một tác vụ lớn hơn. Inngest đảm bảo mỗi bước được hoàn thành và lưu kết quả, giúp bạn tiếp tục từ chỗ đã dừng nếu có sự cố.
Tôi có thể làm cho tác vụ chờ một khoảng thời gian không?
Có, Inngest cho phép bạn dùng “sleep” để tạm dừng tác vụ trong một khoảng thời gian nhất định (giờ, ngày) mà không tốn tài nguyên máy chủ.
Chi tiết
Mô tả gốc của tác giả
Inngest expert for serverless-first background jobs, event-driven workflows, and durable execution without managing queues or workers.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4951
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.