Agent skill
sqlmodel-data-modeling
Guide for ORM-based data modeling with SQLModel. Use for defining database models, fields, constraints, relationships (1:N, N:M), inheritance, validators, and handling JSON fields and timestamps. Provides templates for User, Task, and Category models.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/sqlmodel-data-modeling
SKILL.md
SQLModel Data Modeling
This skill provides guidance and code patterns for creating robust and efficient data models using SQLModel.
Workflow
- Define Basic Models: Start by defining the basic structure of your models. Refer to
references/model_definition.mdfor defining tables, fields, and constraints. It includes templates forUser,Task, andCategorymodels. - Establish Relationships: Define relationships between your models. See
references/relationships.mdfor patterns on creating one-to-many (1:N) and many-to-many (N:M) relationships. - Implement Advanced Patterns: For more complex scenarios, consult
references/advanced_patterns.md. This guide covers model inheritance, a base model with audit timestamp fields, computed properties, and handling of JSON data. - Add Validation: Implement data validation to ensure integrity. Examples of model validation using SQLModel's features are in
references/validation.md.
Always consult the relevant reference document for detailed code examples and best practices for each step.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?