agentleFS
AL-JANEFAL-JANEF/janefskills/skills/engineering/performance-scalability/SKILL.md

performance-scalability

Skill1 starsChanged 54 days agoMITView on GitHub

Measure first, then fix latency, throughput, memory, CPU, bundle size, query count, contention, and scaling problems with before/after evidence under the same workload. Use for anything slow, expensive, or expected to scale; never optimize from intuition or trade correctness for speed silently.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    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:

    Remove unnecessary work before caching, parallelizing, or changing infrastructure.

    line 23
  2. Distinctive:

    Treat concurrency as a trade-off involving contention, rate limits, ordering, and failure amplification.

    line 26
  3. Distinctive:

    Check correctness, cold/warm behavior, resource transfer (did the cost move elsewhere?), and regression on adjacent workloads.

    line 32
  4. Distinctive:

    Use realistic load profiles for critical paths.

    line 33
  5. Distinctive:

    Add a budget or benchmark gate only when the environment is stable enough to produce actionable failures.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 & Scalability

Measure first. Averages hide tail pain, intuition hides the real hot path, and a synthetic microbenchmark does not prove production improvement.

Measure

  • Define the user-visible metric, workload, percentile (p95/p99), environment, and acceptable threshold before editing.
  • Reproduce with representative data; isolate measurement noise; profile the dominant resource and trace the critical path.
  • Frontend: bundle size, render work, media loading, layout stability, interaction latency. Backend: tail latency, saturation, queue growth, lock contention, database pressure, connection pools, downstream limits.

Optimize

  • Remove unnecessary work before caching, parallelizing, or changing infrastructure.
  • Fix algorithmic or query complexity (N+1, unbounded reads, missing indexes) before micro-optimizing syntax.
  • Bound caches by memory, lifetime, invalidation, and tenant/security scope. A cache that leaks across tenants is a security defect, not a performance win.
  • Treat concurrency as a trade-off involving contention, rate limits, ordering, and failure amplification.
  • Preserve readability unless the measured gain justifies complexity and tests protect it. Do not trade correctness, durability, or consistency for speed without an explicit, recorded decision.

Verify

  • Compare before and after under the same workload; report variance, not only the best run.
  • Check correctness, cold/warm behavior, resource transfer (did the cost move elsewhere?), and regression on adjacent workloads.
  • Use realistic load profiles for critical paths; distinguish capacity, endurance, spike, and recovery testing.
  • Add a budget or benchmark gate only when the environment is stable enough to produce actionable failures.

Output

## Performance: <path>
Baseline: <metric> = <value> (p95/p99, workload, N runs, variance)
Cause: <dominant resource / hot path with evidence>
Change: <what and why>
After: <metric> = <value> (same workload)
Not covered: <e.g. production traffic mix, cold cache>

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.