Troubleshoot a production-only performance issue
A developer used Cursor and Warp agents to analyze NestJS database queries and recommend indexes for a production performance problem. ·
Done withCursor
- What they did
- A page was slow in production but not in the dev environment. The developer asked a Cursor/Warp agent to list possible causes and the steps to fix them. The agent read the codebase, worked out which database queries NestJS was making, and said which database indexes should be used.
- How it went
- After the developer added the recommended indexes, page load performance improved significantly. The source gives no timings or figures.
- Worth knowing
- The agent worked from the codebase and produced a list of candidate causes, so the developer still had to apply the indexes and check the result in production.
Try it yourself with Cursor
Our [framework, e.g. NestJS] app is slow in production but not locally, specifically [endpoint or page]. Read the code and database queries involved, identify the slowest or most repeated ones, and recommend indexes or query changes with an explanation of why. You're done when you have a ranked list of fixes with the exact migration or code change for each. Don't run anything against the production database; show me the changes first.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: trevorarnold.substack.com · Dec 1, 2025
Related use cases
Keep coding agents running autonomously for long stretches
Cursor's write-up on scaling long-running autonomous coding.
Run Terraform plan and apply through an MCP agent
The author had Cursor run Terraform against Postgres via MCP; the apply hit a permissions error and he finished from the terminal.
Turn Sentry bug reports into fix pull requests
Sentry's Seer passes root cause analysis and issue context to a Cursor Cloud Agent, which writes the fix and opens a pull request in the user's repo.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Route Linear tickets to PRs across multiple repos
A developer sends tasks via Telegram/OpenClaw into Linear, where Cyrus routes each to the right repo and model and opens PRs for review.
Run a Claude Code refactor unattended
A Claude Code agent ran 40 minutes unattended on a refactor; it worked and tests passed, but the user couldn't tell what it did in between.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.