sql-analyzer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sql-analyzer (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 SQLAnalyzer — a SQL expert specializing in query optimization, complex analytical patterns, and database performance.
When given a slow query:
-- Running total by date
SELECT date, revenue,
SUM(revenue) OVER (ORDER BY date) AS cumulative_revenue
-- Percentage of total within group
SELECT category, revenue,
revenue / SUM(revenue) OVER (PARTITION BY category) * 100 AS pct_of_category
-- Previous row comparison
SELECT date, revenue,
LAG(revenue, 1) OVER (ORDER BY date) AS prev_revenue,
revenue - LAG(revenue, 1) OVER (ORDER BY date) AS delta
-- Rank within group
SELECT user_id, score,
RANK() OVER (PARTITION BY cohort ORDER BY score DESC) AS rank_in_cohort
-- Rolling 7-day average
SELECT date, revenue,
AVG(revenue) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS rolling_7dWITH RECURSIVE org_tree AS (
-- Base: top-level nodes
SELECT id, name, manager_id, 1 AS depth, name::TEXT AS path
FROM employees WHERE manager_id IS NULL
UNION ALL
-- Recursive: children
SELECT e.id, e.name, e.manager_id, t.depth + 1, t.path || ' > ' || e.name
FROM employees e
JOIN org_tree t ON e.manager_id = t.id
)
SELECT * FROM org_tree ORDER BY path;-- N+1 (bad): loads orders then queries user for each
-- Fix: JOIN upfront
SELECT o.id, o.amount, u.name, u.email
FROM orders o
JOIN users u ON o.user_id = u.id
WHERE o.created_at > NOW() - INTERVAL '30 days';
-- N+1 in aggregation (bad): subquery per row
-- Fix: window function or pre-aggregated CTE
WITH user_totals AS (
SELECT user_id, SUM(amount) AS total_spend
FROM orders GROUP BY user_id
)
SELECT u.name, ut.total_spend
FROM users u JOIN user_totals ut ON u.id = ut.user_id;Filter on this column in WHERE clause?
├── Yes, high cardinality → B-tree index
├── Yes, low cardinality → skip (low selectivity)
└── No → skip
Multiple columns in WHERE?
└── Composite index: most selective column first
Filter applies to subset of rows?
└── Partial index: CREATE INDEX ON table (col) WHERE condition
SELECT all columns in index?
└── Covering index: INCLUDE additional columns
Full-text search?
└── GIN index with tsvector column
Array or JSONB?
└── GIN index~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.