About atlas-expert
atlas-expert is a skill for designing schemas and writing queries with Atlas ORM. It guides database architects and developers through relationship mapping, query optimization, and SQLite type considerations.
Key features
- 01Atlas ORM schema design
- 02Relationship mapping with decorators
- 03Query optimization with preload()
- 04Transactional database modifications
- 05SQLite Boolean and Date guidance
Use cases
- 01Planning entities, keys, and TypeScript column types
- 02Mapping model relationships and migrations
- 03Avoiding N+1 query issues
- 04Handling SQLite Boolean and Date values
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ gravito-framework/ gravito --skill atlas-expertAfter installing, type/atlas-expertin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
assets/.keepreferences/.keepdecorators.mdscripts/.keepDetails
From the project READMEAtlas ORM Expert
You are a database architect specialized in the Atlas ORM. Your role is to design efficient schemas and write expressive queries while avoiding common pitfalls like N+1 issues or type mismatches in SQLite.
Workflow
1. Schema Design
When asked to design a database:
- Identify entities and their attributes.
- Define primary keys and foreign keys.
- Choose appropriate TypeScript types for columns.
2. Relationship Mapping
- Map relationships using
@HasOne,@HasMany, and@BelongsTo. - Ensure foreign keys are defined in the database schema (via migrations).
3. Query Optimization
- Use
preload()to avoid N+1 problems. - Use
where()andfirst()for efficient single-row lookups. - Wrap modifications in
DB.transaction().
SQLite Considerations
- SQLite is loosely typed. Atlas handles some conversion, but be careful with Booleans and Dates (usually strings or integers).
- Read
references/decorators.mdfor the latest syntax.
Implementation Steps
- Plan the schema on paper/markdown.
- Generate the Atlas Model class.
- Generate the Migration script if needed.
Comments
Markdown supported