diegopacheco/agent-skills/presto-performance-agent
Claude Code and agent skill by diegopacheco/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
🏎️ Presto Performance night agent. Hunts slow implementations - missing database indexes, N+1 queries, database access in loops, missing pagination, quadratic algorithms, wrong data structures, missing caching, blocking IO, oversized images and assets - then measures, fixes, measures again, runs the tests, and leaves the fixes on their own branch with a report. Use when the user runs /presto-performance-agent, /night-agents presto, or asks to find or fix performance problems.
Install
npx vskill@latest install diegopacheco/agent-skills/presto-performance-agentSKILL.md
The same SKILL.md was published earlier as diegopacheco/agent-skills/presto-performance-agent.
🏎️ Presto Performance
Find code that is slow for a reason you can name, measure it, fix it, measure it again.
Follow ~/.night-agents/CONTRACT.md. Agent name: presto-performance-agent.
1. Start
Start the run with night-run.sh start presto-performance-agent unless the dispatcher handed you a run, install dependencies and record the baseline (contract steps 1 and 2).
2. Hunt
Read the hot paths first: request handlers, jobs, loops over collections, repository and DAO code, SQL, ORM mappings, render functions, build config, static assets. Look for:
| Problem | Signal | |
|---|---|---|
| Missing index | WHERE, JOIN, ORDER BY or foreign key columns without an index in the schema or migrations. Confirm with EXPLAIN / EXPLAIN QUERY PLAN when a database can run locally | |
| N+1 queries | a query, ORM lazy load or HTTP call inside a loop over rows | |
| Missing pagination | list endpoints or queries that return every row, findAll(), SELECT * without LIMIT | |
| Poor algorithm | nested loops over the same collection, includes/indexOf/contains inside a loop, repeated sorting, string building in a loop, recursion without memoization | |
| Wrong data structure | lists used for lookups that need a map or a set, arrays shifted as queues | |
| Missing caching | the same pure computation or the same remote read repeated per request with stable inputs | |
| Blocking IO | synchronous file, network or crypto calls on a request path, sequential awaits that are independent | |
| Over fetching | selecting all columns or whole object graphs to use one field | |
| Heavy assets | images over 200 KB, PNG photos, missing width/height, no lazy loading, unminified bundles | |
| Memory | unbounded caches, listeners never removed, whole files read when a stream would do |
Rank the findings by impact on a real path. Skip micro optimizations nobody would notice.
3. Measure, fix, measure
For every finding you fix:
- Write a benchmark that runs the real code path with realistic data sizes (at least 1k rows or
items, more when the path is meant for more). Prefer the project's own benchmark tooling; otherwise a small script under $RUN_DIR/bench/ or a test that times the call. Run it at least 5 times and take the median.
- Save the numbers to
$RUN_DIR/bench/<finding-id>.txt. - Fix it with the smallest change that removes the cause: an index migration, a batched or joined
query, a LIMIT/OFFSET or cursor with a sane default page size and a maximum, a map or a set, a memo or bounded cache with an invalidation rule, a resized and compressed image.
- Run the benchmark again. Keep the fix only when the median improves by at least 10% and the tests
still pass. Otherwise revert it and record it as reported.
- Add or keep a test that guards the behavior the fix must not change, such as page size limits,
ordering, or the same result set.
- One commit per fix:
<project>: presto-performance-agent: batch order item queries.
API changes such as pagination on an existing endpoint must stay backward compatible: default values that return what callers got before for small data, and the change recorded in the report.
4. Verify, document, finish
Contract steps 4 to 7. The report has one section per finding with the cause, the fix, the benchmark command and the before and after medians. Put the numbers in each finding's before and after fields, such as "before": "412ms", "after": "38ms".
Metrics
improvements, reportedOnly, avgSpeedupPct, maxSpeedupPct, indexesAdded, queriesRemoved, bytesSaved. Finding kinds: missing-index, n-plus-one, missing-pagination, poor-algorithm, data-structure, missing-cache, blocking-io, over-fetching, heavy-asset, memory.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingnight-agents/skills/presto-performance-agent/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/diegopacheco/agent-skills/presto-performance-agent)