CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

postgres-query

Run PostgreSQL queries for testing, debugging, and performance analysis. Use when you need to query the database directly, run EXPLAIN ANALYZE, compare query results, or test SQL optimizations. Always pass a target — `--prod` or `--dev` — because prod and dev are different databases and the default is prod. Always uses read-only connections unless explicitly directed otherwise.

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

71%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable — exact commands, flags, env vars, and a strong verification culture around targeting the right database — with clear safety workflows. It loses points on conciseness and progressive disclosure: changelog-style incident narratives, repeated permission warnings, and env-loading internals are inlined in a long single file instead of being tightened or split into a reference.

Suggestions

Move the incident history and correction notes (the 2026-08-16 wrong-database story and the DDL correction changelog) into a references/ file or a clearly marked history section, keeping SKILL.md focused on current behavior.

State the --writable permission requirement once (in Safety Features) and cross-reference it from the --writable and dev sections instead of repeating the full warning three times.

Add a verification checkpoint to the tunnel-dependent workflows, e.g. confirming the local forwarded port is listening before running the first --dev or --notifications query.

DimensionReasoningScore

Conciseness

Mostly efficient project-specific content, but padded in places: date-stamped incident narratives ("That cost an hour and produced a confidently wrong root cause on 2026-08-16", "verified 2026-08-17") are embedded in prose rather than a history/deprecated section, and the --writable permission warning ("you MUST ask the user for permission") is repeated across Safety Features, the --writable section, and the dev section. Not a 2 because nothing explains concepts Claude already knows — nearly every sentence is operational knowledge specific to this repo.

3 / 5

Actionability

Fully executable, copy-paste-ready commands covering the common cases: "node .claude/skills/postgres-query/query.mjs --prod --explain \"SELECT * FROM \"Model\" WHERE id = 1\"", plus --timeout, -f, --json, --notifications variants, the exact env var names (DEV_DATABASE_URL, NOTIFICATION_DB_REPLICA_URL) and where to set them. Matches the anchor-5 example of specific commands covering common cases.

5 / 5

Workflow Clarity

Clear per-target sequencing with explicit verification — "Read that line before you trust a result", the numbered Safety Features checklist, and error-recovery guidance ("A checkout with no skill .env exits 1 and names the file it would have read") — so the destructive-operation cap at 3 does not apply. Not a 5: the tunnel-dependent --dev/--notifications workflows lack a checkpoint confirming the tunnel is live before the first query, and the performance-comparison workflow ends at running both queries without a step for interpreting the timing difference.

4 / 5

Progressive Disclosure

A single ~230-line file with good headers, but deep detail is inlined that belongs in a reference file — the .env precedence mechanics ("loadEnv only fills in keys that are not already present (an empty value counts as present...)"), the wrong-database incident history, and the DDL correction changelog ("This section previously said the opposite..."). This matches anchor 3 ('content that should be separate is inline'); not a 2 because the document is well-sectioned and navigable rather than an unstructured dump. No references/ files exist in the bundle to verify; the only referenced path is the invoked query.mjs script.

3 / 5

Total

15

/

20

Passed

Description

87%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description clearly and explicitly states both what the skill does and when to use it, with concrete trigger phrases and a distinct PostgreSQL-querying niche. Its only deductions are the second-person "you" in the trigger clause (a rubric-specified specificity penalty) and a few missing colloquial synonyms; the trailing operational sentences about target flags add length without adding capability information.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — "Run PostgreSQL queries for testing, debugging, and performance analysis", "run EXPLAIN ANALYZE, compare query results, or test SQL optimizations" — which is anchor-5 coverage, but the trigger clause uses second person ("Use when you need to query the database directly"), which the rubric penalizes by reducing specificity by 1. Not a 3 because the action coverage far exceeds '1-2 concrete actions'.

4 / 5

Completeness

Explicitly answers both questions: what — "Run PostgreSQL queries for testing, debugging, and performance analysis"; when — "Use when you need to query the database directly, run EXPLAIN ANALYZE, compare query results, or test SQL optimizations". The when-clause is fully explicit with concrete triggers, matching the anchor-5 example structure, so 4 ("'when' could be more explicit") does not fit.

5 / 5

Trigger Term Quality

Good natural keyword coverage: "PostgreSQL queries", "query the database directly", "run EXPLAIN ANALYZE", "compare query results", "test SQL optimizations" — phrases a user would naturally say. Falls short of anchor 5 because common synonyms like "postgres", "db", or "slow query" are absent.

4 / 5

Distinctiveness Conflict Risk

A single clear niche — direct PostgreSQL querying for testing/debugging — with distinctive triggers ("EXPLAIN ANALYZE", "test SQL optimizations") that few other skills would claim. Not a 4, since that anchor describes overlap between related domains (e.g., PDF and Word), while this description is unambiguously single-domain.

5 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

civitai/civitai

Path

.claude/skills/postgres-query/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.