orm-models

Define LiteORM model structs with tags, AutoMigrate, associations, hooks, and soft delete.

5|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/go-again/liteorm --skill orm-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orm-models
Source: https://github.com/go-again/liteorm/tree/main/skills/orm-models
Command: npx skills add https://github.com/go-again/liteorm --skill orm-models

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides a comprehensive guide to define and manage ORM models using LiteORM's declarative ORM front-end, streamlining the process of creating and interacting with database models.

Core Features & Use Cases

  • Model Definition: Learn how to define model structs with TableName() and orm:"..." tags.
  • AutoMigrate: Automate the creation and synchronization of database tables with AutoMigrate.
  • Associations: Understand how to handle relationships like belongs-to, has-many, and many-to-many.
  • Hooks: Implement custom hooks for lifecycle events like create, update, and delete.
  • Soft Delete: Implement soft delete functionality for models with soft delete columns.
  • Use Case: Create a User model with associated Post and Comment models, and implement soft delete for user records.

Quick Start

Use the orm-models skill to define a new model 'User' with fields for ID, username, and email.

Frequently Asked Questions about orm-models

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

FAQPage Schema
How do I define ORM models in Go using LiteORM?

To define ORM models in Go using LiteORM, you create model structs utilizing the TableName() method and orm:"..." struct tags to map fields to database columns declaratively.

Can I automate database table creation with LiteORM?

Yes, you can automate database table creation and synchronization in LiteORM by using the AutoMigrate feature to automatically align your database schema with your defined Go model structs.

Does LiteORM support relationships like has-many and many-to-many?

LiteORM supports managing database relationships including belongs-to, has-many, and many-to-many associations, allowing you to define complex data interactions directly through your Go model definitions.

How do I implement soft delete functionality for LiteORM models?

You implement soft delete functionality in LiteORM models by adding soft delete columns to your struct, which allows the ORM to mark records as deleted without actually removing them from the database.

Can I add custom hooks for create and update lifecycle events in LiteORM?

LiteORM allows you to implement custom hooks for model lifecycle events such as create, update, and delete, enabling you to execute custom Go logic automatically before or after database operations.