database-schema

Define type-safe relational database schemas with entities, columns, and foreign keys.

74|5|Updated Dec 13, 2019
One-click install
npx skills add https://github.com/mikialex/rendiation --skill database-schema-mikialex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-schema
Source: https://github.com/mikialex/rendiation/tree/main/.claude/skills/database-schema
Command: npx skills add https://github.com/mikialex/rendiation --skill database-schema-mikialex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you define and wire a type-safe relational database schema so your rendering engine can store state in a consistent, statically-typed, SQL-like way instead of relying on unstructured ECS-style component attachment.

Core Features & Use Cases

  • Declare entities (tables) and components (columns): Create multiple entity types with fixed, statically-typed columns and defaults per column.
  • Model relationships with explicit foreign keys: Define cross-table links via typed foreign key columns for predictable data flow between systems.
  • Register schemas and use CRUD/query patterns: Initialize the global database schema in the correct order and perform typed reads/writes plus reactive hook-driven incremental updates.

Use case: when adding a new rendering subsystem (e.g., scene nodes, materials, transforms), define new tables and columns, connect dependencies with foreign keys, and then query or react to changes incrementally.

Quick Start

Register a new entity type and its columns (including any foreign keys) with the global database, then use EntityWriter to create rows and EntityReader or ComponentReadView to read typed column values.

Frequently Asked Questions about database-schema

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

FAQPage Schema
How do I define type-safe relational database schemas with foreign keys?

Type-safe relational database schemas are defined by declaring entities and components with fixed columns, then linking tables via explicit foreign key declarations. This approach provides statically-typed column access and predictable data flow between rendering subsystems.

What is the best way to manage state in a rendering engine without unstructured ECS components?

Managing rendering engine state with type-safe relational schemas replaces unstructured ECS component attachment. By using SQL-like tables, fixed typed columns, and explicit foreign keys, state is stored consistently and accessed via typed read and write operations.

How do I set up incremental computation and reactive queries for relational database tables?

Incremental computation and reactive queries for relational tables are set up using reactive hooks attached to ComponentReadView. These hooks propagate changes automatically, enabling incremental updates when typed column values are read or modified during rendering.

Can I use relational database schemas for scene nodes and materials in a rendering subsystem?

Relational database schemas can be used for rendering subsystems like scene nodes, materials, and transforms. New entity types and columns are registered with the global database, connected via foreign keys, and queried or reacted to incrementally.

How do I register and initialize a global database schema in the correct order?

Global database schema registration requires ordering entity declarations through declare_entity!, declare_component!, and declare_foreign_key! macros. Once registered in sequence, EntityWriter creates rows and EntityReader performs typed reads.

Relational database schemas vs ECS component attachment: which approach ensures predictable data flow?

Relational database schemas with explicit foreign keys ensure predictable data flow compared to unstructured ECS attachment. Typed foreign key columns define cross-table links statically, guaranteeing consistent data access and safer incremental state management.