orm-gorm-sqlite

Community

GORM & SQLite: best-practice patterns.

Authormanorfm
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Go projects often struggle with inconsistent data access patterns when using GORM with SQLite. This skill provides a standardized approach to structuring entities with GORM tags, configuring the SQLite driver, implementing a repository layer, and using hooks like BeforeCreate to prepare IDs or hash data before persistence.

Core Features & Use Cases

  • Entity Modeling: Map domain entities to database tables using GORM with field tags for primary keys and types.
  • SQLite Integration: Leverage the sqlite driver via gorm.io/driver/sqlite for local and lightweight storage.
  • Repository Pattern: Centralize CRUD operations in the repository layer to avoid leaking gorm.DB references into use cases or handlers.
  • Lifecycle Hooks: Use BeforeCreate hooks to generate IDs or hash sensitive data before insertion.

Quick Start

Configure your Go project to use GORM with SQLite by defining entities with GORM tags, wiring the SQLite driver, and implementing a repository layer with BeforeCreate hooks for IDs.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: orm-gorm-sqlite
Download link: https://github.com/manorfm/toToggles/archive/main.zip#orm-gorm-sqlite

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.