review-bench/andresharpe_dotbot/entity-design
Claude Code and agent skill by review-bench/andresharpe_dotbot
- community
Checking that the SKILL.md file is still in the repository.
Design and document domain entities with consistent structure, relationships, and audit fields following project conventions
Install
npx vskill@latest install review-bench/andresharpe_dotbot/entity-designSKILL.md
Entity Design
Guide for designing and documenting domain entities in a consistent, well-structured format.
When to Use
- Designing new domain entities
- Documenting existing entity models
- Adding fields to existing entities
- Reviewing entity relationships
- Planning database schema changes
Entity Model Document Structure
Entity model documents should follow this structure:
1. Overview Section
2. EntityBase Section
All entities inherit common audit fields:
3. Individual Entity Sections
Each entity should follow this template:
Field Naming Conventions
This project uses PascalCase for both C# properties and database columns (EF Core default behavior):
CreatedAtUtc- notcreated_at_utcSenderId- notsender_idIsDeleted- notis_deleted
Primary Keys
- Use auto-increment integers:
Id| int - Named simply
Id(notEntityNameId)
Foreign Keys
- Reference the full field name:
ParentEntityId| int - Add "Foreign key to X" in description
Common Types
string- Text fieldsstring (nullable)- Optional textint- Integersdecimal- Numbers with decimalsbool- True/falsedatetime- Timestamps (always UTC unlessLocalsuffix)jsonb- JSON data (complex structures, arrays)enum- Enumerated values (list in Enums section)
Nullable Fields
- Append
(nullable)to type:string (nullable) - Only mark nullable if null has semantic meaning
Relationship Notation
Use arrows to show cardinality:
1 → N- One-to-manyN → 1- Many-to-one1 → 1- One-to-oneN ↔ N- Many-to-many (note the join entity)
Include context when helpful:
Email 1 → N AttachmentN → 1 SenderMeetingRequest 1 → 1 CalendarEvent (optional)
Design Principles
1. Soft Deletes
Never hard delete records. Always use:
DeletedAtUtc- When deletedDeletedBy- Who deleted
2. UTC Timestamps
- Primary timestamps always UTC with
Utcsuffix - Local timestamps optional for display, use
Localsuffix - Store timezone separately if needed
3. Integer Primary Keys
- Auto-increment integers for simplicity
- Good SQLite performance
- Easy to reference in logs and debugging
4. Audit Fields
Every entity inherits EntityBase audit fields automatically.
5. JSONB for Complex Data
Use JSONB for:
- Variable-length arrays
- Nested structures
- Configuration objects
- Avoid over-normalisation
Example Entity
Key Design Decisions Section
Document major architectural decisions at the end:
Checklist
- [ ] Overview section describes the entity model scope
- [ ] EntityBase documented with audit fields
- [ ] Each entity has Purpose, Fields table, Enums, Relationships
- [ ] Field names use PascalCase
- [ ] Primary keys are int named
Id - [ ] Foreign keys are int referencing parent
Id - [ ] Nullable fields explicitly marked
- [ ] Enums listed with all values
- [ ] Relationships use correct notation
- [ ] Notes capture important constraints
- [ ] Entity Relationship Summary provides overview
- [ ] Key Design Decisions documented
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingstacks/dotnet/recipes/skills/entity-design/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/review-bench/andresharpe_dotbot/entity-design)