sql-anti-patterns-remediation
/sql-anti-patterns-remediation
Use this skill when identifying and eliminating N+1 query problems, god tables, implicit type conversions, and missing index traps.
- Author
- nextboxis ↗
- Repository
- library-skill-agents ↗
- Licence
- MIT
- Last repository change
- 28.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use this skill when identifying and eliminating N+1 query problems, god tables, implicit type conversions, and missing index traps.
Original author description
Use this skill when identifying and eliminating N+1 query problems, god tables, implicit type conversions, and missing index traps.
How it works
- When to use
- Prerequisites
- Step-by-step workflow
- Commands / code examples
- Common mistakes & pitfalls
- Verification checklist
- Related skills
SKILL.md preview
--- name: sql-anti-patterns-remediation description: Use this skill when identifying and eliminating N+1 query problems, god tables, implicit type conversions, and missing index traps. --- # SQL Anti-Patterns & Query Remediation ## When to use Use this skill when you need to identifying and eliminating N+1 query problems, god tables, implicit type conversions, and missing index traps. ## Prerequisites - Working knowledge of relevant programming language or database fundamentals. - Access to testing environment or local runtime instance. ## Step-by-step workflow 1. **Analyze operational requirements**: Review performance boundaries, data integrity constraints, and query patterns. 2. **Design schema / interface**: Define explicit data contracts, types, or indexes supporting planned operations. 3. **Implement core routines**: Construct declarative, type-safe, or parameterized queries and functions. 4. **Validate performance**: Verify execution metrics using profilers, EXPLAIN plans, or benchmark test suites. 5. **Implement defensive controls**: Enforce timeout boundaries, connection pooling limits, and transaction safety. ## Commands / code examples ```sql -- Production query and schema pattern for sql-anti-patterns-remediation BEGIN; SELECT 1; COMMIT; ``` ## Common mistakes & pitfalls - Overlooking indexing strategies on foreign keys and frequently queried filter columns. - Running unparameterized dynamic queries, creating severe SQL injection vulnerabilities. - Holding open long-running database transactions during slow external network calls. ## Verification checklist - [ ] Schema contracts and type signatures are strictly enforced. - [ ] Queries are fully parameterized against injection vulnerabilities. - [ ] Profiling or execution plans show optimal resource consumption. - [ ] Error handling safely releases locks and rolls back aborted transactions. ## Related skills - postgresql-query-optimization-explain - sql-anti-patterns-remediation - acid-transactions-isolation-levels - secure-code-review-static-analysis-sast
Versions
The database has no other skills named sql-anti-patterns-remediation.
Database snapshot: 13.11.2026 · package version 664ac89dfbba (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100sql-optimizer
Analyzes SQL queries for missing indexes, N+1 patterns, suboptimal joins, and full table scans. Interprets EXPLAIN, detects anti-patterns, rewrites queries. Triggers on: "optimize this query", "slow query", "add indexes", "explain plan", "N+1 query", "why is this query slow". - 100sql-quality-check
Check SQL files for MySQL performance problems (full table scans, ineffective joins, filesorts, functions on indexed columns, implicit conversions and more) and report them, CI style, without changing anything. Use when asked to check, lint or review the SQL of a project, or to… - 100cockroachdb-sql
Use when writing, generating, or optimizing SQL for CockroachDB, designing CockroachDB schemas, or when the user asks about CockroachDB-specific SQL patterns, type mappings, and distributed database best practices. Also use when encountering CockroachDB anti-patterns like… - 95tsql-review
Analyze raw T-SQL source code for anti-patterns, security risks, and static performance smells. Applies 85 checks (T1–T85) across structural, correctness, security, deprecated syntax, performance, and SQL 2017–2022 modern syntax categories. Use this skill whenever a user pastes… - 100anti-patterns
Identify and refactor Elixir anti-patterns. Use when reviewing Elixir code for smells, refactoring problematic patterns, or improving code quality. - 100sql-optimization-patterns
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database...