CtrlK
BlogDocsLog inGet started
Tessl Logo

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.

74

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

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.

Repository
aiming-lab/MetaClaw
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.