diegopacheco/agent-skills/presto-performance-agent

Claude Code and agent skill by diegopacheco/agent-skills

Trust tier 3
  • community
Source check pending

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-agent

SKILL.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:

ProblemSignal
Missing indexWHERE, 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 queriesa query, ORM lazy load or HTTP call inside a loop over rows
Missing paginationlist endpoints or queries that return every row, findAll(), SELECT * without LIMIT
Poor algorithmnested loops over the same collection, includes/indexOf/contains inside a loop, repeated sorting, string building in a loop, recursion without memoization
Wrong data structurelists used for lookups that need a map or a set, arrays shifted as queues
Missing cachingthe same pure computation or the same remote read repeated per request with stable inputs
Blocking IOsynchronous file, network or crypto calls on a request path, sequential awaits that are independent
Over fetchingselecting all columns or whole object graphs to use one field
Heavy assetsimages over 200 KB, PNG photos, missing width/height, no lazy loading, unminified bundles
Memoryunbounded 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:

  1. 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.

  1. Save the numbers to $RUN_DIR/bench/<finding-id>.txt.
  2. 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.

  1. 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.

  1. 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.

  1. 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/diegopacheco/agent-skills/presto-performance-agent/badge)](https://verified-skill.com/skills/diegopacheco/agent-skills/presto-performance-agent)

Something wrong with this skill or its page? Tell us.