sqlmodel-task-models
This skill should be used when defining a robust, type-safe, and async-compatible database schema for the Todo application using SQLModel, ensuring compatibility with Better Auth and optimized for PostgreSQL.
Best use case
sqlmodel-task-models is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when defining a robust, type-safe, and async-compatible database schema for the Todo application using SQLModel, ensuring compatibility with Better Auth and optimized for PostgreSQL.
Teams using sqlmodel-task-models should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/sqlmodel-task-models/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How sqlmodel-task-models Compares
| Feature / Agent | sqlmodel-task-models | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when defining a robust, type-safe, and async-compatible database schema for the Todo application using SQLModel, ensuring compatibility with Better Auth and optimized for PostgreSQL.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# SQLModel Task Models
This skill providing guidance on defining a robust database schema using SQLModel for the Todo application.
## Purpose
Defining a robust, type-safe, and async-compatible database schema for the Todo application using SQLModel, ensuring compatibility with Better Auth and optimized for PostgreSQL.
## Capabilities
- **User Model**: Schema aligned with Better Auth requirements.
- **Task Model**: Full CRUD capability with relational mapping to Users.
- **Relational Integrity**: Proper foreign key constraints and back-references.
- **Performance**: Strategic indexing on `user_id` and `completed` fields.
- **Safety**: Automated timestamp management (`created_at`, `updated_at`).
## Implementation Details
### Models Definition
```python
from sqlmodel import SQLModel, Field, Relationship
from typing import List, Optional
from datetime import datetime
class User(SQLModel, table=True):
id: str = Field(primary_key=True)
email: str = Field(unique=True, index=True)
name: Optional[str] = None
created_at: datetime = Field(default_factory=datetime.utcnow)
tasks: List["Task"] = Relationship(back_populates="user")
class Task(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
user_id: str = Field(foreign_key="user.id", index=True)
title: str
description: Optional[str] = None
completed: bool = Field(default=False, index=True)
created_at: datetime = Field(default_factory=datetime.utcnow)
updated_at: datetime = Field(default_factory=datetime.utcnow)
user: Optional[User] = Relationship(back_populates="tasks")
```
## Best Practices
- Using `table=True` for models that map to database tables.
- Explicitly defining indexes for fields used in `WHERE` clauses (e.g., `user_id`, `completed`).
- Using `datetime.utcnow` for consistent cross-region timestamping.
- Keeping `user_id` as a string to match Better Auth's UUID/ID format.Related Skills
ios-foundation-models-diag
Use when debugging Foundation Models issues — context exceeded, guardrail violations, slow generation, availability problems, unsupported language, or unexpected output. Systematic diagnostics with production crisis defense.
axiom-foundation-models
Use when implementing on-device AI with Apple's Foundation Models framework — prevents context overflow, blocking UI, wrong model use cases, and manual JSON parsing when @Generable should be used. iOS 26+, macOS 26+, iPadOS 26+, axiom-visionOS 26+
avalonia-viewmodels-zafiro
Optimal ViewModel and Wizard creation patterns for Avalonia using Zafiro and ReactiveUI.
aidf-task-templates
Task template definitions for AIDF. Provides structured templates for component, refactor, test, docs, architecture, and bugfix task types.
todo-task-planning
Execute task planning based on the specified file and manage questions[/todo-task-planning file_path --pr --branch branch_name]
task-automation
Execute development tasks from manifest, run parallel agents, verify builds, manage task pipeline. Use when user wants to run tasks, check task status, execute dev loop, or work through the backlog.
task-add
This skill should be used when the user asks to "add a task", "create task", "new task", or "task to do X". Adds timestamped tasks to daily note log with optional due dates.
pixi-tasks
Complex pixi task workflows and orchestration. Use when building task dependency chains, configuring caching with inputs/outputs, creating parameterized tasks, or setting up CI pipelines—e.g., "pixi task depends-on", "task caching for build automation", "multi-environment test matrices".
mise-tasks
Orchestrate workflows with mise [tasks]. TRIGGERS - mise tasks, mise run, task runner, depends, depends_post, workflow automation, task dependencies.
defining-typescript-models
Defines standard TypeScript interfaces for Appwrite Collections. Use when creating new models for Tours, Users, or Bookings to ensure full type safety.
pydantic-models-py
Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants. Use when defining API request/response schemas, database models, or data validation ...
API Models
Your approach to handling API models. Use this skill when working on files where API models comes into play.