generate-repository

Generate a TypeScript repository class for SQLite CRUD operations.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/marcd35/health-tracker-9000 --skill generate-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-repository
Source: https://github.com/marcd35/health-tracker-9000/tree/main/.claude/skills/generate-repository
Command: npx skills add https://github.com/marcd35/health-tracker-9000 --skill generate-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces boilerplate by generating a complete SQLite data-access repository class in TypeScript, enabling consistent CRUD operations and type-safe mappings.

Core Features & Use Cases

  • Repository file generation following the repository pattern for a given entity.
  • CRUD methods (add, get, update, delete) with ID and timestamp handling.
  • Snake_case to camelCase row mapping and JSON field serialization.
  • Flexible configuration for entity name, table name, and field definitions to support new tables or data access layers.

Quick Start

Provide an entity name (e.g., WaterLog) and a table name (e.g., water_logs) along with fields. The tool will generate a repository file at src/lib/database/repositories/{EntityName}Repository.ts and wire it into your data layer for immediate use.

Frequently Asked Questions about generate-repository

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

FAQPage Schema
How do I generate a TypeScript SQLite repository with CRUD operations?

To generate a TypeScript SQLite repository with CRUD operations, provide an entity name, table name, and fields. The tool outputs a repository file with add, get, update, and delete methods, handling ID and timestamp logic for immediate use.

What's the best way to handle snake_case to camelCase mapping in SQLite data access?

The best way to handle snake_case to camelCase mapping in SQLite data access is using a generated repository class. It automatically converts database row formats to TypeScript camelCase properties, ensuring type-safe mappings without manual conversion logic.

Can I generate a data access layer for TypeScript without writing boilerplate CRUD code?

Yes, you can generate a data access layer without writing boilerplate CRUD code. By providing entity definitions, the tool auto-creates a complete repository pattern class with consistent CRUD functionality and JSON field serialization handling.

Does the generated SQLite repository support JSON field serialization in TypeScript?

Yes, the generated SQLite repository supports JSON field serialization in TypeScript. The repository class automatically handles JSON field serialization within its CRUD methods, allowing complex object storage in SQLite columns seamlessly.

How do I wire a generated repository into an existing SQLite database connection?

To wire a generated repository into an existing SQLite database connection, the generated file integrates with a getDatabase() connection function. The repository file is placed in a specific directory and connects automatically for immediate data access.

What limitations exist when auto-generating repository files for SQLite tables?

Limitations when auto-generating repository files for SQLite tables include dependency on a specific getDatabase() connection function and fixed output paths. The generated code follows the repository pattern strictly, which may not suit custom query requirements outside standard CRUD.