.claude/skills/plain-optimize/SKILL.md
Captures and analyzes performance traces to identify slow queries and N+1 problems. Use when a page is slow, there are too many queries, or the user asks about performance.
npx skillsauth add dropseed/plain plain-optimizeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Make a request with tracing enabled — returns structured JSON with query counts, duplicates, issues, and span tree:
uv run plain observer request /path
uv run plain observer request /path --user 1
uv run plain observer request /path --method POST --data '{"key": "value"}'
The --user flag accepts a user ID or email.
The JSON output includes:
response.status — HTTP status codetrace.query_count / trace.duplicate_query_count — query summaryissues — pre-detected problems (duplicate queries, exceptions)queries — each unique query with count, total duration, and source locationsspans — nested span tree showing the request flowCheck the issues array first — duplicate queries are flagged automatically with source locations. Then review:
total_duration_ms)select_related() / prefetch_related() for N+1Re-run uv run plain observer request /path and compare query_count, duplicate_query_count, and trace.duration_ms.
documentation
Releases plainx packages with version suggestions, changelog generation, and git tagging. Use when releasing a package to PyPI.
data-ai
Releases Plain packages with intelligent version suggestions and parallel release notes generation. Use when releasing packages to PyPI.
data-ai
Upgrades Plain packages and applies required migration changes. Use when updating to newer package versions.
testing
Check overall database health — schema correctness and operational health. Use when asked to check the database, validate schema, optimize indexes, or diagnose Postgres problems.