memory_data/skills/sql-best-practices/SKILL.md
Use this skill when writing SQL queries — selects, joins, aggregations, window functions, or schema modifications. Apply whenever SQL is needed to ensure correctness, safety, and performance.
npx skillsauth add aiming-lab/metaclaw sql-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query quality:
SELECT col1, col2 — never SELECT * in production code.WITH) for readability instead of deeply nested subqueries.WHERE before JOIN when possible to reduce data scanned.EXPLAIN / EXPLAIN ANALYZE to inspect query plans for slow queries.Safety:
DELETE, UPDATE, DROP) in a transaction.Naming: snake_case for tables/columns, descriptive names, consistent pluralization.
development
Use this skill when creating charts, plots, or dashboards. Choose the visualization type that best communicates the data relationship before writing any plotting code.
testing
Use this skill before taking any action that is hard to reverse — deleting files, overwriting data, sending messages, pushing to remote, modifying production systems. Always pause, state what you are about to do, and confirm before executing.
research
Use this skill when you are not sure about a fact, have outdated knowledge, or the question is contested. Explicitly communicate the level of confidence instead of asserting uncertain things as fact.
tools
Use this skill when deciding which tools to call in an agentic workflow. Always choose the minimal, most direct tool for each step and avoid redundant or speculative tool calls.