agentleFS
mehrad-dmmehrad-dm/mastermind/skills/performance/SKILL.md

performance

Skill23 starsChanged 3 months agoMITView on GitHub

Use when something is slow, "why is this slow", "optimize this", "make it faster", jank, lag, a slow query, slow page load, slow render, slow build, high memory, a timeout. Not for correctness bugs; that's debug.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use web-quality-audit, core-web-vitals 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.
  • 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 5 projects that use this

  • thisisAhsanIqbalSkill

    core-web-vitals

    Audits HTML patterns that affect Core Web Vitals (LCP, CLS, INP). Checks for layout shift causes, largest contentful paint blockers, and interaction responsiveness issues. Use when optimising page performance or fixing Google PageSpeed Insights warnings.

    Also in 6 projects that use this

  • kpbraySkill

    best-practices

    Applies Power BI best practices, BPA rules, and enterprise standards. Use for quality validation, naming conventions, and performance optimization.

    Also in 5 projects that use this

  • ElasticSkill

    accessibility

    Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.

    Also in 13 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 7 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 10 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Find the bottleneck: profile it: Use the right instrument (browser Performance panel / React Profiler, a flame graph, DB query plan, a …

    line 16
  2. Distinctive:

    Prefer *doing less work* (cache, batch, index, memoize, defer, paginate) over doing the same work faster.

    line 25
  3. Very specific:

    Run levelup (capture) to record the bottleneck class and its lesson in the active field's lessons.md: including the *wrong* suspect you …

    line 31
  4. Distinctive:

    Correctness is not on the table: Never trade a correct result for speed.

    line 38

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

Perf: measure, find the real bottleneck, fix the biggest, verify

Slowness has a real, measurable cause. The cardinal sin is optimizing by intuition. You'll spend effort on the wrong thing and maybe trade away correctness for nothing. Get data first.

The loop

  1. Reproduce + measure. Get a real number under a realistic scenario: wall-clock, FPS/frame time, query ms (EXPLAIN ANALYZE), request latency, bundle size, memory. No number, no optimizing. Write it down; it's your before.
  2. Find the bottleneck: profile it. Use the right instrument (browser Performance panel / React Profiler, a flame graph, DB query plan, a tracer) and find where the time actually goes, the ~20% causing ~80%. The universal classes of waste: repeated work (recomputed per item/render instead of once), amplified work (one request fanning out into N), missing lookup structure (a scan where an index/map belongs), serial waiting (round-trips that could be batched or parallel), oversized payloads, and no caching of stable results. For the domain-specific suspects, load the active field pack (engineering/active-field.md → the pack's performance section); if the field has no pack, let the profile, not a checklist, name the suspect.
  3. Fix the biggest one. Make the single change with the most impact; resist micro-optimizing noise. Prefer doing less work (cache, batch, index, memoize, defer, paginate) over doing the same work faster.
  4. Verify the win. Re-measure the same way: confirm the number actually moved, and that behavior and correctness are unchanged (core/rigor.md). A "faster" version that's subtly wrong is a regression.
  5. Guard it. Note the metric (a comment, a budget, a perf test) so the regression is visible next time.

After

Run levelup (capture) to record the bottleneck class and its lesson in the active field's lessons.md: including the wrong suspect you ruled out, so MasterMind doesn't re-profile it next time. Report: before → after numbers, the cause, the fix, and the guard added.

Gotchas

  • Measure before and after: "feels faster" is not a result; a number that moved is.
  • Profile over pattern-matching. The obvious suspect is often not the bottleneck, the profiler decides.
  • Correctness is not on the table. Never trade a correct result for speed; if a fix changes behavior, it's not a perf fix.
  • Biggest first. One 10× hotspot beats ten 5% tweaks; stop when the number is good enough (match effort to stakes), not when you've micro-optimized everything.
  • Not debug (a wrong result) and not qa (proving it works). This is make the correct thing fast.

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.