sql-analysis
Skill86 starsChanged 50 days agoMITView on GitHub
Use this when writing, reviewing, or modifying SQL queries — including SELECT, CTEs, joins, aggregations, window functions, and validating query correctness or performance.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- velonx/agent-skillstheir own version, first seen Sep 24, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- velonx/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analysis-reportingSkill
- causal-inference-diagnosticsSkill
- dataframe-polarsSkill
- notebook-workflowSkill
- path-and-ioSkill
- plan-analysisSkill
- predictive-modeling-diagnosticsSkill
- prepare-prSkill
- python-project-opsSkill
- python-styleSkill
- review-sqlSkill
- run-edaSkill
- run-modelingSkill
- safe-data-handlingSkill
- simulation-optimization-diagnosticsSkill
- statistical-inference-diagnosticsSkill
- statistical-ml-reviewSkill
- summarize-analysisSkill
- sync-agent-docsSkill
- unsupervised-eda-diagnosticsSkill
- update-agent-docsSkill
- visualizationSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when writing, reviewing, or modifying SQL queries.
- Very specific: line 12
Use explicit column names — avoid SELECT * except for quick exploration.
- Distinctive: line 13
Use CTEs (Common Table Expressions) for readability and modularity.
- Distinctive: line 14
Add date filters for large fact tables to limit scan scope.
- Distinctive: line 15
Check join keys and join cardinality before writing joins.
- Distinctive: line 16
Validate row counts: before and after joins to detect fanout or data loss.
- Distinctive: line 17
Avoid implicit cross joins.
- Very specific: line 18
Never: run DROP, TRUNCATE, DELETE, or UPDATE unless explicitly requested by the user.
- Distinctive: line 19
If destructive SQL is requested, propose a dry-run, backup, or transaction strategy first.
- Distinctive: line 50
Before finalizing a query, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: SQL Analysis
Use this skill when writing, reviewing, or modifying SQL queries.
Rules
- Use explicit column names — avoid
SELECT *except for quick exploration. - Use CTEs (Common Table Expressions) for readability and modularity.
- Add date filters for large fact tables to limit scan scope.
- Check join keys and join cardinality before writing joins.
- Validate row counts before and after joins to detect fanout or data loss.
- Avoid implicit cross joins.
- Never run
DROP,TRUNCATE,DELETE, orUPDATEunless explicitly requested by the user. - If destructive SQL is requested, propose a dry-run, backup, or transaction strategy first.
Query Structure
WITH base AS (
SELECT
column_a,
column_b,
event_date
FROM schema.table_name
WHERE event_date BETWEEN '2024-01-01' AND '2024-01-31'
),
aggregated AS (
SELECT
column_a,
COUNT(*) AS row_count,
SUM(column_b) AS total_b
FROM base
GROUP BY column_a
)
SELECT
column_a,
row_count,
total_b
FROM aggregated
ORDER BY row_count DESC;Review Checklist
Before finalizing a query, verify:
- Are grains (unit of analysis per row) clear?
- Are date ranges explicit and appropriate?
- Are NULLs handled (filtered, coalesced, or documented)?
- Are duplicates considered (distinct, dedup logic)?
- Is join cardinality validated (1:1, 1:N, M:N)?
- Are business definitions documented in comments or CTEs?
- Are row counts checked before and after key transformations?
- Is there any risk of implicit cross join?
- Are destructive operations absent or explicitly approved?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

