silk-debug
Skill by letsrevel
Analyzes Django Silk profiling data to find slow requests, detect N+1 queries, and spot database performance problems. It is aimed at developers debugging Django endpoints.
Install silk-debug
Built from the published package, never by AI.
git clone --depth 1 https://github.com/letsrevel/revel-backend /tmp/revel-backend && mkdir -p ~/.claude/skills && cp -r /tmp/revel-backend/.claude/skills/silk-debug ~/.claude/skills/silk-debugRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/letsrevel/revel-backend /tmp/revel-backend && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/revel-backend/.claude/skills/silk-debug ~/.gemini/antigravity-cli/skills/silk-debugAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
silk-debug is an agent skill that runs a Python CLI script, scripts/silk_debug.py, against Django Silk profiling data. Given a Silk request ID, it produces a full analysis covering request info, duplicate or similar queries, slow queries, queries grouped by table, a query execution timeline, and Python cProfile data when that is enabled. It can also list and filter recent requests by path, method, status, query count, or response time, and show aggregate statistics and per-endpoint summaries with P95 values.
The skill explains how to read the output. Repeated similar queries are flagged as likely N+1 problems, with fixes such as select_related() and prefetch_related(). It also covers common slow-query causes, including COUNT over complex DISTINCT subqueries, missing indexes, and complex joins. The skill is intended for developers who need to analyze request IDs, investigate slow endpoints, or optimize query performance in a Django project.
Written from the project's SKILL.md and checked against it.
What it can do
- Analyze a requestRuns a full analysis of a single Silk request ID, including duplicates, slow queries and timeline.
- Detect N+1 queriesFinds duplicate or similar queries and suggests select_related or prefetch_related fixes.
- Find slow queriesLists queries above a configurable threshold, 5 ms by default.
- Group queries by tableShows queries grouped by database table for a single request.
- Show execution timelineDisplays query execution order with timing bars to reveal gaps and sequential queries.
- List and filter requestsLists recent requests and filters them by path, method, status, query count or time.
- Aggregate statisticsShows overall Silk statistics and endpoint summaries with P95 values.
- Find slow endpointsGroups slow requests by endpoint against a configurable threshold, 200 ms by default.
- Show cProfile dataDisplays Python cProfile data for a request when profiling is enabled.
What you need
- Python
- A .venv virtual environment with the script run from .venv/bin/python
- Django Silk profiling data
Try asking
- Analyze Silk request abc123 and find any N+1 queries
- Show the slowest endpoints in Silk with a 150 ms threshold
- List recent POST requests with more than 20 queries
Good to know
- Python cProfile data is only shown if profiling was enabled.
- Default thresholds are 5 ms for slow queries and 200 ms for slow endpoints.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/silk-debug/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Bash(python:*)Bash(.venv/bin/python:*)ReadGrep
-
SKILL.md5 KB
Alternatives to silk-debug
All alternatives →Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.
Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.
Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.
Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.
Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.
Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.
Compare with hugging-face-datasets, db-repair or alloydb-basics
silk-debug: common questions
How does silk-debug detect N+1 queries?
It flags repeated similar queries in a request, such as many identical SELECTs with different IDs. The skill then suggests select_related() for ForeignKey fields or prefetch_related() for reverse and M2M relations.
Which Silk data does silk-debug analyze?
It analyzes Django Silk profiling data, using request IDs and aggregate views such as stats, endpoints and slow endpoints. The source does not describe other data sources.
Can silk-debug show Python profiling as well as SQL?
Yes, the --profile option shows Python cProfile data. The source notes that this data appears only if cProfile is enabled.
How do I install silk-debug?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is silk-debug free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is silk-debug safe to use?
It scores 76 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to silk-debug?
Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.
