perf-audit

Audit frontend bundle size and performance. Use when user asks to "audit performance", "/perf-audit", "analyze bundle", "check bundle size", or wants to find performance bottlenecks. Don't use for backend performance, database query optimization, or projects without a frontend build step.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "perf-audit" with this command: npx skills add helderberto/skills/helderberto-skills-perf-audit

Performance Audit

Workflow

  1. Detect build tool from package.json (vite, webpack, next, rollup)

  2. Run production build if no recent build exists:

    • Vite: npm run build
    • Next.js: npm run build (reads .next/analyze/ if ANALYZE=true)
  3. Analyze bundle output (see budget-thresholds.md):

    Vite:

    npx vite-bundle-visualizer
    

    webpack/Next.js:

    npx webpack-bundle-analyzer <stats-file>
    
  4. Check package.json dependencies for known heavy packages:

    • moment → suggest date-fns or dayjs
    • lodash → suggest tree-shakeable imports or native alternatives
    • @mui/material (full import) → suggest named imports
  5. Report findings with size impact

Output format

  • Bundle summary: total size / gzipped size vs budget
  • Large chunks: name + size + % of total
  • Heavy deps: package + size + lighter alternative
  • Quick wins: sorted by estimated savings

Rules

  • Compare against budgets in budget-thresholds.md
  • Report gzipped sizes (what the browser downloads)
  • Never auto-change dependencies — report and suggest only

Error Handling

  • If build fails → report the build error and stop; fix build issues before auditing
  • If no build output found → run the production build first before analyzing
  • If build tool is unrecognized → fall back to scanning package.json dependencies for heavy packages only

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

audit-deps

No summary provided by upstream source.

Repository SourceNeeds Review
General

safe-repo

No summary provided by upstream source.

Repository SourceNeeds Review
General

ship

No summary provided by upstream source.

Repository SourceNeeds Review
General

refactor-plan

No summary provided by upstream source.

Repository SourceNeeds Review