architecting-systems
Guides clean, scalable system architecture during the build phase. Use when designing modules, defining boundaries, structuring…
Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns. Use when writing complex SQL, reviewing queries, adding indexes, or optimizing slow queries.
$ npx -y skills add rileyhilliard/claude-essentials --skill writing-sql --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/writing-sqlContext preview
The summary Claude sees to decide when to auto-load this skill.
Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns. Use when writing complex SQL, reviewing queries, adding indexes, or optimizing slow queries.
name: writing-sql description: Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns. Use when writing complex SQL, reviewing queries, adding indexes, or optimizing slow queries.
**Core principle:** Every query you write has an execution plan. Write SQL with that plan in mind, not just the result.
This skill covers only what Claude's defaults miss. Topics already handled by `managing-databases/postgres-querying.md` (LATERAL, CTE materialization, DISTINCT ON, EXPLAIN red flags, ROWS vs RANGE) are not repeated here.
| Task | Load | |------|------| | Planner picking bad plans on multi-column WHERE | [extended-statistics.md](references/extended-statistics.md) | | LIKE search not using index, text pattern matching | [index-internals.md](references/index-internals.md) | | Composite index column ordering, INCLUDE clause | [index-internals.md](references/index-internals.md) | | Type mismatch between param and column silently bypassing index | [index-internals.md](references/index-internals.md) | | Conditional aggregation, pivot queries, subtotals | [aggregation-patterns.md](references/aggregation-patterns.md) | | GROUPING SETS, ROLLUP, CUBE | [aggregation-patterns.md](references/aggregation-patterns.md) | | NULL edge cases in aggregates and window functions | [aggregation-patterns.md](references/aggregation-patterns.md) | | Paginating large result sets | [query-anti-patterns.md](references/query-anti-patterns.md) | | NOT IN returning zero rows unexpectedly | [query-anti-patterns.md](references/query-anti-patterns.md) | | DISTINCT added to fix duplicate rows | [query-anti-patterns.md](references/query-anti-patterns.md) | | Correlated subqueries in SELECT list | [query-anti-patterns.md](references/query-anti-patterns.md) | | Functions in WHERE bypassing indexes | [query-anti-patterns.md](references/query-anti-patterns.md) |
These apply to every query, no exceptions:
A unified development plugin for Claude Code with essential skills and specialized agents, all accessible under the ce namespace.
Guides clean, scalable system architecture during the build phase. Use when designing modules, defining boundaries, structuring…
Enforces precise, minimal design for dashboards and admin interfaces. Use when building SaaS UIs, data-heavy interfaces, or any…
Executes implementation plans directly with a verification gate and conditional code review. Use when carrying out a written plan…
Diagnose and fix tests that pass in isolation but fail when run concurrently. Covers shared state isolation, resource conflicts,…
Prevents silent failures and context loss in error handling. Use when writing try-catch blocks, designing error propagation,…
Guides database architecture for PostgreSQL, DuckDB, Parquet, PGVector, and Neo4j. Use when designing schemas, choosing storage…