koan-entity-first
OfficialEntities manage themselves, you rest.
Software Engineering#ORM#data access#streaming#batch operations#repository pattern#pagination#GUID#Koan#entity
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()andawait 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), andawait 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
Productentity, then save it withawait product.Save(), retrieve it withawait Product.Get(id), and query all active products withawait 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.