fastapi-core-models

Generates reusable SQLAlchemy base models with UUID, timestamp, soft delete mixins for FastAPI projects.

3|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/agusmdev/burntop --skill fastapi-core-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastapi-core-models
Source: https://github.com/agusmdev/burntop/tree/main/.claude/skills/fastapi-core-models
Command: npx skills add https://github.com/agusmdev/burntop --skill fastapi-core-models

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes SQLAlchemy base models for FastAPI projects by providing UUID primary keys, automatic timestamps, and soft delete support, reducing boilerplate and ensuring consistency across domains.

Core Features & Use Cases

  • Base: A reusable Base class with automatic table naming from class names.
  • Mixins: UUIDMixin, TimestampMixin, and SoftDeleteMixin to add common fields and behavior.
  • Usage: Create models by inheriting from the mixins and Base; example: class Item(UUIDMixin, TimestampMixin, SoftDeleteMixin, Base):
  • The approach supports consistent table schemas and easy maintenance across services.

Quick Start

  1. Ensure a Python environment with SQLAlchemy installed.
  2. Place the provided code into src/app/core/models.py (or project equivalent).
  3. Import and use the mixins in your FastAPI models, e.g. class Item(UUIDMixin, TimestampMixin, SoftDeleteMixin, Base): ...

Frequently Asked Questions about fastapi-core-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add UUIDs, timestamps, and soft deletes to SQLAlchemy models in FastAPI?

You can add UUIDs, timestamps, and soft deletes to SQLAlchemy models by using reusable mixins. This skill generates a Base class with UUIDMixin, TimestampMixin, and SoftDeleteMixin to standardize these fields across your domain models without writing repetitive boilerplate.

What is the best way to standardize primary keys across FastAPI SQLAlchemy models?

The best way to standardize primary keys is using a shared UUIDMixin. This skill provides a reusable Base class with dynamic table naming and a UUIDMixin to ensure consistent UUID primary keys and table schemas across all FastAPI domain models.

How do I implement soft deletion in a FastAPI SQLAlchemy database?

You implement soft deletion in FastAPI by applying the SoftDeleteMixin to your models. This skill generates the mixin to add safe soft-deletion fields and behavior, ensuring records are flagged rather than permanently removed from the database.

Does this SQLAlchemy base model approach work without external dependencies?

Yes, the base model approach works without external dependencies. You only need a Python environment with SQLAlchemy installed to place the generated code into your project and inherit from the provided Base class and mixins.

How do I use mixins to create a FastAPI SQLAlchemy model?

To create a FastAPI SQLAlchemy model using mixins, inherit from the desired mixins and the Base class. For example, define your model as `class Item(UUIDMixin, TimestampMixin, SoftDeleteMixin, Base):` to automatically include standard fields and behaviors.