Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问许可证需确认审计通过

the-standard-events标准事件

Agent Skill

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

总安装

4,732

周安装

137

GitHub Stars

17

下载量

1,763
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:the-standard-events(标准事件)
来源仓库:https://github.com/hassanhabib/the-standard-skills
仓库路径:skills/the-standard-events
安装命令:
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Events'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/hassanhabib/the-standard-skills --skill 'The Standard Events'

简介

the-standard-events 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中整理协作事项。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息整理和分析的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。
  • 可结合原始 README 进一步核验具体用法和功能边界。

SKILL.md

The Standard Events

What this skill is

This skill governs how events are architected, implemented, and tested under The Standard. It covers the CulDeSac pattern, event brokers, foundation event services, validation, exception mapping, and test structure for publish and subscribe operations.

Explicit coverage map

This skill explicitly covers:

  • The CulDeSac pattern and why it exists in Standard-compliant systems
  • Event broker structure and implementation
  • Foundation event service implementation: main, Validations, and Exceptions files
  • Publish and SubscribeTo operation contracts and naming conventions
  • Validation rules for null entity and null event handler
  • Exception mapping: Validation and Service exceptions only (no Dependency exceptions)
  • File and partial-class structure for brokers, services, and tests
  • Test structure: Logic, Validations, and Exceptions per operation
  • Naming conventions enforced across the entire events layer
  • Orchestration integration: how publisher and subscriber orchestration services consume the event service
  • Dependency injection registration: lifetime requirements for the event broker and event service
  • Startup activation: how and where SubscribeTo calls must be invoked at application startup

When to use

Use this skill whenever implementing, reviewing, expanding, or testing event-driven communication between services. Use it whenever deciding how to publish a domain event, how to subscribe to one, or how to validate and handle failures in an event service. Use it when determining whether the CulDeSac pattern is appropriate for a given service.

The CulDeSac pattern

The CulDeSac pattern applies when a service needs to send a domain event outward without expecting a synchronous return from any subscriber. It is a dead-end in the call graph: data flows in one direction, callers are not blocked waiting for a result, and subscribers are free to react independently.

Why use events

  1. To decouple services across bounded contexts without creating direct service-to-service dependencies.
  2. To allow multiple subscribers to react to a single domain event independently.
  3. To avoid creating orchestration services that must know about every downstream consumer.
  4. To support fire-and-forget flows where the publisher does not need confirmation from subscribers.
  5. To enable downstream services to scale and evolve without affecting the publisher.
  6. To prevent any single orchestrator from accumulating too many responsibilities over time.

Event service doctrine

  1. Event services are always foundation services.
  2. Event services sit at the boundary between the domain model and the event infrastructure.
  3. Event services must not depend on other services -- only on the event broker.
  4. Event services expose exactly two operations per entity: Publish[Entity]Async and SubscribeTo[Entity]Event.
  5. Event services do not inject a logging broker -- they have no logging dependency by design.
  6. Event services use two TryCatch delegates to isolate exception handling from business logic.
  7. Event services do NOT catch Dependency or CriticalDependency exceptions -- they do not call HTTP or storage APIs.

Broker implementation doctrine

  1. The event broker is the only infrastructure dependency of an event service.
  2. The event broker wraps any chosen event infrastructure -- no specific event library is mandated.
  3. Each entity gets its own event client instance, typed to that entity, declared in the broker constructor.
  4. The broker is split into four files: base interface, entity interface partial, base implementation, entity implementation partial.
  5. Broker operations are thin pass-throughs to the underlying event infrastructure -- no logic lives in the broker.

Orchestration integration

The event service is consumed exclusively by orchestration services. Controllers, processing services, and other foundation services must never depend on an event service directly.

Publisher side

An orchestration service that needs to raise a domain event calls Publish[Entity]Async on the event service. The orchestration service owns the composition of the entity and delegates the publish call to the event service. The publisher orchestration service knows nothing about which services will subscribe -- it only knows it must publish.

Subscriber side

An orchestration service that needs to react to a domain event exposes a method named SubscribeTo[Entity]Events (plural). That method calls this.[entity]EventService.SubscribeTo[Entity]Event(handler) where handler is a private async method. The handler receives the entity and performs the orchestration reaction -- calling foundation services as needed. Only the subscriber orchestration service knows what to do with the event; the publisher is unaware of subscribers.

Naming distinction: plural vs singular

  1. The event service method is always singular: SubscribeTo[Entity]Event.
  2. The orchestration service wrapper method is always plural: SubscribeTo[Entity]Events.
  3. The plural wrapper exists because the orchestration service may route the event to multiple sub-operations.
  4. The plural wrapper is the method called at startup -- never the singular event service method directly.

Dependency injection and startup activation

Registration rules

  1. All orchestration services that publish or subscribe must be registered in DI.
  2. The required DI lifetime for IEventBroker and EventBroker depends on the event infrastructure in use.
  3. For in-memory event infrastructure (such as LeVent): singleton is required for correctness -- client instances hold subscription handler registrations in memory; scoped or transient registrations produce fresh instances with no registered handlers, so events are never delivered.
  4. For external event infrastructure (such as Azure Service Bus or EventHighway): follow the client library's own lifetime recommendations -- subscriptions live in the external service and survive independently of the client instance, but clients typically require singleton lifetime for connection reuse and to keep message processors alive.
  5. I[Entity]EventService and [Entity]EventService must be registered with a lifetime that matches the broker they depend on -- never register the service with a longer lifetime than the broker.
  6. When in doubt, prefer singleton -- it is safe for all known event infrastructure and avoids silent subscription failures.

Startup activation rules

  1. Event subscriptions are not self-activating -- they must be explicitly started at application startup.
  2. After the DI container is built, every subscribing orchestration service must have its SubscribeTo[Entity]Events() method called.
  3. The activation call must appear in Configure() (Startup.cs style) or its equivalent in a minimal API host setup.
  4. In Startup.cs: use app.ApplicationServices.GetService<I[Entity]OrchestrationService>().SubscribeTo[Entity]Events().
  5. In minimal API (Program.cs): use app.Services.GetService<I[Entity]OrchestrationService>().SubscribeTo[Entity]Events() after app = builder.Build().
  6. If the startup activation call is missing, no subscriber will ever receive events -- the subscription is silently never registered.
  7. Every subscribing orchestration service must have exactly one startup activation call per subscription.

Validation rules for event services

Publish validation

  1. Validate the entity is not null before publishing.
  2. A null entity must throw NullEventException immediately (circuit-breaking).
  3. Null entity validation must not collect further errors -- it breaks immediately.

Subscribe validation

  1. Validate the event handler delegate is not null before subscribing.
  2. A null handler must throw NullEventHandlerException immediately (circuit-breaking).
  3. Null handler validation must not collect further errors -- it breaks immediately.

Exception handling rules

  1. All validation failures must produce [Entity]EventValidationException wrapping the inner exception.
  2. All unexpected exceptions must be wrapped in FailedEventServiceException, then in [Entity]EventServiceException.
  3. FailedEventServiceException must carry the original exception as innerException and its Data collection.
  4. Event services do not use DependencyValidationException or DependencyException categories.
  5. TryCatch delegates must be used to separate exception handling from core logic.

Naming conventions

  1. Interface: I[Entity]EventService.
  2. Implementation: [Entity]EventService (internal partial class).
  3. Publish operation: Publish[Entity]Async (returns ValueTask, async).
  4. Subscribe operation: SubscribeTo[Entity]Event (returns void, synchronous).
  5. Subscribe must NEVER be named ListenTo[Entity]Event.
  6. Broker interface: IEventBroker (shared), with entity-specific partials in IEventBroker_[Entity].cs.
  7. Exception naming: Null[Entity]EventException, Null[Entity]EventHandlerException, Failed[Entity]EventServiceException, [Entity]EventValidationException, [Entity]EventServiceException.

Test rules for event services

  1. Test SubscribeTo[Entity]Events happy path first.
  2. Test Publish[Entity]Async happy path second.
  3. Test validation failures third (null handler, null entity).
  4. Test service exceptions fourth (unexpected errors in both operations).
  5. Event service tests must NOT declare a loggingBrokerMock -- there is no logging broker.
  6. Subscribe handler mocks must use Mock<Func<[Entity], ValueTask>>.
  7. Always end every test with eventBrokerMock.VerifyNoOtherCalls().
  8. Use Times.Once for expected calls and Times.Never for calls skipped due to validation failures.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.94%
按下载量换算704

Claude

27.57%
按下载量换算486

Cursor

20.2%
按下载量换算356

Gemini CLI

10.04%
按下载量换算177

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

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

安装前确认

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

来源信息

继续浏览同类 Skills