agentleFS
jacksonwilliamsvajacksonwilliamsva/kiro-skills-library/skills/performance-optimization/SKILL.md

performance-optimization

Skill2 starsChanged 7 months agoMITView on GitHub

Use when performance requirements exist, users report slowness, metrics breach SLAs, Core Web Vitals need improvement, or you suspect a change introduced a regression

156 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use accessibility-engineering, using-agent-skills and 6 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.
  • steven123397Skill

    accessibility-engineering

    Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.

    Also in 4 projects that use this

  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 40 projects that use this

  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 20 projects that use this

  • LLl0k0laDSkill

    idea-refine

    Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.

    Also in 45 projects that use this

  • jaydubya818Skill

    observability-and-instrumentation

    Add or review logs, metrics, traces, and actionable alerts.

    Also in 36 projects that use this

  • +3 more from LLl0k0laD

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 138 edited versions we read keep these.

  • 3

    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:

    Use the systematic-debugging skill for investigation.

    line 34
  2. Distinctive:

    Before/after numbers are mandatory.

    line 54
  3. Distinctive:

    No performance monitoring in production

    line 87

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

Overview

Measure before optimizing. Performance work without measurement is guessing. Profile first, identify the actual bottleneck, fix it, measure again.

The Workflow

MEASURE  → Establish baseline with real numbers
IDENTIFY → Find the actual bottleneck (use systematic-debugging skill)
FIX      → Address the specific bottleneck
VERIFY   → Measure again, confirm improvement with numbers
GUARD    → Add monitoring/tests/budgets to prevent regression

Measure

Pick the right tool for the layer:

LayerTools
FrontendLighthouse, DevTools Performance, web-vitals (RUM), CrUX
BackendAPM traces, query logs with timing, time commands, p95/p99 latency
InfraCPU/memory/disk metrics, connection pool stats, GC logs

Identify

Use the systematic-debugging skill for investigation. Start from the symptom:

  • Slow page load → bundle size? TTFB? render-blocking resources?
  • Sluggish interaction → long main-thread tasks? excessive re-renders?
  • Slow API → N+1 queries? missing indexes? no caching?
  • Intermittent slowness → lock contention? GC pauses? external deps?

Fix

Address the specific measured bottleneck. Common fixes:

  • N+1 queries → batch/join/include
  • Unbounded fetches → pagination with limits
  • Large bundles → code splitting, lazy loading
  • Missing caching → HTTP cache headers, application-level TTL cache
  • Images → dimensions, lazy loading, responsive sizes, modern formats
  • CPU-bound work → offload to worker/background job

Verify

Before/after numbers are mandatory. No "it feels faster."

Guard

  • Performance budgets in CI (bundle size, Lighthouse score, response time)
  • Alerting on p95 latency, error rate, Core Web Vitals
  • Load tests for critical paths

Core Web Vitals Targets

MetricGoodPoor
LCP≤ 2.5s> 4.0s
INP≤ 200ms> 500ms
CLS≤ 0.1> 0.25

Common Rationalizations

RationalizationReality
"We'll optimize later"Performance debt compounds. Fix anti-patterns now.
"It's fast on my machine"Profile on representative hardware and networks.
"This optimization is obvious"If you didn't measure, you don't know.
"Users won't notice 100ms"100ms delays impact conversion rates.
"The framework handles it"Frameworks can't fix N+1 queries or oversized bundles.

Red Flags

  • Optimization without profiling data to justify it
  • N+1 query patterns in data fetching
  • List endpoints without pagination
  • Images without dimensions or lazy loading
  • Bundle size growing without review
  • No performance monitoring in production
  • Memoization everywhere (overuse is as bad as underuse)

Verification Checklist

  • Before/after measurements exist (specific numbers)
  • Specific bottleneck identified and addressed
  • Performance budgets pass
  • Existing tests still pass

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.