auto-database

Teach cursor pagination, index documentation, and bulk updates for SQL and ORM queries.

6|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/Corvalis-LLC/Crow-Stack --skill auto-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-database
Source: https://github.com/Corvalis-LLC/Crow-Stack/tree/main/skills/auto-database
Command: npx skills add https://github.com/Corvalis-LLC/Crow-Stack --skill auto-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Addresses common database query anti-patterns that cause slow production queries, excessive round-trips, and resource waste, such as OFFSET pagination, N+1 queries, and row-by-row updates.

Core Features & Use Cases

  • Cursor/keyset pagination guidance to avoid OFFSET inefficiencies and stabilize ordering
  • Explicit column selection with index documentation to improve planner performance
  • Bulk operations and minimized round-trips to improve throughput
  • Transaction boundaries to ensure atomic writes and safe rollbacks
  • Suitable for designing schemas, writing SQL/ORM queries, and optimizing data access in production systems

Quick Start

Audit your current queries for OFFSET usage and missing indexes, then refactor to keyset pagination and bulk updates.

Frequently Asked Questions about auto-database

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

FAQPage Schema
How do I optimize database queries to fix slow OFFSET pagination?

To optimize database queries and fix slow OFFSET pagination, refactor to cursor or keyset pagination. This approach stabilizes ordering and avoids the performance degradation inherent in OFFSET-based pagination when navigating large datasets.

What is the best way to avoid N+1 queries and excessive round-trips in an ORM?

The best way to avoid N+1 queries and reduce round-trips is implementing bulk operations and explicit column selection instead of SELECT *. This minimizes data transfer and improves backend data-access layer throughput.

How do I document indexes to improve SQL query planner performance?

To improve SQL query planner performance, ensure explicit column selection and add index documentation comments directly in your code. This guides the planner by clarifying which indexes apply to specific query patterns.

Does this database optimization approach work with microservices and large datasets?

Yes, this database optimization approach works with microservices and large datasets by applying cursor pagination, bulk updates, and minimized round-trips to typical backend data-access layers using SQL and ORM frameworks.

How do I ensure atomic writes and safe rollbacks during bulk updates?

To ensure atomic writes and safe rollbacks during bulk updates, enforce proper transaction boundaries. This maintains data integrity by allowing the system to safely roll back if a bulk operation fails midway.