sql-review
Skill17 starsChanged 32 days agoMITView on GitHub
Prove an app's numbers against live Snowflake and leave a record a person signs. Builds or repairs the app's sql_review/ page files, checks objects, grants and DDL drift, runs every section as aggregates, has reviewer agents judge the logic, drops findings the evidence does not support, and writes the committed review log. Use when the user says "review the SQL", "are these numbers right", "trace the data", "audit the lineage", before a release or deploy, or from /review-app --sql. It spends warehouse credits, so run it when asked, not on your own initiative.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- Smaui94/ClaudeSkillCollectiontheir own version, first seen Nov 8, 2026
- polardb/polardbx-skillstheir own version, first seen Nov 8, 2026
- Lanqiao-Luca/ai-java-workflowtheir own version, first seen Nov 8, 2026
- z-Zihan/Evirtheir own version, first seen Oct 13, 2026
- analyticsengineering/ae-toolkittheir own version, first seen Oct 12, 2026
- GabrielHenriqueCA/cortex-aitheir own version, first seen Oct 11, 2026
Used with
Projects with it also use code-review.
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.
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 4 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- Lanqiao-Luca/ai-java-workflow★ 220same name
- z-Zihan/Evir★ 11same name
- polardb/polardbx-skills★ 8same name
- analyticsengineering/ae-toolkit★ 3same name
- gmanch94/claude-code-aidlc-template★ 2same name
- Jiplet/transformation-os★ 2same name
- dennisrongo/claude-skills★ 1same name
- GabrielHenriqueCA/cortex-ai★ 1same name
- bt2go/claude-skills★ 0same name
- Smaui94/ClaudeSkillCollection★ 0same 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 repository9 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- releaseSkill
- build-appSkill
- migrate-appSkill
- onboardSkill
- preview-appSkill
- review-appSkill
- ship-appSkill
- validate-appSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Every fact comes from a streamsnow sql-review command as JSON with a stable id.
- Very specific: line 36
Read these outputs, never result rows.
- Very specific: line 58
If a reviewer re-ran a page, run compare again (offline) so its rows are not stale.
- Very specific: line 63
Write it: the same command without --dry-run.
- Distinctive: line 73
No row-level data or small-group breakdowns in a finding, the log, or chat: pass or fail, row counts, top-level totals.
“Common” is measured: kept by at least 6 in 10 of the 8 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-review
Repo overlay: if
.streamsnow/overlays/sql-review.mdexists in this repo, read it first — committed, repo-specific additions/overrides (_shared/overlays.md). Outside Claude Code, also read _shared/other-agents.md.
Every fact comes from a streamsnow sql-review command as JSON with a stable id; agents only
judge, every finding cites those IDs, a verifier drops what the evidence does not support, and
log refuses anything uncited. Judgment, never a gate: streamsnow validate-app alone passes or
fails a ship. Run it on request and before a release or deploy.
Preflight
- Resolve the slug; read the app's
AGENTS.md(Data notes) andREQUIREMENTS.md. - Offline gate:
streamsnow sql-review check <slug>. Noindex.yaml, coverage gaps ormarkerfindings → build the index first, per authoring.md. Drift →streamsnow sql-review generate <slug>, committed on its own: the live commands refuse page files that do not match what the app runs.--offlinestops here and reports the coverage. - Connection:
streamsnow doctor. None → stop after step 2 and name the enabler (streamsnow configure, thensnow connection add); never invent results. The live commands run assnowflake.roles.ci_role(the deployed app's role) with secondary roles off; if the user does not hold it, ask which role to use and add--role. The commands also useobjects.default_warehouse; if that role cannot use it, add--warehousewith one it can.
Facts (JSON only)
streamsnow sql-review probe <slug>: objects exist, direct grants, DDL drift, every section compiles with its columns. Keep therun_idit prints; add--run <run_id>from here on.streamsnow sql-review run <slug> --run <run_id>(--page NNfor one page): rows, totals, an order-insensitive hash and timing per section, computed in Snowflake.- Read these outputs, never result rows. Do not run sections yourself, and never call
snow sqldirectly: the commands guard every statement before it is sent. - Screen (skip with
--no-screen): preview in review mode, open every page at its default filters, stop the preview, thenstreamsnow sql-review compare <slug> --run <run_id>, per screen.md. Its mismatches go to the page reviewers, never straight to the log.
Judgment
- In parallel (Claude Code: one message, several Task calls): agent
streamsnow:sql-review-pageonce per page, andstreamsnow:sql-review-objectonce per object insql_review/app_specific_reporting_objects/. Without subagents, follow reviewers/page.md and reviewers/object.md yourself, one brief at a time. Each brief names its inputs, the one file it writes, and its result. - Optimizer (reviewers/optimizer.md) for each section
runmarkedslow(over 10 s), or for all with--optimize. Every rewrite it proposes is backed bystreamsnow sql-review bench <slug> --run <run_id> --metric NN#n --sql-file <candidate>withequivalent: true. It proposes diffs, never applies them, never suggests a bigger warehouse. - Verifier (reviewers/verifier.md), a fresh agent per page batch: it re-reads every cited result, tries to refute each finding, and keeps or drops it with a reason.
Log
- If a reviewer re-ran a page, run
compareagain (offline) so its rows are notstale. Merge the kept findings intofindings.jsonin the run directory, shaped per findings.md. Validate withstreamsnow sql-review log <slug> --run <run_id> --findings <file> --dry-run; a refusal names the finding and why. Fix the citation or drop the finding; never invent evidence. - Write it: the same command without
--dry-run. It writessql_review/review_log/YYYY-MM-DD_<shortsha>.mdand updates the README's latest review. streamsnow sql-review check <slug>, then commit the log andsql_review/README.mdalone:chore(sql-review): <slug> review <YYYY-MM-DD>. Fixes come later, in their own commits, after the user agrees to each.- Report: the log path, blocker / major / minor counts and the top findings. Tell the user the sign-off block (Reviewer, Date, Decision) is theirs to fill in. Never fill it in.
Rules
- No row-level data or small-group breakdowns in a finding, the log, or chat: pass or fail, row counts, top-level totals.
- A human applies DDL outside app data; propose it, deploy only when the user says to. App-data
objects (
governance.app_data) are applied by the deploy job (streamsnow objects-sql). - Data judgment follows tracing.md: never claim upstream is broken without cited evidence, and tell "missing" from "not visible to this role" apart.
- Exit codes:
1means a check failed (report it as a fact);2means nothing ran (fix the cause: a stale page file, the scaffold placeholder, a refused statement, no connection).
Done when
The log is committed with every finding cited and verified, every screen mismatch either cited or
dropped by the verifier (or --no-screen), check is clean, and the user knows the sign-off is
theirs. With --offline: check is clean or its gaps are reported.
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.

