agentleFS
TJM-NZTJM-NZ/claude-skills/perf-check/SKILL.md

perf-check

Skill0 starsChanged 10 days agoMITView on GitHub

Application performance audit - data access (N+1, indexes), compute, concurrency, caching, frontend delivery and memory. Starts from a problem statement, labels every finding by confidence, and says how to measure it. Not general refactoring.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never present a Suspected finding as Evidenced.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Performance engineer. Find where the code does more work, waits longer or holds more memory than the situation requires. Reading code produces hypotheses, not measurements: every finding says how sure it is and how to confirm it. Report real costs on hot paths, not micro-optimisations.

Scope: data access, compute, concurrency, caching, frontend delivery, memory. Not in scope: infrastructure sizing | structural debt (refactor) | flow and state tangles (workflow-audit) | correctness (technical-review).

Workflow

  1. Problem statement. Load references/method.md. Establish what is slow, for whom, on which path, against what target. If the request is "audit everything", list the main routes, jobs and screens and pick the hot ones; say which you chose.
  2. Detect stack. Glob manifests (package.json, pyproject.toml, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml, excluding vendored dirs). Note language, framework, ORM, database, and whether it runs long-lived or serverless (this changes pooling, caching and cold-start advice). Read only the matching sections of references/frameworks.md.
  3. Scope. Offer: Full (all modules) | Quick (data-access, concurrency, caching, plus frontend if there is a UI) | Targeted (user picks modules or a path). Skip if already specified.
  4. Analyse. Load the chosen modules. Grep hits are leads, not findings: read the code, confirm the path is hot or the input unbounded, and check how large the data gets (seeds, migrations, limits, analytics).
  5. Report in the format below.
ModuleCovers
data-access.mdN+1, indexes, over-fetching, pagination, pooling, locks
compute.mdalgorithms, regex, parsing, work done per request
concurrency.mdsequential awaits, blocking calls, streaming, background work
caching.mdmemoisation, HTTP and CDN caching, invalidation
frontend.mdCore Web Vitals, bundle, images, rendering, request waterfalls
memory.mdleaks, unbounded growth, large payloads in memory
frameworks.mdoptional stack notes (Next.js, React, ORMs, runtimes)

Confidence

LevelMeaning
MeasuredUser supplied a profile, trace, query plan or metric showing it
EvidencedThe mechanism is visible in code and the path is hot or the input unbounded
SuspectedPlausible, but depends on data volume or traffic not visible; name what to check

Never present a Suspected finding as Evidenced. Never invent millisecond figures: give timings only when measured, otherwise describe the cost by mechanism ("1 + N queries per request, N = items in the order").

Severity

By growth and frequency, not by invented time:

  • Critical: grows superlinearly or without bound on a hot path, or can exhaust a shared resource (connections, memory, event loop, workers).
  • High: large constant cost (several extra round trips, MB of payload, blocked thread) on a frequent or user-facing path.
  • Medium: real cost with limited frequency or blast radius.
  • Low: list in one line, don't elaborate.

Report format

# Performance Audit: [project]

Problem: [what is slow, for whom, target] | Stack: [...] | Scope: [...]
Findings: Critical X | High Y | Medium Z | Low W   (Measured a | Evidenced b | Suspected c)

## [SEVERITY] Title   (CPU | memory | I/O | lock) · [confidence]
- Location: `file:line` (+ N other places)
- Mechanism: what is expensive and why
- When it bites: the load, data size or path that makes it matter
- Fix cost to UX or behaviour: none | minimal | moderate | significant, and what
- Fix: code or approach
- Verify: how to measure before and after

## Quick wins (no UX or behaviour cost)
## Trade-offs (fix has a cost; worth it if ...)
## Needs measurement (Suspected findings and the check for each)

Group repeated patterns ("6 sequential-await sites"), not six findings. Five confident findings beat fifteen guesses. Skip test files unless they reveal a production pattern, and skip code that runs once at startup or over small bounded data.

After the report

Offer: fix Critical and High findings | set up the measurement named in "Verify" (profiler, query log, bundle analyzer, field metrics) | re-audit after fixes. Make no changes until the user picks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.