LogoClawIndex
CasesSkillsAbout
LogoClawIndex

state-view-slice - Build State View Slices from Event Models

Creates read model projections that consume events and project them into queryable PostgreSQL database tables.

Tags

Updated: 2026-06-30
state-viewread-modelprojectionpostgresqlevent-sourcingcqrs

Capabilities

Create projection handler filesCreate projection test filesCreate query API route filesCreate database migration SQL files

Typical Inputs

Event model definitionEvent typesPostgreSQL connection string

Typical Outputs

Projection handler TypeScript filesProjection test filesQuery API route files

What this skill does

  • Create projection handler files
  • Create projection test files
  • Create query API route files
  • Create database migration SQL files
  • Generate slice JSON config
  • Register projections in event store

Inputs

  • Event model definition
  • Event types
  • PostgreSQL connection string
  • Slice name and metadata

Outputs

  • Projection handler TypeScript files
  • Projection test files
  • Query API route files
  • Database migration SQL files
  • Slice JSON configuration files

Requirements

  • PostgreSQL database
  • Node.js runtime
  • Emmett PostgreSQL library
  • Knex.js
  • Testcontainers for testing
  • Flyway for database migrations
  • Supabase client

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.