nebo-database-mastery — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited nebo-database-mastery (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.
Триггеры: "база данных", "SQL", "postgres", "redis", "индекс", "ETL", "запрос", "query optimization", "N+1" Атомов: 45
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) <your query>;Read bottom-up:
Seq Scan on big table → missing indexNested Loop with high rows → needs hash/merge joinshared read >> shared hit → poor cache, needs more shared_buffersANALYZE tablename;equality filter (WHERE status = 'x') → B-tree
equality + range (WHERE status = 'x' AND created_at > y)
→ Composite: (status, created_at DESC)
equality columns FIRST, range LAST
filtered subset (WHERE status = 'pending') → Partial index
need columns without table access → Covering: INCLUDE (col1, col2)
JSONB / array / full-text search → GIN
spatial / range types → GiST
production table (no downtime) → CREATE INDEX CONCURRENTLY-- Composite (equality first, range last)
CREATE INDEX idx_orders_status_date ON orders (status, created_at DESC);
-- Partial (dramatically smaller)
CREATE INDEX idx_orders_pending ON orders (created_at) WHERE status = 'pending';
-- Covering (index-only scan, no table lookup)
CREATE INDEX idx_users_email ON users (email) INCLUDE (name, avatar_url);
-- GIN for JSONB
CREATE INDEX idx_products_meta ON products USING GIN (metadata);
-- Full-text search
CREATE INDEX idx_docs_search ON documents USING GIN (to_tsvector('english', content));CREATE TABLE events (
id BIGINT GENERATED ALWAYS AS IDENTITY,
payload JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
) PARTITION BY RANGE (created_at);
CREATE TABLE events_2024_q1 PARTITION OF events
FOR VALUES FROM ('2024-01-01') TO ('2024-04-01');Partition key MUST appear in WHERE clauses, otherwise full scan across all partitions.
# BAD: N+1 (1 query + N queries)
for user in db.query(User).all():
print(user.orders) # separate query per user
# GOOD: eager load (1-2 queries total)
users = db.query(User).options(joinedload(User.orders)).all()async function getUser(id: string): Promise<User> {
const cached = await redis.get(`user:${id}`);
if (cached) return JSON.parse(cached);
const user = await db.user.findUnique({ where: { id } });
if (user) await redis.set(`user:${id}`, JSON.stringify(user), "EX", 3600);
return user;
}Always set TTL. Invalidate on write. Use pipeline for batch ops.
INSERT INTO fact_orders (order_id, amount, fiscal_quarter)
VALUES ($1, $2, $3)
ON CONFLICT (order_id) DO UPDATE SET
amount = EXCLUDED.amount,
fiscal_quarter = EXCLUDED.fiscal_quarter;Batch size: 1000-5000 rows per statement. Make runs idempotent.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.