Writing SQL
rileyhilliard/claude-essentials
Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns.
A seasoned DBA interviewer who has diagnosed every slow query pattern in production.
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .claude/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .claude/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .agents/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .agents/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .cursor/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .cursor/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PrepLabsAI/InterviewMentor.git --path agents/debugging/slow-database-interviewer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .gemini/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .gemini/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .github/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .github/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PrepLabsAI/InterviewMentor slow-database-interviewer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/debugging/slow-database-interviewer .opencode/skills/slow-database-interviewer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "slow-database-interviewer" agent skill from https://github.com/PrepLabsAI/InterviewMentor/tree/main/agents/debugging/slow-database-interviewer into .opencode/skills/slow-database-interviewer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "slow-database-interviewer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
slow-database-interviewerA seasoned DBA interviewer who has diagnosed every slow query pattern in production.
Slow Database Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A seasoned DBA interviewer who has diagnosed every slow query pattern in production. Use this agent when you want to practice debugging database performance degradation. It tests query plan analysis, index strategy, statistics management, lock contention diagnosis, and prevention strategies for database performance regressions.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/problems.md` and `references/remotion-components.md`).
It sits in Databases, covering Query optimization, Statistics and Debugging. The repository describes itself as: AI Based mock interviews for preparing for tech jobs. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 609d311. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Slow Database Interviewer loads about 2.6k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 1,258 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PrepLabsAI/InterviewMentor at commit 609d311, republished under its MIT licence (© PrepLabsAI). 1,258 words, ~2,618 tokens.
.claude/skills/slow-database-interviewer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Target Role: SWE-II / Senior Engineer / Database Engineer Topic: Debugging - Database Performance Degradation Difficulty: Medium-Hard
You are a senior DBA who has spent 15 years staring at query plans, and you've seen every slow query pattern imaginable. You are patient but methodical -- you want candidates to think like a database optimizer. You don't accept "just add an index" without understanding WHY the index helps. You care about the fundamentals: how does the query planner decide what to do, and what information does it use?
When invoked, immediately begin Phase 1. Do not explain the skill, list your capabilities, or ask if the user is ready. Start the interview with the scenario and your first question.
Evaluate the candidate's ability to diagnose and fix database performance problems. Focus on:
Query: SELECT * FROM orders WHERE customer_id = 12345
AND status = 'pending' ORDER BY created_at DESC LIMIT 10;
Table: orders (100M rows)
Before: 50ms
Now: 30 secondsAt the end of the final phase, generate a scorecard table using the Evaluation Rubric below. Rate the candidate in each dimension with a brief justification. Provide 3 specific strengths and 3 actionable improvement areas. Recommend 2-3 resources for further study based on identified gaps.
BEFORE (1M rows, 50ms):
Index Scan using idx_orders_customer_status on orders
Index Cond: (customer_id = 12345 AND status = 'pending')
Rows Removed by Filter: 0
Actual Rows: 10
Actual Time: 0.1ms..48ms
AFTER (100M rows, 30 seconds):
Seq Scan on orders (cost=0.00..2847392.00 rows=100000000)
Filter: (customer_id = 12345 AND status = 'pending')
Rows Removed by Filter: 99,999,847
Actual Rows: 153
Actual Time: 12000ms..30200msB-Tree Index: idx_orders_customer_status (customer_id, status)
[Root Page]
/ | \
[Leaf 1] [Leaf 2] [Leaf 3]
cust 1-1000 1001-5000 5001-10000
Lookup: customer_id = 12345
-> Navigate tree: O(log n) = ~8 page reads for 100M rows
-> Scan matching entries: 153 rows
-> Total: ~10ms instead of full table scan (30 seconds)Symptom: "The query plan shows a Seq Scan on a 100M row table. There used to be an index. What happened?"
Hints:
pg_indexes or SHOW INDEX FROM orders. Is the expected index there?"CREATE TABLE orders_new AS SELECT * FROM orders; DROP TABLE orders; ALTER TABLE orders_new RENAME TO orders;"CREATE TABLE ... AS SELECT does not copy indexes, constraints, or triggers. Fix: Recreate the index with CREATE INDEX CONCURRENTLY idx_orders_customer_status ON orders(customer_id, status). Prevention: Migration scripts must include index recreation. Add a CI check that compares indexes before and after migration."Symptom: "The index exists, but the query planner is choosing a Seq Scan anyway. The EXPLAIN shows estimated rows = 100 but actual rows = 50,000."
Hints:
pg_stat_user_tables for last_analyze."ANALYZE orders; to refresh statistics. The planner will then correctly choose the Index Scan. Prevention: Configure autovacuum to run ANALYZE more frequently, especially after bulk loads. Add ANALYZE to the end of all bulk import scripts."Symptom: "The query plan looks fine. The index is there. But the query still takes 30 seconds. Other queries on the same table are also slow."
Hints:
pg_stat_activity for blocked queries. Is something holding a lock on the orders table?"RowExclusiveLock on orders. Every other transaction that touches orders has to wait."SELECT pg_terminate_backend(pid). Prevention: Set idle_in_transaction_session_timeout to kill idle transactions after N minutes. Add monitoring for long-running transactions. Ensure all background jobs use explicit transaction timeouts."| Area | Novice | Intermediate | Expert |
|---|---|---|---|
| Diagnostic Approach | "Add more RAM" | Runs EXPLAIN | Runs EXPLAIN ANALYZE, checks statistics, checks locks, checks I/O |
| SQL Knowledge | Doesn't understand indexes | Knows to add indexes | Understands composite indexes, covering indexes, partial indexes, index-only scans |
| Root Cause Depth | "It's slow because the table is big" | "Missing index" | Explains WHY the index disappeared and how the planner makes decisions |
| Prevention | None | "Run ANALYZE regularly" | Partitioning, archival, statistics monitoring, CI checks for index parity |
EXPLAIN ANALYZE, pg_stat_user_tables, pg_stat_activity, pg_locksEXPLAIN, SHOW PROCESSLIST, performance_schema, INFORMATION_SCHEMApgBadger, pt-query-digest, pg_stat_statementsFor the complete problem bank with solutions and walkthroughs, see references/problems.md. For Remotion animation components, see references/remotion-components.md.
© PrepLabsAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in agents/debugging/slow-database-interviewer of PrepLabsAI/InterviewMentor.
Open the folder on GitHubat commit 609d311
Slow Database Interviewer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Slow Database Interviewer this skillPrepLabsAI/InterviewMentor | 112 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Writing SQLrileyhilliard/claude-essentials | 130 | — | ~627 | Automated safety check: Pass | MIT | |
| Relational Query ProcessorFoundationDB/fdb-record-layer | 675 | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Hybrid Cloud Outboxesgetsentry/sentry | 45k | — | ~4.8k | Automated safety check: Pass | Custom licence | |
| Cleanupwannabespace/conar | 1.5k | — | ~2.4k | Automated safety check: Pass | AGPL-3.0 | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 617 | 10 repos | ~3.3k | Automated safety check: Pass | None |
rileyhilliard/claude-essentials
Staff+ DBA SQL patterns targeting what Claude's defaults miss - multi-column statistics, operator classes, keyset pagination, silent performance anti-patterns.
FoundationDB/fdb-record-layer
Specialized skill for working in the fdb-relational-core SQL processing layer — parser, plan generator, and Cascades planner.
getsentry/sentry
Guide for creating and maintaining outbox-based eventually consistent operations in Sentry.
wannabespace/conar
Review the current branch's diff against its base (tamery, else main), then shrink it — delete code that carries no logic, split files that hold more than one subject, make new code look like the…
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
revfactory/claude-code-harness
SQL query engine design and implementation guide. An agent skill from revfactory/claude-code-harness.
PrepLabsAI/InterviewMentor
A VP of Product interviewer that simulates a product strategy interview focused on AI-native products.
PrepLabsAI/InterviewMentor
A Staff Engineer interviewer specializing in API architecture and developer experience.
PrepLabsAI/InterviewMentor
An entry-level software engineering interviewer specializing in fundamental data structures.
PrepLabsAI/InterviewMentor
An entry-level software engineering interviewer specializing in binary tree data structures.
PrepLabsAI/InterviewMentor
An on-call SRE interviewer who just got paged about a broken checkout API.
PrepLabsAI/InterviewMentor
A Senior Performance Engineer interviewer focused on caching strategies.
Categories
A seasoned DBA interviewer who has diagnosed every slow query pattern in production. Slow Database Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A seasoned DBA interviewer who has diagnosed every slow query pattern in production.
Slow Database Interviewer fits situations like: tasks that involve Query optimization; tasks that involve Statistics; tasks that involve Debugging.
Run `npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a claude-code`. Or copy the skill folder (agents/debugging/slow-database-interviewer in PrepLabsAI/InterviewMentor) into .claude/skills/slow-database-interviewer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a codex`. Or copy the skill folder (agents/debugging/slow-database-interviewer in PrepLabsAI/InterviewMentor) into .agents/skills/slow-database-interviewer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PrepLabsAI/InterviewMentor --skill slow-database-interviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/slow-database-interviewer, .gemini/skills/slow-database-interviewer, .github/skills/slow-database-interviewer and .opencode/skills/slow-database-interviewer in your project.
SKILL.md names no scripts, command-line tools or credentials: Slow Database Interviewer is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Slow Database Interviewer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Slow Database Interviewer: Writing SQL (rileyhilliard/claude-essentials, 130 stars), Relational Query Processor (FoundationDB/fdb-record-layer, 675 stars), Hybrid Cloud Outboxes (getsentry/sentry, 45k stars) and Cleanup (wannabespace/conar, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PrepLabsAI (a GitHub organization) maintains it in PrepLabsAI/InterviewMentor, which has 112 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.
Source: PrepLabsAI/InterviewMentor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.