agentleFS
rpraharajrpraharaj/ai-engineer/skills/performance/SKILL.md

performance

Skill1 starsChanged 15 days agoMITView on GitHub

Investigate slowness with measure-first profiling, or guard a diff for regressions (N+1, unbounded work, heavy imports). Use when something is slow, latency or p99 is high, the user asks to profile or optimize, or ready-to-merge asks for a performance guard.

78 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use app-brief, design-from-app and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • StijnusSkill

    app-brief

    One-page brief (docs/BRIEF.md) for a new macOS app, written before any code. Use when the user has an app idea, wants to replace an app they pay for, or the research and clone skills are done.

    Also in 3 projects that use this

  • StijnusSkill

    design-from-app

    Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type, colors, icons), building its parts, and comparing pixel by pixel until they match. Use when the user names an app whose look they want, shares screenshots of one, or says "make it look like X".

    Also in 3 projects that use this

  • FlorianBruniauxSkill

    tdd-rust

    Also in 3 projects that use this

  • RodrigoTomeESSkill

    web-quality-audit

    Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to "audit my site", "review web quality", "run lighthouse audit", "check page quality", or "optimize my website".

    Also in 9 projects that use this

  • launchapp-devSkill

    layout-grid

    Define responsive layout grid systems with columns, gutters, margins, and breakpoint behavior.

    Also in 3 projects that use this

  • MohamedAbdallah-14Skill

    app-icon

    Generate an app icon from a single 1024² master and fan out to iOS (AppIcon.appiconset with squircle-ready 1024 opaque), Android (adaptive foreground + background + Android 13 monochrome), PWA (192/512 + 512 maskable with 80% safe zone), and visionOS (3-layer parallax).

    Also in 3 projects that use this

  • +1 more from Stijnus

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 52 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not rewrite code on a hunch.

    line 19
  2. Distinctive:

    Read AGENTS.md if present.

    line 21
  3. Very specific:

    Follow engineering-bar Shared procedures for scope and evidence, reusing the caller's recorded scope when provided.

    line 25
  4. Distinctive:

    If scope or evidence is incomplete, report unverified.

    line 36
  5. Distinctive:

    If the surface is a URL and a browser or tracing tool is available in this session, use it

    line 61
  6. Distinctive:

    If you cannot measure, say unverified and collect the cheapest signal (one timed request, one query plan).

    line 63
  7. Distinctive:

    Write: surface, metric, baseline value, how you measured.

    line 65
  8. Very specific:

    Add a regression pin when this repo has a place for it (benchmark, test assertion on query count, budget file).

    line 75
  9. Distinctive:

    Do not commit unless asked.

    line 88

“Common” is measured: kept by at least 6 in 10 of the 52 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

Two modes. Pick one and say which.

ModeWhen
InvestigateUser says it is slow, names a page/API/job/query, or asks to profile
Guardready-to-merge dispatched you, or the user asks whether this change will make things slower

Do not rewrite code on a hunch. Guess-caching is a fail (engineering-bar).

Read AGENTS.md if present.

Guard

Follow engineering-bar Shared procedures for scope and evidence, reusing the caller's recorded scope when provided.

Fail the guard if the diff introduces any of these without a matching bound, index, or existing repo pattern that already does the same thing safely:

  • Query, RPC, or file I/O inside a loop over an unbounded or request-sized list (N+1)
  • Missing pagination / limit on a newly exposed list
  • Full-table or full-collection scan (filter after fetch, SELECT * over a large set with no predicate the DB can use)
  • New heavy import or bundle on a hot route or first paint
  • Sync work on a request/UI path that this repo usually defers
  • UI layout jump from images/embeds/fonts with no reserved size

If scope or evidence is incomplete, report unverified. Otherwise, if none apply, pass and list what you checked. Do not suggest micro-optimizations (memoization, extra indexes, caches) unless the diff already created the problem.

Output:

## Performance guard: pass | fail | unverified
- Checked: …
- Fails: <file:line + why, or none>

Investigate

1. Name the surface

Page, API route, query, job, screen, or pipeline. If the user did not name one, pick the hottest path in the complaint and say so.

2. Measure first

Establish a baseline number with whatever this repo already has:

  • Existing benchmark or load test
  • Database EXPLAIN / query plan
  • Language profiler already in the repo
  • Server/access logs with durations
  • Metrics the service already emits
  • If the surface is a URL and a browser or tracing tool is available in this session, use it

If you cannot measure, say unverified and collect the cheapest signal (one timed request, one query plan). Do not optimize yet.

Write: surface, metric, baseline value, how you measured.

3. Classify

One primary class: network, parse/render, CPU, I/O, lock/contention, N+1, payload size, cold start, GC. Evidence or it is a guess — label guesses.

4. One change

Change one thing aimed at that class. Load engineering-bar (paths in that skill) so the fix stays small and correct.

Add a regression pin when this repo has a place for it (benchmark, test assertion on query count, budget file). Use write-tests for that pin.

5. Measure again

Same method as the baseline. Stop if the metric is inside the budget the user named, or inside this repo's documented budget. Otherwise report the next cheapest win — do not stack three optimizations.

Done (investigate)

  1. Surface + metric + before/after + method
  2. Bottleneck class
  3. What you changed (or why you changed nothing)
  4. Commands/output

Do not commit unless asked.

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.