05-data-persistence

Define persistence layers with entities, repository interfaces, and migrations.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/kennypallchizaca-coder/agentic-full-stack-skills --skill 05-data-persistence
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: 05-data-persistence
Source: https://github.com/kennypallchizaca-coder/agentic-full-stack-skills/tree/main/skills-backend/05-data-persistence
Command: npx skills add https://github.com/kennypallchizaca-coder/agentic-full-stack-skills --skill 05-data-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Persistence logic often leaks into HTTP controllers or service layers, making data access harder to test and evolve. This skill defines a dedicated persistence layer with repositories, entities, and migrations to keep data access isolated and maintainable.

Core Features & Use Cases

  • Explicit entities and schemas with clear keys and constraints to ensure data integrity.
  • Repository interfaces that express business intent (e.g., findById, save, listActive) instead of raw queries.
  • Migration discipline to evolve schemas safely across environments with versioning.

Quick Start

Define the feature's persistence model and repository interfaces, then add a migration plan to evolve the schema safely.

Frequently Asked Questions about 05-data-persistence

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

FAQPage Schema
How do I decouple data access logic from service layers and HTTP controllers?▼

You can decouple data access by defining a dedicated persistence layer with explicit repository interfaces, ensuring data access logic is isolated and maintainable across services.

Why does persistence logic leak into service layers and how do I fix it?▼

Persistence logic leaks when raw queries bypass boundaries; fix this by establishing repository interfaces that express business intent like findById or save, enforcing clean service-layer separation.

What is the best way to evolve database schemas safely across environments?▼

Apply a migrations strategy with versioning to evolve schemas safely across environments, ensuring data integrity and consistent schema changes during deployment.

Can I use this repository pattern approach with both relational and document databases?▼

Yes, this repository pattern supports integrating relational or document databases by defining explicit entities and repository interfaces to replace in-memory storage across services.

How do I structure repository interfaces for business intent instead of raw queries?▼

Structure repository interfaces by defining methods that express business intent like findById, save, or listActive, abstracting raw queries away from the service layer.