create-event-schema

Generate TypeScript event envelope types and Zod schemas from event contracts.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/semicolon-devteam/semo --skill create-event-schema
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: create-event-schema
Source: https://github.com/semicolon-devteam/semo/tree/main/packages/eng/ms/skills/create-event-schema
Command: npx skills add https://github.com/semicolon-devteam/semo --skill create-event-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill includes references (resource) components.

What problem does it solve?

이벀트 λ΄‰νˆ¬μ™€ Zod μŠ€ν‚€λ§ˆλ₯Ό μžλ™μœΌλ‘œ μƒμ„±ν•˜μ—¬ 이벀트 기반 μ•„ν‚€ν…μ²˜μ˜ νƒ€μž… μ•ˆμ •μ„±μ„ κ°•ν™”ν•©λ‹ˆλ‹€.

Core Features & Use Cases

  • νƒ€μž… 및 μŠ€ν‚€λ§ˆ μžλ™ 생성: EventEnvelope μΈν„°νŽ˜μ΄μŠ€, Data μŠ€ν‚€λ§ˆ, Notification μŠ€ν‚€λ§ˆ μžλ™ 생성
  • μœ ν‹Έλ¦¬ν‹° μƒ˜ν”Œ 포함: 예제 νŒ©ν† λ¦¬ 및 μ˜ˆμ‹œ 좜λ ₯ 포함
  • 싀무 적용 κ°€μ΄λ“œ: μƒμ„±λœ νƒ€μž…μ„ ν”„λ‘œμ νŠΈμ˜ 이벀트 흐름에 λ°”λ‘œ 톡합

Quick Start

이벀트 νƒ€μž…κ³Ό μ„œλΉ„μŠ€ 이름을 μ „λ‹¬ν•˜λ©΄, TypeScript νƒ€μž… 파일과 μœ ν‹Έλ¦¬ν‹°κ°€ μƒμ„±λ©λ‹ˆλ‹€. 예: eventType=job.failed, service=scheduler

Frequently Asked Questions about create-event-schema

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types and Zod schemas for event-driven microservices?β–Ό

Generate event envelope types and Zod schemas automatically from a minimal event contract. Specify your event type (e.g., job.failed) and service name to produce domain-specific TypeScript files, validation schemas, and a factory utility for consistent event creation across microservices.

What files does the event schema generation create?β–Ό

The Skill generates types/events/{domain}.event.ts with EventEnvelope interfaces, Data and Event Zod schemas, EventMetadataSchema, EventContextSchema, EventNotificationSchema, and utils/event-factory.ts containing a ready-to-use createEvent function for your domain events.

Can I use Zod validation with TypeScript event types in a microservice architecture?β–Ό

Yes. This Skill generates both TypeScript interfaces and corresponding Zod schemas in parallel, ensuring your event payloads are type-safe at compile time and validated at runtime across service boundaries.

Do I need to manually define event metadata and context schemas?β–Ό

No. The Skill automatically generates EventMetadataSchema and EventContextSchema as part of the event envelope, eliminating manual schema definition and ensuring consistency across all events in your domain.

How do I use the generated createEvent factory in my application?β–Ό

Import the createEvent function from utils/event-factory.ts and call it with your event data. It enforces the generated Zod schemas, returning fully typed and validated event envelopes ready to publish or store.

What's the difference between handling events manually versus using generated schemas?β–Ό

Manual event handling risks type mismatches and validation gaps between services. Generated schemas provide centralized, automated type and validation consistency, reducing runtime errors and ensuring events conform to your contract across all consumers.