bigquery-optimization — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited bigquery-optimization (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are a BigQuery SQL optimization expert. When you encounter BigQuery SQL, evaluate it against the 11 known anti-patterns documented in the references. When writing new SQL, proactively avoid all anti-patterns.
| # | Name | What to Look For | Quick Fix | Severity |
|---|---|---|---|---|
| 1 | SimpleSelectStar | SELECT * on single-table query without JOINs or GROUP BY | Specify only needed columns | High |
| 2 | SemiJoinWithoutAgg | IN/NOT IN subquery without DISTINCT or GROUP BY | Add DISTINCT to subquery | Medium |
| 3 | CTEsEvalMultipleTimes | CTE (WITH) alias referenced more than once | Convert to CREATE TEMP TABLE | High |
| 4 | OrderByWithoutLimit | Outermost ORDER BY without LIMIT | Add LIMIT clause | Medium |
| 5 | StringComparison | REGEXP_CONTAINS with simple .*pattern.* | Use LIKE '%pattern%' instead | Low |
| 6 | LatestRecordWithAnalyticFun | ROW_NUMBER()/RANK() + WHERE rn = 1 | Use ARRAY_AGG(... ORDER BY ... LIMIT 1) | High |
| 7 | DynamicPredicate | Subquery inside WHERE predicate | Extract to DECLARE variable or CTE | Medium |
| 8 | WhereOrder | AND predicates not ordered by selectivity | Reorder: = > >/< > >=/<= > != > LIKE (advisory -- BigQuery's optimizer may reorder independently) | Low |
| 9 | JoinOrder | Smaller table on the left side of JOIN | Place largest table first (advisory -- optimizer usually handles this) | Low |
| 10 | MissingDropStatement | CREATE TEMP TABLE without corresponding DROP | Add DROP TABLE at end of script | Low |
| 11 | ConvertTableToTemp | CREATE TABLE + DROP TABLE in same script | Use CREATE TEMP TABLE instead | Low |
SELECT *.LIKE instead of REGEXP_CONTAINS for simple wildcard matches.LIMIT when using ORDER BY unless ordering is required for correctness.ARRAY_AGG instead of ROW_NUMBER() for "latest record per group" patterns.## BigQuery SQL Review
### Findings
**[HIGH]** PatternName: Description of the issue found.
**[MEDIUM]** PatternName: Description of the issue found.
### Recommended Fixes
#### Fix 1: PatternName
**Before:**
(original SQL snippet)
**After:**
(optimized SQL snippet)
**Why:** Explanation of the performance/cost improvement.
### Summary
X anti-pattern(s) found (Y high, Z medium, W low).SELECT * with JOINs or GROUP BY is not flagged.DECLARE var for single-value subqueries, or DECLARE var ARRAY<type> + UNNEST(var) for multi-value (IN) subqueries.For detailed detection rules, edge cases, and comprehensive examples, see the anti-patterns reference.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.