create-repository

Define a typed repository interface for CRUD data access in TypeScript services.

1|Updated May 21, 2025
One-click install
npx skills add https://github.com/madooei/backend-template --skill create-repository-madooei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-repository
Source: https://github.com/madooei/backend-template/tree/main/.claude/skills/create-repository
Command: npx skills add https://github.com/madooei/backend-template --skill create-repository-madooei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defines a standardized repository interface to abstract data access for entities, enabling consistent data-layer contracts across services.

Core Features & Use Cases

  • Establishes a standard CRUD interface (findAll, findById, create, update, remove) to centralize data access.
  • Enforces repository naming and file structure rules (singular, kebab-case filenames like {entity-name}.repository.ts) and shared type imports for entity schemas.

Quick Start

Create the interface file at src/repositories/{entity-name}.repository.ts.

Frequently Asked Questions about create-repository

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

FAQPage Schema
How do I define a TypeScript repository interface for CRUD operations?

To define a TypeScript repository interface, you create a file at src/repositories/{entity-name}.repository.ts implementing the IEntityRepository pattern with typed findAll, findById, create, update, and remove methods.

What is the repository pattern for abstracting data access in TypeScript services?

The repository pattern for data access abstracts data stores behind a standardized interface, centralizing CRUD operations and enforcing consistent data-layer contracts across TypeScript services.

When do I need a standardized repository interface for my entities?

You need a standardized repository interface when adding a new resource that requires CRUD operations across various data stores, enabling shared paginated results and typed inputs.

Does the repository pattern enforce specific file naming conventions in TypeScript?

Yes, the repository pattern enforces singular, kebab-case filenames like {entity-name}.repository.ts and requires shared type imports for entity schemas to maintain structural consistency.

Can I use this repository interface with different data stores?

Yes, you can use this repository interface with different data stores because it abstracts data access, allowing various data stores to implement the same standardized CRUD contract.