{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-performance-budget-76083330195a","title":"Enforce Performance Budgets in CI","summary":"Define and enforce bundle size and Lighthouse score thresholds in CI pipelines to prevent performance regressions. Deliverables include CI configurations with performance checks and thresholds for bundle size and Lighthouse scores.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-performance-budget-76083330195a","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-performance-budget-76083330195a","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-performance-budget-76083330195a.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-performance-budget-76083330195a\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure that size-limit and Lighthouse CI are installed and configured before setting up performance budgets. Define initial thresholds based on current bundle sizes and Lighthouse scores, and tighten them as performance improves.","instructions":"---\nname: performance-budget\ndescription: \"Use when reviewing CI configuration, bundle analysis workflows, or pull requests that add dependencies and assets. Distinguish bundle-size budgets from runtime budgets such as Lighthouse or Core Web Vitals so teams can enforce both.\"\nmetadata:\n  category: testing\n  priority: medium\n  difficulty: intermediate\n  estimatedTime: \"25\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/testing\/performance-budget\n---\n\n# Enforce performance budgets in CI\n\nWithout automated enforcement, performance degrades gradually \u2014 each PR adds a small library, each feature adds a few KB, and within months the app that loaded in 2 seconds now takes 5. Performance budgets make regressions visible at PR time rather than after user complaints. Catching 'this PR added 200KB to the bundle' in review is far cheaper than debugging a slow production site.\n\n## Quick Reference\n\n- Define specific thresholds: max bundle size, min Lighthouse score, max LCP time\n- Fail CI when budgets are exceeded to prevent performance regressions\n- Size budgets catch accidental heavy dependencies; Lighthouse budgets catch runtime regressions\n- Start with loose budgets and tighten them as you optimize\n- Monitor production RUM so regressions are caught after deploy, not only in CI\n\n## Check\n\nDoes this project have performance budgets defined? Check package.json and CI configuration for size or Lighthouse thresholds.\n\n## Fix\n\nSet up bundle size limits with size-limit and Lighthouse CI assertions in the CI pipeline.\n\n## Explain\n\nExplain performance budgets, how to choose appropriate thresholds, and how to enforce them with size-limit and Lighthouse CI.\n\n## Code Review\n\nInspect CI workflows, `package.json`, and Lighthouse or bundle-size config for explicit thresholds. Flag repos where budgets are missing, too loose to catch regressions, or unenforced on pull requests. Check whether production RUM and alerting are wired to detect regressions after release.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/testing\/performance-budget\n","use_cases":["Reviewing CI configurations for performance budget enforcement","Analyzing pull requests that add dependencies or assets","Monitoring bundle sizes and Lighthouse scores during deployments"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/performance-budget\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T05:12:10.000000Z","updated_at":"2026-11-24T07:12:05.000000Z","seo_title":"Enforce performance budgets in CI","seo_description":"Ensure performance budgets are enforced in CI pipelines to prevent regressions in bundle size and Lighthouse scores.","seo_keywords":["enforce performance budgets in CI","CI performance budget enforcement","bundle size and Lighthouse score thresholds"]}}