CtrlK
BlogDocsLog inGet started
Tessl Logo

performance-optimization

Profiles, reduces frontend/backend costs: split bundles, optimize assets, apply caching, fix Core Web Vitals regressions. Use when profiling Lighthouse/CI regressions, reducing bundle size, or fixing high CLS/LCP/TTI metrics.

81

1.00x
Quality

92%

Does it follow best practices?

Impact

76%

1.00x

Average score across 1 eval scenario

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Performance Optimization

Measure before changing anything. Add React.memo/useMemo/useCallback only after a profile shows the cost — never speculatively. Set budgets (load time, memory, API latency) and enforce them in CI.

Rules

  • Node: async APIs only — never readFileSync or other sync I/O on a request path.
  • Debounce input-driven fetches at 300 ms.
  • Profile Node with clinic.js or node --inspect; profile React with <Profiler onRender> or the DevTools Profiler.

Profiling Workflow

  1. Lighthouse (or the CI perf job) for a baseline; name the failing metric (LCP/CLS/FID/TTI). If results are noisy, reproduce locally with --emulated-form-factor=mobile.
  2. Profile to locate the hotspot call stacks / long tasks.
  3. Apply the minimal fix (code-split, memoize, shrink payloads, defer non-critical work); confirm in the profiler that the measured hotspot actually shrank.
  4. Re-run Lighthouse / the CI perf job. Ship only at ≥10% improvement or once inside budget.
  5. If the regression persists, iterate and record a rollback plan; note fixes in the changelog.
Repository
monkilabs/opencastle
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.