agentleFS
Vimalk0703Vimalk0703/shipworthy/skills/architecture/performance-budgets/SKILL.md

performance-budgets

Skill6 starsChanged 8 months agoMITView on GitHub

Bundle size limits, API response time budgets, query limits, image optimization, lazy loading, and caching strategies.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Use dynamic imports / React.lazy() for non-critical routes

    line 32
  2. Distinctive:

    Prefer CSS over JavaScript for animations

    line 34
  3. Very specific:

    Use caching headers (Cache-Control, ETag)

    line 38
  4. Distinctive:

    Use database indexes for queried fields

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Budgets

Default Budgets (customize in architecture.md)

Frontend

  • Initial bundle: <250KB gzipped (JavaScript)
  • Per-route chunk: <50KB gzipped
  • Largest Contentful Paint: <2.5s
  • First Input Delay: <100ms
  • Cumulative Layout Shift: <0.1
  • Images: WebP/AVIF, lazy-loaded below fold, explicit width/height

API

  • Response time (p95): <200ms for reads, <500ms for writes
  • Payload size: <1MB per response
  • Database queries per request: <10

Database

  • Query execution: <100ms (log anything slower)
  • Connection pool: sized for expected concurrency

Enforcement Strategies

Frontend

  • Analyze bundle with npx next build / npx vite build — check output sizes
  • Use dynamic imports / React.lazy() for non-critical routes
  • Tree-shake unused code — avoid barrel exports (index.ts re-exporting everything)
  • Prefer CSS over JavaScript for animations

API

  • Paginate list endpoints (never return unbounded results)
  • Use caching headers (Cache-Control, ETag)
  • Compress responses (gzip/brotli)
  • Use database indexes for queried fields

General

  • Measure before optimizing — don't guess at bottlenecks
  • Set budgets early, enforce them in CI
  • Performance regression = bug, not technical debt

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.