Skip to main content

sql-best-practices

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.

Informações da origem

Repositório
aiming-lab/MetaClaw
Última atividade na origem
10 de março de 2026 às 18:04
Idioma detectado do SKILL.md
inglês
Estrelas
3.464
Forks
453

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
sql-best-practices
description
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.
category
data_analysis
# SQL Best Practices **Query quality:** - Use `SELECT col1, col2` — never `SELECT *` in production code. - Use CTEs (`WITH`) for readability instead of deeply nested subqueries. - Filter early: apply `WHERE` before `JOIN` when possible to reduce data scanned. - Use `EXPLAIN` / `EXPLAIN ANALYZE` to inspect query plans for slow queries. **Safety:** - Always use parameterized queries from application code — never string interpolation. - Wrap destructive operations (`DELETE`, `UPDATE`, `DROP`) in a transaction. - Test on a staging/dev environment before running on production. **Naming:** `snake_case` for tables/columns, descriptive names, consistent pluralization.
Ver no GitHub