用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill event-driven命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | event-driven |
| description | Event-driven architecture with pub/sub and message queues. Use for reactive systems. |
EDA is a software architecture paradigm promoting the production, detection, consumption of, and reaction to events. In 2025, it is the backbone of real-time, scalable, and decoupled systems.
// Producer (Order Service)
await messageBroker.publish("order.created", {
orderId: "123",
userId: "456",
timestamp: Date.now(),
});
// Consumer (Shipping Service)
// Doesn't need to be online when order is created
messageBroker.subscribe("order.created", async (event) => {
await shippingService.schedulePickup(event.orderId);
console.log("Shipping scheduled");
});
// Consumer (Analytics Service)
// New feature added later? No changes to Order Service!
messageBroker.subscribe("order.created", async (event) => {
await analytics.trackRevenue(event);
});
A significant change in state (Immutable fact). "OrderCreated" not "CreateOrder".
The middleware (Kafka, RabbitMQ, SNS/SQS) that receives, stores, and routes events.
Pattern where publishers send messages to a topic, and multiple subscribers receive them independently.
Storing the state of an entity as a sequence of state-changing events rather than the current snapshot.
Separating the Read and Write models. Writes publish events; Reads update a denormalized view based on those events.
Ensuring data consistency. Write the event to a DB table in the same transaction as the business logic, then a background worker pushes it to the broker.
Do:
Don't: