Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    CQRS Event Sourcing Architect`

    1

    Architect CQRS and Event Sourcing systems with separate read/write models and immutable event stores.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    CQRS Event Sourcing Architect`

    CQRS Event Sourcing Architect`

    Example session with this skill installed

    Architect a CQRS system for a library management tool. I need to handle book checkouts and track availability for high-volume searches.

    • Read your context and instructions
    • Compiled the cqrs event sourcing

    I have deconstructed the library management domain into a CQRS and Event Sourcing architecture. This includes the Command side for processing checkouts and the Query side for optimized availability searches.

    Library Management Architecture

    // --- Domain Events (Immutable) ---
    interface BookCheckedOut {
      type: 'BookCheckedOut';
      version: number;
      occurredAt: Date;
      data: {
        bookId: string;
        memberId: string;
        dueDate: Date;
      };
    }
    
    // --- Aggregate Root (Write Side) ---
    class BookAggregate {
      private id: string;
      private isAvailable: boolean = true;
    
      handleCheckout(command: CheckoutBook): BookCheckedOut {
        if (!this.isAvailable) throw new Error('Book is already checked out');
        
        return {
          type: 'BookCheckedOut',
          version: Date.now(),
          occurredAt: new Date(),
          data: { bookId: command.bookId, memberId: command.memberId, dueDate: command.dueDate }
        };
      }
    }
    
    // --- Projection Handler (Read Side) ---
    class AvailabilityProjection {
      async handle(event: BookCheckedOut): Promise<void> {
        await db.queryStore.update(event.data.bookId, {
          status: 'CheckedOut',
          lastUpdated: event.occurredAt
        });
      }
    }
    

    Next steps

    1. Implement the Event Store repository to persist the BookCheckedOut events.
    2. Configure a message broker to dispatch events from the Aggregate to the Projection Handler.
    3. Define the BookRestored event to handle returns and update the availability search index.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Designing distributed systems with strong consistency and high read performance is difficult. This skill provides the architectural scaffolding to implement Command Query Responsibility Segregation (CQRS) and Event Sourcing without the usual boilerplate overhead.

    What it does

    • Separates Concerns: Deconstructs domains into Commands for write intent and Queries for data projection.
    • Defines Domain Events: Models immutable events like OrderPlaced or PaymentReceived with global sequence numbers.
    • Enforces Invariants: Implements Aggregate Roots to ensure business logic remains consistent during state changes.
    • Optimizes Reads: Builds asynchronous Projection Handlers to maintain denormalized read models in fast query stores.

    How it works

    1. Domain Deconstruction: Identify specific write actions and read requirements within your project scope.
    2. Event Modeling: Define the schema for your immutable event store and sequence logic.
    3. Logic Implementation: Generate Aggregate Roots that handle commands and emit events.
    4. Projection Building: Create the handlers that update your read-side databases based on emitted events.

    Frameworks & tools

    This skill focuses on TypeScript domain entities and event store definitions. It is designed for enterprise backend environments utilizing microservices and event-driven architectures.

    Why this beats prompting it yourself

    Generic prompts often fail to maintain the strict separation between write and read models or miss the nuances of event immutability. This skill follows a deterministic workflow to ensure every Aggregate and Projection aligns with Domain-Driven Design (DDD) principles.

    Use cases

    • Transitioning a monolith to a distributed event-driven microservice.
    • Building high-auditability systems where every state change must be logged.
    • Creating read-heavy dashboards that require denormalized data for performance.
    • Scaling complex business logic where write-side invariants are frequently updated.

    Known limitations

    This skill produces architectural definitions and TypeScript entities, but does not handle infrastructure provisioning or physical database deployment.

    Produces TypeScript entities and architectural definitions. Does not provision cloud infrastructure or deploy physical databases. Restricted to the active project workspace.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Requires

    File System Read/Write (strictly scoped to current project workspace `./`).
    Zero global installation or elevated privileges required.

    Permissions

    Read Files

    Target Use Cases: - Architect a CQRS and Event Sourcing model in TypeScript. - Design read/write model separation with domain events. - Create an Event Sourced aggregate root with projection handlers.

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    This skill provides the structural blueprints for CQRS and Event Sourcing, including Aggregate Roots, immutable event schemas, and Projection Handlers to ensure high read performance and a perfect audit trail.

    The skill generates enterprise-grade TypeScript entities and architectural definitions designed to work within any standard Node.js or TypeScript-based microservices environment.

    Unlike generic prompts, this skill enforces strict Domain-Driven Design (DDD) principles, ensuring that read and write models remain truly separated and that event immutability is never compromised.

    You receive a comprehensive package of architectural scaffolds, including domain event models, command handlers, and projection logic tailored to your specific business domain.

    The skill focuses on the logical architecture and code entities; it does not provision cloud infrastructure like Kafka clusters or specific database instances.

    This skill is optimized for AI agents capable of multi-step reasoning and code generation, such as those used in advanced IDE extensions or autonomous developer agents.

    New in APIs & Backend