persistence-adapter

Implement repository patterns, ORM usage, and schema migrations across Rails, TypeORM, and Django.

1|Updated Aug 10, 2025
One-click install
npx skills add https://github.com/michsindlinger/agent-os-extended --skill persistence-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: persistence-adapter
Source: https://github.com/michsindlinger/agent-os-extended/tree/main/agent-os/templates/skills/dev-team/backend/persistence-adapter
Command: npx skills add https://github.com/michsindlinger/agent-os-extended --skill persistence-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines database interactions, ensuring efficient data access, robust schema management, and optimized query performance across various programming languages and frameworks.

Core Features & Use Cases

  • Data Access Patterns: Implement the Repository and Query Object patterns for clean data separation.
  • Schema Management: Create and manage database migrations with rollback capabilities.
  • Query Optimization: Prevent N+1 queries, optimize indexing, and analyze query performance.
  • Use Case: When developing a new feature that requires fetching user data along with their associated posts and comments, use this Skill to define an efficient repository method that uses eager loading to avoid multiple database round trips.

Quick Start

Use the persistence-adapter skill to create a new database migration for adding a 'status' column to the 'users' table.

Frequently Asked Questions about persistence-adapter

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

FAQPage Schema
How do I fix N+1 query problems when using an ORM like Django or TypeORM?

Fix N+1 query problems in your ORM by implementing eager loading within your repository pattern. This Skill provides examples for Django ORM, TypeORM, and Rails to fetch associated data efficiently and prevent multiple database round trips.

What is the repository pattern and how does it help with database persistence?

The repository pattern abstracts data access, providing a clean separation between business logic and database persistence. This Skill demonstrates how to implement it across Ruby on Rails, Node.js with TypeORM, and Python with Django ORM for maintainable code.

How do I create a database migration to add a column with rollback capabilities?

Create a database migration to add a column by defining schema changes with rollback capabilities. This Skill guides you through schema management processes to ensure robust database migrations across multiple tech stacks like Ruby on Rails and Django.

Does this database persistence guidance work with both Node.js and Python frameworks?

Yes, this database persistence guidance supports both Node.js and Python frameworks. It provides comprehensive examples for TypeORM in Node.js and Django ORM in Python, alongside Ruby on Rails, covering data access and query optimization.

What's the best way to optimize SQL indexing and analyze query performance in an ORM?

Optimize SQL indexing and analyze query performance by applying the query optimization techniques provided in this Skill. It covers preventing N+1 queries, optimizing indexing strategies, and performance tuning across various ORM implementations.