mds-datastar-architecture

Enforce canonical command and global SSE architecture for Datastar components.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/eboody/eran.codes --skill mds-datastar-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mds-datastar-architecture
Source: https://github.com/eboody/eran.codes/tree/main/.codex/skills/mds-datastar-architecture
Command: npx skills add https://github.com/eboody/eran.codes --skill mds-datastar-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a consistent and scalable architecture for Datastar components within the repository, ensuring commands mutate server state predictably and updates are communicated efficiently via a global SSE stream.

Core Features & Use Cases

  • Command Handling: Ensures commands mutate server state and return appropriate status codes (204 or 202), avoiding JSON state payloads.
  • Global SSE Stream: Directs all app-authority state updates through a single /events SSE stream using datastar-patch-signals.
  • Spec Compliance: Mandates that Datastar component specifications adhere to specific SSE mapping rules for backend responses and event triggers.
  • Use Case: Streamlining the development of interactive web applications by providing a clear, enforced pattern for handling user input and broadcasting state changes across the system.

Quick Start

Ensure all Datastar command handlers are marked with // ci: datastar-command <handler_name> and return StatusCode::NO_CONTENT or StatusCode::ACCEPTED.

Frequently Asked Questions about mds-datastar-architecture

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

FAQPage Schema
How do I standardize Datastar command handling and SSE architecture in my project?

Global SSE streams in Datastar handle state updates by directing all app-authority mutations through a single /events stream using datastar-patch-signals, ensuring efficient and consistent state synchronization across components.

What status codes should Datastar command handlers return?

Datastar command handlers should return StatusCode::NO_CONTENT (204) or StatusCode::ACCEPTED (202), avoiding JSON state payloads and ensuring commands only mutate server state predictably.

How do I annotate Datastar command handlers to ensure spec compliance?

Annotate Datastar command handlers with // ci: datastar-command <handler_name> to enforce spec compliance, ensuring they adhere to SSE mapping rules for backend responses and event triggers.

Does this Datastar architecture pattern work with Rust?

Yes, this Datastar architecture pattern works with Rust, utilizing specific status codes like StatusCode::NO_CONTENT and StatusCode::ACCEPTED for server state mutations and command handling.

Why should I use a global SSE stream for Datastar app-state updates?

Use a global SSE stream for Datastar app-state updates to ensure all app-authority state changes are communicated efficiently and consistently across the system via datastar-patch-signals.