sql
Skill1 starsChanged 3 months agoMITView on GitHub
Working against a SQL database or warehouse — query-for-features discipline. Carries: push compute to the database (aggregate/filter/join there; pull results, not tables), window functions for leakage-safe historical features (frames ending at `1 PRECEDING`, never the current row's future), the join-explosion check (know the grain; validate row counts before and after), parametrized queries only (never f-string SQL), sampling strategies for EDA on big tables, snapshotting query results that training consumes (a live query is an unpinned dependency), queries as versioned `.sql` files, and read-only credentials for analysis. Load when data lives in Postgres/BigQuery/Snowflake/DuckDB/SQLite. Triggers: SQL, query, database, warehouse, Postgres, BigQuery, Snowflake, DuckDB, join, window function, GROUP BY, write a query, pull from the database, NL-to-SQL, table, schema, CTE.
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Every join has an expected cardinality — state it and check it:
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
sql — the database as a feature engine, not a file server
Scope: analytics. This skill is about answering questions from data at rest — warehouses, query engines, and the discipline that keeps a query honest. The application's transactional database is
relational-stores: schema design, migrations, connection pooling, indexes and query plans, transactions and isolation. Both are SQL; the failure modes have almost nothing in common. Table formats and object storage areobject-and-lakehouse.On-demand: load this when the project's data lives behind a query engine. The split/leakage canon is still
datasets; feature hypotheses still land in the feature dictionary (P4); this skill is the mechanics of doing that work in SQL without the classic silent failures.
Push compute down; pull results, not tables
SELECT * into pandas and aggregating there is the anti-pattern: slow, memory-bound, and it
duplicates logic the database does better. Aggregate, filter, join, and window in the query;
what crosses the wire is the modeling table. pandas (wrangling) starts where SQL stops being
readable — not before.
Leakage-safe historical features (the window-frame rule)
The P4 rule "only information available at prediction time" has an exact SQL form — the frame must end before the current row:
AVG(outcome) OVER (
PARTITION BY entity_id ORDER BY event_time
ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING -- never CURRENT ROW for target-derived
) AS entity_history_rateA frame that includes the current row leaks the label into its own feature; a plain
GROUP BY entity aggregate computed over all time leaks the future into every row. Time-order
matters for splits too — the temporal split (datasets/timeseries) is a WHERE event_time
boundary, applied in the query, same boundary everywhere.
Joins: know the grain, prove it held
Every join has an expected cardinality — state it and check it:
- Row counts before and after; an unexplained growth is a many-to-many explosion silently duplicating (and up-weighting) rows.
- Anti-join the unmatched (
LEFT JOIN ... WHERE right.key IS NULL) — unmatched rows are either a filter you're applying by accident or a data-quality finding for P2's notes. - Deduplicate keys deliberately (
ROW_NUMBER() OVER (PARTITION BY key ORDER BY ...) = 1), with the ORDER BY making the kept row a decision, not an accident.
Mechanics that keep it safe and reproducible
- Parametrize, never interpolate — placeholders (
%s,:name) not f-strings: injection (security canon) and query-plan reuse. Analysis work runs on a read-only role. - Queries are code: versioned
.sqlfiles (or one query module), not strings scattered in notebooks — the feature dictionary references them by name. - Snapshot what training eats. A model trained on
SELECT ... FROM live_tableis pinned to nothing. Materialize the training extract (table-as-of or exported file), version it (data-dvc), and record extract time + row count in the manifest. - EDA on big tables:
TABLESAMPLE/ hash-sampling (WHERE MOD(ABS(HASH(id)), 100) = 0) for a stable sample —LIMITwithout ORDER BY is whatever the engine felt like.
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- Zafer-Liu/Data-Analysis-Agent★ 2.6ksame name
- SparkDevNetwork/Rock★ 692same name
- sendou-ink/sendou.ink★ 299same name
- maragudk/skills★ 49same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- G1Joshi/Agent-Skills★ 15same name
- redpanda-data/skills★ 8same name
- thechandanbhagat/claude-skills★ 8same name
- Spardutti/claude-skills★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
5 more not listed
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.
Used alongsideProjects with it also use react and terraform.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 6 projects that use this
ihiteshguptaSkillterraform
Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.
Also in 3 projects that use this
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-evaluationSkill
- agent-securitySkill
- annotationSkill
- authn-authzSkill
- caching-and-queuesSkill
- config-hydraSkill
- config-omegaconfSkill
- containersSkill
- data-acquisitionSkill
- data-dvcSkill
- datasetsSkill
- edaSkill
- env-uvSkill
- evaluationSkill
- example-skillSkill
- finetune-unslothSkill
- gitopsSkill
- governanceSkill
- graph-storesSkill
- guardrailsSkill
- hpo-optunaSkill
- iac-terraformSkill
- infra-awsSkill
- infra-azureSkill
- infra-gcpSkill
- kubernetesSkill
- llm-evalSkill
- llm-red-teamingSkill
- local-stackSkill
- mcp-securitySkill
- memorySkill
- monitoringSkill
- notebooksSkill
- object-and-lakehouseSkill
- observabilitySkill
- pipelinesSkill
- policy-as-codeSkill
- processSkill
- relational-storesSkill
- reliability-sreSkill
- reportingSkill
- secrets-managementSkill
- secure-cicdSkill
- servingSkill
- statisticsSkill
- supply-chain-securitySkill
- tabularSkill
- testingSkill
- threat-modelingSkill
- timeseriesSkill
- tracking-mlflowSkill
- tracking-wandbSkill
- trainingSkill
- vector-storesSkill
- visualizationSkill
- wave-planningSkill
- workflow-orchestrationSkill
- wranglingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

