From hatch3r
Profiles and optimizes app performance against budgets: bundle size via analyzers, runtime with DevTools, memory heaps, backend metrics. For auditing violations and hot paths.
npx claudepluginhub hatch3r/hatch3rThis skill uses the workspace's default tool permissions.
> **Note:** Commands below use `npm` as an example. Substitute with your project's package manager (`yarn`, `pnpm`, `bun`) or build tool when your project uses a different package manager.
Optimizes application performance via measure-identify-fix-verify workflow. Use for Core Web Vitals, load times, regressions, or profiling bottlenecks.
Guides web performance profiling using Core Web Vitals, 4-step workflow, Lighthouse audits, DevTools Performance/Memory tabs, bundle analysis, and optimization techniques.
Validates web app performance metrics—page loads, bundle sizes, API responses—against budgets to detect regressions.
Share bugs, ideas, or general feedback.
Note: Commands below use
npmas an example. Substitute with your project's package manager (yarn,pnpm,bun) or build tool when your project uses a different package manager.
Task Progress:
- [ ] Step 1: Read performance budgets from rules and specs
- [ ] Step 2: Profile — bundle size, runtime, memory
- [ ] Step 3: Identify violations — which budgets exceeded, which hot paths slow
- [ ] Step 4: Plan optimizations — code splitting, lazy loading, memoization, etc.
- [ ] Step 5: Implement optimizations with before/after measurements
- [ ] Step 6: Verify all budgets met, no regressions
Load the project's performance budgets from project rules and quality documentation:
Bundle size:
npm run build. Inspect output for gzipped sizes.vite-bundle-visualizer, rollup-plugin-visualizer, or webpack-bundle-analyzer (or build tool equivalent) to identify large chunks and dependencies.Runtime (frontend):
browser_profile_start/browser_profile_stop for CPU profiling with call stacks.Memory:
Backend/API:
Check monitoring for cold start and warm execution times.
Instrument key paths.
For external library docs and current best practices, follow the project's tooling hierarchy.
Common strategies:
Code splitting: Route-based or component-based. Lazy-load panels, modals, non-critical features.
Lazy loading: defineAsyncComponent, dynamic import() for heavy components.
Memoization: computed, memo for expensive derivations. Avoid unnecessary re-renders.
Reduce re-renders: v-show over v-if for frequently toggled. shallowRef where appropriate.
Bundle: Remove unused deps, replace heavy libs with lighter alternatives, tree-shake.
Images/assets: Optimize, lazy-load, use appropriate formats.
Database: Reduce reads (batch, cache, denormalize).
Cloud/API: Warm-up strategies, reduce cold starts.
Check project ADRs for constraints. Verify optimizations do not violate privacy/security invariants documented in the ADRs.
For external library docs and current best practices, follow the project's tooling hierarchy.
platform in .agents/hatch.json for PR vs MR terminology).prefers-reduced-motion — do not add animations that ignore it.npm run lint && npm run typecheck && npm run test
npm run build
You MUST spawn these agents via the Task tool (subagent_type: "generalPurpose") at the appropriate points:
hatch3r-perf-profiler — MUST spawn to perform autonomous performance profiling and optimization. Provide the target areas, budget thresholds, and baseline measurements.hatch3r-performance-budgets — reference this rule for the project's defined performance budget thresholdshatch3r-performance-budgets rule as a baseline. Note in the report that custom budgets should be defined.performance.now() or console.time) for critical paths. Document the measurement method used.