koan-entity-first

Official

Entities manage themselves, you rest.

Authorsylin-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Traditional data access layers often involve repetitive repository boilerplate, N+1 query problems, and complex manual ID management. This Skill eliminates these issues by making entities self-aware and self-persisting, simplifying data operations.

Core Features & Use Cases

  • Auto GUID v7 IDs: Entities automatically get chronologically sortable, globally unique IDs without manual intervention.
  • Self-Persisting Entities: Use await entity.Save() and await entity.Remove() directly on entity instances, eliminating the need for separate repositories.
  • Efficient Querying: Perform static queries like await Entity.All(), await Entity.Get(id), and await Entity.Query() with LINQ, supporting batch retrieval to prevent N+1 issues.
  • Streaming & Pagination: Handle large datasets efficiently with streaming (AllStream()) and paginate results for web APIs.
  • Use Case: Define a Product entity, then save it with await product.Save(), retrieve it with await Product.Get(id), and query all active products with await Product.Query(p => p.IsActive), all without writing a single repository class.

Quick Start

To create and save a new 'Todo' item: var todo = new Todo { Title = "Buy groceries" }; await todo.Save(); To retrieve it by ID: var loaded = await Todo.Get(todo.Id);

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: koan-entity-first
Download link: https://github.com/sylin-org/koan-framework/archive/main.zip#koan-entity-first

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.