Skip to content
Back to skills

Performance Budgets

ASecurity

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

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
developmentjavascriptjavareactapidatabasefrontendperformance

Works with

  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Vimalk0703/shipworthy --skill performance-budgets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Performance Budgets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Performance Budgets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vimalk0703-performance-budgets/badge)](https://www.skillsdirectory.com/skills/vimalk0703-performance-budgets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: performance-budgets
description: Bundle size limits, API response time budgets, query limits, image optimization, lazy loading, and caching strategies.
invoke_when: Use when writing frontend bundles, creating API endpoints, optimizing performance, or when architecture.md defines performance budgets.
---

# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…