pg-explain
Use when a Postgres query is slow or EXPLAIN shows a sequential scan, an endpoint is slow because of SQL, or you are adding a query against a large table.
Skill by Srimukh99
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/srimukh99-pg-explain
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pg-explain
What's inside
- Skill name
pg-explain- Description
- Use when a Postgres query is slow or EXPLAIN shows a sequential scan, an endpoint is slow because of SQL, or you are adding a query against a large table. Reads the plan and fixes the cause with measured before and after timings.
- License
- MIT
- Instructions
- 29 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# pg-explain ## 1. Find the query Use `pg_stat_statements` ordered by `total_exec_time` to find the top offenders, or take the query from the slow log or trace. ## 2. Get the real plan `EXPLAIN (ANALYZE, BUFFERS) <query>;` on production-like data. `ANALYZE` executes the query, so wrap writes in `BEGIN; ... ROLLBACK;`. ## 3. Read it | You see | Likely cause | Try | | --- | --- | --- | | Estimated rows far from actual (10x+) | Stale or missing statistics | `ANALYZE <table>`; extended statistics for correlated columns | | Seq Scan on a big table with a selective filter | Missing or unusable index | Index on the filter columns; avoid functions on the column or add an expression index | | Nested Loop with a large outer side | Bad estimate or missing join index | Fix stats; index the join key | | Sort or Hash with `external merge` / disk | Not enough memory or no index for order | Index matching `ORDER BY`; raise `work_mem` for that query only | | High `shared read` buffers | Data not cached, too much scanned | Narrow the query; covering index (`INCLUDE`) | ## 4. Choose the index type B-tree for equality and ranges; GIN for JSONB, arrays and full-text; GiST for geometry and ranges; BRIN for huge append-only tables ordered by time. Partial indexes when queries always filter the same subset. ## 5. Prove it Change one thing, re-run `EXPLAIN ANALYZE`, and report before and after execution time (`ship`). New indexes on live tables go through `pg-migrate`. Check that you're not duplicating an existing index; each one slows writes.
From Srimukh99/rubric, MIT.
More from Srimukh99/rubric
- 0.570score
crd-check
Srimukh99
Use when writing or changing Kubernetes CustomResourceDefinitions, custom resources, operators or controllers, or before upgrading a cluster.
SkillAFreshness: AClaude Code +9 - 0.570score
drift
Srimukh99
Use when asked whether what is running matches what is in git, after a deploy, when a rollout seems stuck, or when someone changed infrastructure by hand.
SkillAFreshness: AClaude Code +9 - 0.569score
delegate
Srimukh99
Use when a plan has independent tasks, several unrelated failures to fix, or work big enough to split across subagents.
SkillAFreshness: AClaude Code +9 - 0.565score
mongo-index
Srimukh99
Use when a MongoDB query or aggregation is slow, when explain shows COLLSCAN or an in-memory sort, or when designing indexes for a collection.
SkillAFreshness: AClaude Code +9 - 0.565score
snow-perf
Srimukh99
Use when a Snowflake query is slow or expensive, a warehouse costs too much, or you are tuning tables, clustering or warehouse sizing.
SkillAFreshness: AClaude Code +9 - 0.565score
k8s-triage
Srimukh99
Use when a Kubernetes pod, deployment or service misbehaves, including CrashLoopBackOff, ImagePullBackOff, Pending pods, OOMKilled, failing probes, 502 or 503…
SkillAFreshness: AClaude Code +9 - 0.565score
reg-audit
Srimukh99
Use when building or changing a regulated system in finance, healthcare or government that must show who did what, when and why, or when the work involves…
SkillAFreshness: AClaude Code +9 - 0.565score
reg-money
Srimukh99
Use when code calculates, stores, moves or displays money, including prices, balances, payments, refunds, interest, fees, taxes, FX, ledgers or invoices.
SkillAFreshness: AClaude Code +9 - 0.565score
reg-pci
Srimukh99
Use when code handles payment cards such as card numbers, CVV, expiry dates, cardholder names, checkout forms or tokenization, or touches any system in PCI…
SkillAFreshness: AClaude Code +9 - 0.565score
reg-phi
Srimukh99
Use when code, data, logs, tests or prompts may touch health information such as patient records, claims, diagnoses, prescriptions, lab results or member IDs…
SkillAFreshness: AClaude Code +9 - 0.565score
boot
Srimukh99
Use when starting any coding session or task in a repo.
SkillAFreshness: AClaude Code +9 - 0.565score
build
Srimukh99
Use when writing or changing code - features, bug fixes, refactors - starting feature work in a fresh isolated worktree with a clean baseline, or executing an…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 4, 2026 (25 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Srimukh99/rubric
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Srimukh99
- 0.570score
drift
Srimukh99
Use when asked whether what is running matches what is in git, after a deploy, when a rollout seems stuck, or when someone changed infrastructure by hand.
SkillAFreshness: AClaude Code +9 - 0.570score
crd-check
Srimukh99
Use when writing or changing Kubernetes CustomResourceDefinitions, custom resources, operators or controllers, or before upgrading a cluster.
SkillAFreshness: AClaude Code +9 - 0.569score
delegate
Srimukh99
Use when a plan has independent tasks, several unrelated failures to fix, or work big enough to split across subagents.
SkillAFreshness: AClaude Code +9 - 0.565score
dbx-perf
Srimukh99
Use when a Databricks or Spark job is slow, fails with out-of-memory or executor loss, costs too much, or when tuning Delta tables.
SkillAFreshness: AClaude Code +9 - 0.565score
snow-perf
Srimukh99
Use when a Snowflake query is slow or expensive, a warehouse costs too much, or you are tuning tables, clustering or warehouse sizing.
SkillAFreshness: AClaude Code +9 - 0.565score
mongo-index
Srimukh99
Use when a MongoDB query or aggregation is slow, when explain shows COLLSCAN or an in-memory sort, or when designing indexes for a collection.
SkillAFreshness: AClaude Code +9
Cite this page
pg-explain skill. Agent Mart. https://agentmart.dev/skills/srimukh99-pg-explain (last updated 2026-10-24)