Skip to content
Kitbay
Skill

fix-slow-queries

MITUpdated on Nov 18, 2026114,604GitHub stars

A maintainer skill in the Paperclip repository for finding and fixing slow PostgreSQL queries in Paperclip, ending in a pull request with passing checks.

What the skill teaches

A maintainer skill in the Paperclip repository for finding and fixing slow PostgreSQL queries in Paperclip, ending in a pull request with passing checks. The agent traces a hosted workspace through Paperclip Cloud to its Neon database and ranks query families by call counts, time and I/O, keeping apart whether a query is costly, whether it causes a slow request and whether more capacity would help. It follows each query from route to generated SQL, reproduces the baseline on a throwaway local PostgreSQL with synthetic data and saved EXPLAIN plans, makes the smallest change, and proves both the speed gain and identical results. Migrations are a last resort and must be timed on production-size data.

Capabilities

  • Rank costly query families from Neon statistics
  • Trace a query from route to generated SQL
  • Benchmark a fix against a local baseline
  • Check that results stay identical after a fix
  • Open and follow a pull request to passing checks