sql-review
/sql-review
Sprawdza pliki SQL pod kątem kosztów w hurtowni, pułapek poprawności i niebezpiecznych poleceń przed uruchomieniem.
- Autor
- sumankrsh ↗
- Repozytorium
- enterprise-data-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 02.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 2
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 02.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/sql_review.py
Co robi i kiedy
Sprawdza pliki SQL pod kątem kosztów w hurtowni, pułapek poprawności i niebezpiecznych poleceń przed uruchomieniem.
Oryginalny opis (EN)
Reviews SQL files for warehouse cost risks (SELECT *, missing partition filters, full scans), correctness traps (= NULL, NOT IN with subqueries, joins without conditions) and unsafe statements (DELETE without WHERE, DROP, hard-coded passwords). Use when someone asks you to review, check or approve SQL, or before running SQL you wrote against a large table.
Jak działa
- Reading the result
- Limits
Podgląd SKILL.md
--- name: sql-review description: Reviews SQL files for warehouse cost risks (SELECT *, missing partition filters, full scans), correctness traps (= NULL, NOT IN with subqueries, joins without conditions) and unsafe statements (DELETE without WHERE, DROP, hard-coded passwords). Use when someone asks you to review, check or approve SQL, or before running SQL you wrote against a large table. license: MIT compatibility: Needs Python 3.11+ with the enterprise-data-skills package installed. Runs offline; never connects to a database. metadata: version: "0.1.0" author: Suman Mukherjee --- # SQL review Run the reviewer on one or more `.sql` files. It reads the files only. It never runs the SQL. ```bash python scripts/sql_review.py path/to/query.sql --format json ``` If you know which tables are large and how they are partitioned, say so. Reads of those tables that don't filter on the partition column are reported as high severity: ```bash python scripts/sql_review.py query.sql -t events=event_date -t orders=order_date --format json ``` ## Reading the result JSON output is a list with one report per file. Each finding has `rule`, `severity` (high, medium, low), `category` (cost, correctness, safety), `line`, `detail` and `fix`. - Report **high** findings first and treat them as blockers: they either change results silently, scan far more data than needed, or destroy data. - Quote the line number and the suggested fix for each finding. Don't rewrite the whole query unless asked. - If a finding is a deliberate choice, the author can silence it on that line with a comment: `-- data-skills: ignore SQL001`. | Rule | Severity | What it catches | |---|---|---| | SQL001 | medium | `SELECT *` or `t.*` | | SQL002 | high | `UPDATE` or `DELETE` without `WHERE` | | SQL003 | high | `DROP TABLE/SCHEMA/VIEW`, `TRUNCATE` | | SQL004 | low | A table read with no `WHERE`, `LIMIT` or sample (queries with `GROUP BY` are not flagged) | | SQL005 | high | A large table read without its partition filter (needs `-t`) | | SQL006 | medium | Comma joins in `FROM` | | SQL007 | high | `JOIN` without `ON` or `USING` | | SQL008 | high | `= NULL` or `<> NULL` | | SQL009 | medium | `NOT IN (SELECT ...)` | | SQL010 | low | `LIKE '%...'` | | SQL011 | low | A function around a filtered column, e.g. `WHERE YEAR(d) = 2026` | | SQL012 | low | `UNION` without `ALL` | | SQL013 | low | `ORDER BY` in a subquery or CTE without a limit | | SQL014 | low | `SELECT DISTINCT` over a join | | SQL015 | high | A password or secret written as a string literal | ## Limits The reviewer uses keywords, not a full parser for each dialect. It can miss problems in dynamic SQL, stored procedures and heavily templated code (Jinja is not rendered). Say so when you rely on it for a sign-off.
Pliki w paczce (2)
- SKILL.md 3 KB
- scripts/sql_review.py 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · sumankrsh/enterprise-data-skills | 100 | MIT |
| claude-dev-suite/claude-dev-suite | 95 | MIT |
| fengyale/harness-bootstrap | 91 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 07c1eb39b179 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100sql-integrity-check
Sprawdza zapytania SQL i zmiany modelu danych pod kątem poprawności, zakresu dostępu, parametryzacji i wydajności. - 100sql-quality-check
Sprawdza pliki SQL pod kątem problemów wydajności MySQL i raportuje je jak w CI, bez zmieniania kodu. - 100validate
Sprawdza zapytania SQL pod kątem błędów i zgodności ze schematem, zgłaszając diagnostykę dla każdego pliku. - 100query-writing
Pisze i wykonuje zapytania SQL od prostych SELECT po złączenia wielu tabel, agregacje i podzapytania, do pobierania danych, filtrowania rekordów i raportów. - 100bigquery-data-warehouse-queries
Pisze zapytania SQL do hurtowni BigQuery w skali petabajtów, z optymalizacją partycji i klastrów. - 100sql-fundamentals
Podaje podstawy SQL według standardu ANSI: DML, DDL, joiny, transakcje i podstawowe pojęcia baz danych, jako fundament pracy z bazami SQL.