/mokata:frontend-perffrom mokata
Audits and optimizes React web performance using a measure-identify-fix-verify-guard loop. Tracks bundle size, render count, and lab load metrics (LCP, CLS, TBT) with before/after evidence.
Ships in mokata. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
mokata Agent Skill. This is mokata's
frontend-perfdomain knowledge. mokata LOADS it when the approved spec routes both a React web surface and a performance surface — never on a prompt keyword. It specialises theperformanceskill for the browser and feeds the same measure-first instrument. Durable writes are human-gated; no change is kept without a before/after number.
⛭ mokata frontend-perf active — gate: no optimization is kept without a before/after measurement proving the win
Audit first, fix on request. The default output is a measured finding, not a code change. Change code only when the spec asks for the improvement (an AC with a budget) or the human says so.
Report every kept change in a before/after box:
metric: initial JS for /checkout (gzip) conditions: prod build, same commit base
before: 212.4 kB (3 runs, ±0.0) after: 168.9 kB (3 runs, ±0.0)
change: −43.5 kB (−20.5%) kept: yes — exceeds noise; budget guard added
frontend-react → compiler-hunt-bailouts).
Sources: https://web.dev/articles/vitals · https://web.dev/articles/inp · https://react.dev/reference/react/Profiler .
Specific thresholds (what counts as a "good" LCP or INP) are UNVERIFIED here — quote them only
after reading the cited page.This guidance runs inside a pipeline phase. If that phase appears stuck, or the harness stops it mid-run: run mokata resume (where the run stands and the gate that still applies) and mokata approve --list (anything waiting on a human). Nothing is lost — run state, approvals and the audit ledger are on disk — so re-invoke the phase to continue; mokata doctor names a hung MCP server or a hook that is not firing.
| Rationalization | Reality |
|---|---|
| "This is obviously the slow part." | Obvious and measured disagree often. Measure, then identify from the numbers. |
| "One run is enough, the difference is big." | Builds and browsers are noisy; a single run cannot separate a win from variance. |
| "I'll keep it, it can't hurt." | A change without a measured win is complexity with a cost. Revert it and record why. |
| "Dev mode shows the same picture." | Development React adds checks that dominate timings. Measure production. |
| "Lighthouse in CI tells us the real INP." | INP is field-only. CI gives a lab proxy; label it as one. |
Evidence, not "seems right" — check every box or say which is unmet and why:
references/measure-identify-fix-verify.md — the loop in detail: choosing the metric, stating conditions, noise and run counts, and the guard optionsreferences/bundle-and-render-evidence.md — how to attribute bytes to a dependency and renders to a component without bundler-specific toolingCAN
context entry to memory + the ledger (human-gated)MUST NOT
DEPENDS ON
frontend-perf (routed when frontend-react and performance are both in play) (advisory)Grounding:
(gate: …)boundaries are enforced by that gate in code;(advisory)ones are protocol discipline this skill follows, not a hard block.
What SKILL.md sets; muted values are Claude Code's defaults
Engage when mokata's per-turn routing or `spec show` names `frontend-perf` for this run, when the spec's `domains` carry both `frontend-react` and `performance`, when an acceptance criterion states a bundle-size, render-count or load-time budget for a React web page, or when a React web change is made in the name of speed. Do NOT engage for a backend latency problem, for a React Native app, or to optimize something nobody has measured yet — measure first, do not engage to guess.
Three short reads, in order
npx claudepluginhub jasgujral/mokata-oss --plugin mokata30 skills in this plugin
/apimokata · API & interface design — contract-first, blast-radius on every change./backend-nestjsmokata · NestJS rule pack — impact-ordered rules for modules, guards, DTOs and providers, loaded by the spec's routing./brainstormmokata · Socratic pre-spec exploration — explore approaches WITH the user, one question at a time, and HARD-GATE the spec behind explicit approval. Runs standalone or as the front of mokata's pipeline./browser-testingmokata · Browser testing (DevTools) — live runtime captured via the existing MCP surface, fed to the test gate./bugmokata · Start from a reproducer and a failing test, then fix./ci-cdmokata · CI/CD & automation — the quality-gate pipeline + Scorecard posture, not a suggestion.Other plugins' skills for the same job