api-repository

Implement testable repository patterns with CRUD, transactions, and soft deletes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/charlie83Gs/communities --skill api-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-repository
Source: https://github.com/charlie83Gs/communities/tree/main/.claude/skills/api-repository
Command: npx skills add https://github.com/charlie83Gs/communities --skill api-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires drizzle-orm.

What problem does it solve?

Implementing reliable and testable data access layers with complex CRUD operations, transactions, and soft deletes can be challenging and lead to inconsistent data handling. This skill provides patterns to build a robust and maintainable data layer.

Core Features & Use Cases

  • CRUD Operations & Soft Deletes: Efficiently manage create, read, update, and soft delete operations for database entities, ensuring data integrity.
  • Transaction Management: Guarantee data consistency across multiple operations with robust transaction handling and rollback mechanisms.
  • Testable Repositories: Implement constructor-based dependency injection for easy and isolated unit testing with mock databases, speeding up development.
  • Use Case: Implement a new feature that requires creating a user, associating them with a community, and logging the action, all within a single, atomic transaction that rolls back if any step fails, preventing data inconsistencies.

Quick Start

Implement a new repository method to fetch all active items for a given user, ensuring soft-deleted items are excluded and the method is testable.