Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

fix-slow-queries

Skill by paperclipai

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.

  • Score 94
  • 119k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install fix-slow-queries

Built from the published package, never by AI.

git clone --depth 1 https://github.com/paperclipai/paperclip /tmp/paperclip && mkdir -p ~/.claude/skills && cp -r /tmp/paperclip/.agents/skills/fix-slow-queries ~/.claude/skills/fix-slow-queries

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install fix-slow-queries in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The fix-slow-queries skill guides an AI assistant through diagnosing and fixing slow PostgreSQL queries in Paperclip. It starts from hosted workspace evidence, such as query statistics from Cloud and Neon, and ranks the top query families by cost. It then reproduces the baseline on a disposable local PostgreSQL database with synthetic data, and checks that the fix is faster and returns the same results.

The skill also requires regression tests, a pull request using the full template, and checks that pass on the final commit. It avoids migrations and boot-time DDL unless there is a serious reason, and flags slow migrations for human review. It is aimed at engineers working on Paperclip or the private paperclip-cloud control plane. It does not grant permission to comment, close, merge, deploy, or change a hosted database.

Written from the project's SKILL.md and checked against it.

What it can do

  • Find the actual databaseFollows the chain from Paperclip Cloud fleet admin to the Neon project, branch, endpoint, and database.
  • Rank query costRanks expensive individual calls and frequent work using query statistics and wait evidence.
  • Trace callersTraces the route or scheduler, service, generated SQL, and indexes for each candidate query.
  • Reproduce the baseline locallyBuilds a disposable real PostgreSQL fixture and captures EXPLAIN ANALYZE BUFFERS output.
  • Compare performance and resultsRuns baseline and fix under the same settings and compares every returned column and behavior.
  • Verify the blast radiusChooses regression tests from the caller graph and affected contracts.
  • Prepare and carry a PRCreates a pull request with full evidence and follows checks and reviews on each head SHA.
  • Hand off evidenceReports PR URLs, measured gains, correctness results, and limitations.

What you need

  • Access to Paperclip Cloud and the Neon project for query statistics
  • A local PostgreSQL instance for disposable benchmarks
  • A local checkout of the owning repository with its AGENTS.md
  • Access to create branches and pull requests

Try asking

  • Diagnose the costliest query families in this Paperclip workspace's Neon database
  • Reproduce the baseline for this slow query locally and time a fix
  • Prepare a PR with regression tests and before and after timings

Good to know

  • Migrations are avoided unless there is a serious reason, and slow ones need human review.
  • Production latency gains stay unverified until a rollout is authorized and measured.
  • The skill does not itself grant permission to comment, close, merge, deploy, or resize a hosted database.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/fix-slow-queries/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md11 KB
  • agents/openai.yaml128 B
  • references/cloud-discovery.md7 KB
  • references/local-proof.md11 KB

Alternatives to fix-slow-queries

All alternatives →

Compare with hugging-face-datasets, db-repair or alloydb-basics

fix-slow-queries: common questions

What must pass before a query fix is considered done?

The source requires a reproducible baseline, a faster treatment, output and behavior proof, relevant regression coverage, and green checks on each final PR head.

Does the skill add migrations or startup scripts?

It says a solution should not require a migration script unless there is a serious reason, and it forbids boot-time DDL or recurring backfills to bypass that rule. Any migration must be timed on a production-size clone.

Can the skill deploy changes or modify a hosted database?

No. The source states that the skill does not itself grant permission to comment, close, merge, deploy, resize, or mutate a hosted database.

How do I install fix-slow-queries?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is fix-slow-queries free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is fix-slow-queries safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. 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 fix-slow-queries?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

fix-slow-queries Install

Add to stack

Loading.