Token导航 LogoToken导航

Agent Skill · 前端设计

eventmodeling-validating-event-models(事件建模验证事件模型)

eventmodeling-validating-event-models 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

eventmodeling-validating-event-models 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 6,812。

总安装 451周安装 19GitHub Stars 公开资料未说明下载 158核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:eventmodeling-validating-event-models(事件建模验证事件模型)
来源仓库:https://github.com/trogonstack/agentskills
仓库路径:skills/eventmodeling-validating-event-models
安装命令:
npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-validating-event-models
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-validating-event-models

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

eventmodeling-validating-event-models 验证事件模型是否符合事件溯源与 CQRS 原则。核心规则:每个命令必须有专属状态投影,禁止混用读模型。检测常见反模式如聚合根误用、状态冗余等问题。适用于生产环境发布前的最后质量关卡。发现违规立即终止流程,强制返工直至合规为止。

来源仓库内路径:skills/eventmodeling-validating-event-models

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

eventmodeling-validating-event-models 怎么安装?

在终端执行 npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-validating…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

eventmodeling-validating-event-models 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

eventmodeling-validating-event-models 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

eventmodeling-validating-event-models 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

eventmodeling-validating-event-models 用的人多吗?

公开数据是累计安装 451 次,近一周安装 19 次,下载 158 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

eventmodeling-validating-event-models 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
eventmodeling-validating-event-models

事件建模验证事件模型 · 本页

451—调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Validating Event Models

Core Architectural Rule (Non-Negotiable)

CRITICAL: Every command must have its own minimal state projection (NOT a DDD Aggregate) What DDD calls an "aggregate root" is actually a READ MODEL. Command handlers must NEVER use read models for validation.

This is the primary validation gate. If a model violates this rule, it fails validation immediately.

VIOLATION EXAMPLE (WILL FAIL VALIDATION):
OrderAggregate { orderId, customerId, items[], total, status, paymentId, address, shippedAt, cancelledAt, ... }
  ↑ This is a READ MODEL, not command state
Used by: ConfirmOrder, ShipOrder, CancelOrder, ApproveReturn
   REJECTED: This is DDD aggregate pattern (a read model), not event sourcing command state

CORRECT PATTERN (PASSES VALIDATION):
ConfirmOrderState { status, orderId }
ShipOrderState { status, orderId, paymentId }
CancelOrderState { status, orderId, createdAt }
ApproveReturnState { status, orderId, paymentId }
   APPROVED: Each command has minimal state

OrderSummaryView { orderId, customerId, items[], total, status, paymentId, ... }
   OK: This is a READ MODEL for UI queries, separate from command state

Purpose

Ensures event-sourced models are complete, correct, and follow pure event sourcing principles (minimal per-command state).

Workflow

When given an event model, perform comprehensive validation:

1. Event Stream Completeness Check

Verify each event stream has:

  • Clear stream name (identity)
  • At least one event type
  • Initial event (what creates the stream)
  • State transitions documented
  • Deterministic state projection

For each event:

  • Uses past tense (Created, Confirmed, etc.)
  • Contains only facts (no computed fields)
  • All data is immutable
  • Unique semantics (no duplicates)
  • Includes timestamp/causality info

For each state projection:

  • Can be deterministically rebuilt from events
  • Replay logic is pure (no side effects)
  • Used only for command validation
  • Can be safely discarded and regenerated

For each command:

  • Clear input parameters
  • Validation rules (against state)
  • Resulting events specified (or rejection reason)
  • Pure logic (no side effects except event appending)

2. Consistency Checks

  • Event-Stream Mapping: Every event belongs to exactly one stream
  • Command Outcomes: Every command produces events OR documents rejection
  • Deterministic Projections: State can only be derived one way from events
  • No Side Effects in Projections: Pure state reconstruction logic
  • Event Immutability: No event data is ever modified
  • Naming Consistency: Are naming patterns consistent?

- Commands: Verb present (CreateOrder, ConfirmPayment) - Events: Verb past tense (OrderCreated, PaymentConfirmed) - Streams: Entity type + identity (Order:123, Payment:456)

3. Event Sourcing Principles Compliance

Check against event sourcing fundamentals:

  • Events are Facts: Events describe what happened, not potential futures

- "OrderMayBeConfirmed" → "OrderConfirmed" - "PaymentPending" (in events) → "PaymentInitiated", "PaymentAuthorized"

  • Events are Immutable: No modification of event data

- "Update OrderCreated event with new total" → "Append OrderTotalCorrected event"

  • Complete Event Data: Events contain all facts needed for state rebuild

- Event: "OrderConfirmed" (missing paymentId) → Event includes paymentId

  • No Computed Fields in Events: Only raw captured facts

- OrderCreated includes "totalTax" (computed) → Includes items + amounts, tax computed in projection

  • Deterministic Projections: Replaying events always produces same state

- Projection uses: for each event, do X - Projection uses: external API call during replay

  • Stream Identity Clear: Stream name uniquely identifies entity

- Order:order-123, Customer:cust-456 - Orders collection with Order1, Order2

  • State is Derived: Current state always comes from replaying events

- "Load state: replay all events for Order:123" - "Load state: query database Orders table"

4. Event Flow Validation

  • Command → Event Mapping: Clear what each command produces
  • No Zombie Commands: Commands that never produce events (read-only OK)
  • Event Versioning: How are old events handled if structure changes?
  • Compensation Events: How are errors/reversals handled?

- "PaymentFailed event appended when payment declined" - "Update payment event to status=failed"

  • Cross-Stream Communication: Through events or external process?

- "OrderConfirmed event triggers InventoryReservation command" - "Order directly modifies Inventory state"

5. Role & Actor Attribution Validation

Verify that every command has explicit actor attribution from the Role Catalog:

  • Role Catalog exists: A Role Catalog was defined in Step 1 (eventmodeling-brainstorming-events)

- CRITICAL: No Role Catalog found — commands have no actor attribution - PASS: Role Catalog with human roles and system actors defined

  • Every command has actor attribution: No command uses generic "User"

- CRITICAL: CreateOrder attributed to "User" (which user? Customer? Admin? Seller?) - PASS: CreateOrder attributed to "Customer" (specific role from catalog)

  • Every human role has at least one command path: No orphaned roles

- WARNING: "Support Agent" in Role Catalog but has zero commands - PASS: Every role has at least one command

  • Every human role has at least one read model: Roles can see system state

- WARNING: "Seller" has no read model — how do they see their data? - PASS: Every role has at least one view

  • Permission boundaries respected: Commands are only issued by authorized roles

- CRITICAL: OverrideOrderStatus not restricted to Support Agent role - PASS: Each command's role matches the permission boundary in the catalog

Validation Verdict: If no Role Catalog exists → REJECT MODEL — Role Catalog is a prerequisite If any command lacks actor attribution → REJECT MODEL — all commands must have explicit role/actor

6. Command State Read Models Validation (CRITICAL)

This is the PRIMARY validation gate. Violations are CRITICAL and must be fixed before approval. Validate that command state read models are minimal and command-specific, not bundled like DDD aggregates.

Note: These are read models semantically categorized as "Command State" (optimized for command validation), as opposed to "Query Models" (optimized for UI queries).

CRITICAL RULE CHECK:

  • Naming Convention Compliance - For automation tooling

- CRITICAL: Interface named OrderState (ambiguous - command? query?) - PASS: ConfirmOrderState (clear: command state for ConfirmOrder) - PASS: ShipOrderStateToDo (clear: planned, needs implementation) - PASS: OrderQueryModel (clear: query read model)

  • NO shared state between commands - This is the #1 rule

- CRITICAL: "OrderState used by ConfirmOrder, ShipOrder, CancelOrder, ApproveReturn" - PASS: "ConfirmOrderState for ConfirmOrder, ShipOrderState for ShipOrder, etc."

  • Each command has its own state interface - CRITICAL: Only one OrderState interface for all commands

- PASS: ConfirmOrderState, ShipOrderState, CancelOrderState, ApproveReturnState

  • No Full Aggregate State: Commands don't load all entity fields upfront

- CRITICAL: "ConfirmOrder loads: {status, items[], total, shipping, paymentId, customer details,...}" - PASS: "ConfirmOrder loads only: {status, orderId}"

  • State Only For Validation: No unused fields in state

- "ShipOrderState has exactly: {status, orderId, paymentId} — all needed" - CRITICAL: "ShipOrderState has: {status, orderId, paymentId, items[], total, address,...} but only uses status and paymentId"

  • Per-Command State Shapes: Different interfaces for different commands

- ConfirmOrderState: {status, orderId} - ShipOrderState: {status, orderId, paymentId} (DIFFERENT) - CancelOrderState: {status, orderId, createdAt} - CRITICAL: All use the same OrderState

Validation Verdict: If ANY command shares state with another command → REJECT MODEL - CRITICAL VIOLATION

7. Command & State Validation

  • State-Based Decisions: Commands decide based on current state only
  • Valid State Transitions: Document what state changes are allowed
Draft → Confirmed (ConfirmOrder)
Draft → Cancelled (CancelOrder)
Confirmed → Shipped (ShipOrder)
Confirmed ↛ Draft (invalid)
  • Preconditions Clear: When can each command execute?

- "Can only confirm if state is Draft" - "Can sometimes confirm"

  • Error Handling: What happens if validation fails?

- "Reject with ValidationError, no events appended" - "Append ErrorEvent and continue"

8. Projection Validation

  • Read Models Separate from Command State: Read models are rich projections, NOT the command-validation state
  • Read Models Optional: Are they needed or just convenience?
  • Serve Real Queries: Each read model answers a specific question

- "OrderSummaryView serves 'get orders by customer' query" - "OrderDetailsView duplicates all data from OrderState"

  • Consistent Update: All relevant events update the read model
  • Regenerable: Can be rebuilt from events at any time

9. Issues & Recommendations Report

Format findings as:

# Event Model Validation Report: [Domain]

## Issues Found

### Critical (Must Fix)
1. **Stream Root**: Order
   **Issue**: No command for order cancellation
   **Impact**: Cannot model cancellation requirement
   **Fix**: Add CancelOrder command with OrderCancelled event

2. **Event**: PaymentProcessed
   **Issue**: Missing payment method in event data
   **Impact**: Cannot determine if card declined, etc.
   **Fix**: Add paymentMethod, authCode fields

3. **State Design**: Order stream
   **Issue**: ConfirmOrder loads full OrderState with items[], shipping, etc.
   **Impact**: Violates minimal state principle
   **Fix**: ConfirmOrder should load only: { status, orderId }

### Warnings (Should Consider)
1. **Stream Root**: Order
   **Issue**: Events contain computed total instead of raw amounts
   **Recommendation**: Store line item amounts in event, compute total in read models
   **Rationale**: Events are facts, computations belong in projections

2. **ReadModel**: CustomerDashboard
   **Issue**: Denormalizes data from 3 stream roots
   **Recommendation**: Ensure dashboard is truly for querying, not command validation
   **Rationale**: Read models support UI queries, not decision logic

## Completeness Analysis

| Aspect | Status | Details |
|--------|--------|---------|
| Stream Roots |  Complete | 5 stream roots identified |
| Commands |  80% | Missing: ReactivateAccount |
| Events |  Complete | 18 events cover all transitions |
| State Designs |  70% | Several have unnecessary fields for validation |
| Read Models |  Complete | 4 views cover query needs |

## Event Sourcing Compliance

- Immutable Events:  100%
- Minimal Command State:  75%
- Stream Root Clarity:  Clear identities
- Event Sourcing Pattern:  Follows ES principles
- CQRS Separation:  Command state vs Read models clear

## Validation Summary

**Overall Status**:  Ready with recommendations

**Blockers for Implementation**: 0 critical issues

**Recommended Fixes**:
1. Add missing OrderCancelled event
2. Move PaymentMethod to its own minimal state projection
3. Document all implicit invariants explicitly

**Ready for Code Generation**: Yes, after implementing recommendations

## Next Steps
1. Review recommendations with domain expert
2. Update model with critical fixes
3. Proceed to code generation

Validation Scoring

Provide a score for each dimension (0-100):

  • Completeness: Do all requirements have corresponding model elements?
  • Consistency: Are all patterns applied uniformly?
  • Correctness: Do business rules match domain expert knowledge?
  • Clarity: Are invariants and constraints explicit?
  • Projection/Command-State Compliance: Does every command use its own minimal state projection, with no command handler reading from a query/read model for validation?

Overall: Ready for Implementation if all critical issues are resolved.

Common Issues to Flag

IssuePatternFix
Missing cancellation flowsNo "Cancelled" eventsAdd compensation paths
Implicit invariants"Obviously can't do X"Make invariants explicit
Command state too broadShared state used by 2+ commandsSplit into per-command minimal state projections
Orphaned eventsEvents no one listens toLink to projections or commands
No read modelsCommands reading query/read models for validationAdd separate query read models; keep command state minimal
Circular dependenciesProjection A depends on B, B on ARedesign stream boundaries

Key Principles for Event Sourcing

  1. Events are the source of truth: Everything else is derived from them
  2. Immutable event log: Events never change, only appended
  3. State is a projection: Current state is built by replaying events
  4. Commands are pure decisions: Validate against state, produce events or reject
  5. Projections are optional: Can be rebuilt at any time
  6. Stream per entity: Each entity has one append-only event stream

Success Criteria

Your event model validation is successful when:

  • All requirements are captured in events
  • Commands clearly trigger events
  • Stream roots have clear, minimal boundaries
  • Business rules are explicit invariants (not hidden assumptions)
  • Read models serve actual query needs (not used by commands)
  • Command state is minimal and command-specific (not shared across multiple commands)
  • Events are immutable facts (past tense, no computed fields)
  • State can be deterministically rebuilt from events
  • All command-to-event mappings are documented
  • Critical issues are resolved or documented as known limitations

A model is ready for code generation if:

  • No critical issues remain
  • All command state follows naming convention (e.g., [CommandName]State)
  • No state is shared between different commands
  • All events are immutable facts
  • All business rules are explicit
  • A Role Catalog exists with all human roles and system actors
  • Every command has explicit actor attribution from the Role Catalog

Quality Checklist

  • All events are immutable facts (past tense)
  • No computed fields stored in events
  • State projection is deterministic from events
  • Commands validate against current state only
  • Each command either produces events or rejects (no silent failures)
  • Event causality/command-event mapping is clear
  • State transitions are documented
  • No direct references between streams
  • Projections serve specific query needs (or are removed)
  • Everything can be rebuilt from the event stream
  • Command state naming follows [CommandName]State convention
  • No state is shared between different commands
  • All command state is minimal (only fields needed for validation)
  • Role Catalog exists with human roles and system actors
  • Every command attributed to a specific role/actor (no generic "User")
  • Every human role has at least one command and one read model
  • Permission boundaries from Role Catalog are respected

平台分布

Codex

35.31%
按下载量换算56

Claude

33.27%
按下载量换算53

Cursor

19.67%
按下载量换算31

Gemini CLI

9.03%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills