query-compliance

Review MongoDB and SQL queries and migrations for security and performance compliance.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/paulinett1508-dev/SuperCartolaManagerv5-production --skill query-compliance
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: query-compliance
Source: https://github.com/paulinett1508-dev/SuperCartolaManagerv5-production/tree/main/.claude/skills/query-compliance
Command: npx skills add https://github.com/paulinett1508-dev/SuperCartolaManagerv5-production --skill query-compliance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents insecure and slow database access by standardizing how teams write queries, migrations, and schema changes for MongoDB and SQL databases.

Core Features & Use Cases

  • Secure Query Practices: Avoids SQL raw with string interpolation by using parameterized queries, enforces least-privilege database users, and prohibits hardcoded credentials.
  • Performance-Focused Design: Encourages proper indexing for WHERE/JOIN/ORDER BY patterns, flags anti-patterns like SELECT *, addresses N+1 queries, and uses pagination plus EXPLAIN/EXPLAIN ANALYZE for slow queries.
  • Migration-Safe Schema Management: Requires reversible migrations (up/down), blocks risky production column changes without staging-tested migrations, and specifies explicit foreign key ON DELETE behavior with consistent timestamps and soft-delete conventions.

Quick Start

Ask the AI to review your proposed MongoDB or SQL query and migration plan against secure query compliance, indexing, pagination, and reversibility rules.

Frequently Asked Questions about query-compliance

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

FAQPage Schema
How do I review SQL queries for injection prevention and performance tuning?▼

To review SQL queries for injection prevention and performance tuning, enforce parameterized query patterns, least-privilege access, and EXPLAIN analysis. This validates indexing for WHERE and JOIN clauses while flagging anti-patterns like SELECT * to ensure secure database operations.

What is query compliance for MongoDB and SQL environments?▼

Query compliance for MongoDB and SQL standardizes how teams write queries, migrations, and schema changes. It prevents insecure database access by requiring parameterized queries, reversible migration workflows, explicit foreign key behaviors, and consistent soft-delete conventions.

How do I create safe database migrations with reversible up and down scripts?▼

Safe database migrations require reversible up and down scripts, staging-tested changes before production, explicit foreign key ON DELETE behaviors, and consistent timestamp usage. This workflow blocks risky production column changes and ensures schema management compliance.

Does this query compliance approach work with both MongoDB and SQL databases?▼

Yes, query compliance rules apply to both MongoDB and SQL environments. The guidelines cover parameterized queries, indexing strategies, pagination, and EXPLAIN ANALYZE performance validation across both database types during code review and performance audits.

What's the best way to fix N+1 queries and improve database indexing?▼

The best way to fix N+1 queries and improve database indexing is using proper indexes for WHERE, JOIN, and ORDER BY patterns, applying pagination, and validating performance with EXPLAIN ANALYZE. This eliminates anti-patterns and standardizes efficient query design.