# Frontend perf

> Frontend perf is an open-source agent skill for developer tools. Guides an agent to measure, fix and verify React web frontend performance gains. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/JasGujral/mokata-oss/tree/main/src/mokata/skills/frontend-perf
- **Repository:** https://github.com/jasgujral/mokata-oss
- **GitHub stars:** 19
- **License:** Apache-2.0
- **Skill name:** frontend-perf
- **Collection:** https://github.com/JasGujral/mokata-oss
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill gives an agent a measure-first method for speeding up React web pages. It works in an audit-first mode: the agent records one metric under stated conditions, traces the cause from the numbers, and only makes a change when the spec requests it or a person asks for one. Each kept change needs a before-and-after comparison taken under the same conditions over several runs, and a change that does not beat run-to-run noise is reverted and noted.

The workflow covers choosing a metric such as bundle bytes, render count or lab load metrics like LCP, CLS and TBT, attributing bytes to dependencies and renders to components, and adding a guard such as a byte budget, a render-count test or a recorded baseline so regressions fail. The guidance insists on production builds and warns that field-only INP cannot be measured in CI. It also notes that the skill is part of the mokata pipeline, with some writes gated by human approval.

The skill expects a React web project and a build the team can measure. It does not apply to backend latency or React Native apps. No scripts are bundled; the agent relies on the project's own build and measuring tools.

## When your agent uses it

> mokata · Frontend performance for React web — measure, identify, fix, verify (keep or revert), guard; audit first, fix on request.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/frontend-perf)
- [License: Apache-2.0](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/frontend-perf)

## Features

- **Measure before changing:** Records one named metric under stated build, device and run conditions before any edit.
- **Identify the real cause:** Uses build diffs, profiler runs and render counts to locate the source of the cost.
- **Keep or revert changes:** Keeps a fix only when the after-measurement exceeds run-to-run noise, otherwise reverts it.
- **Add regression guards:** Suggests byte budgets, render-count assertions or recorded baselines that fail on regression.
- **Before and after reporting:** Formats each kept change in a before-and-after box with run counts and conditions.
- **Lab versus field caveats:** Explains which metrics CI can measure and which, such as INP, need field data.

## Good for

- Find out why a React checkout page's JavaScript bundle grew and reduce it
- Count unnecessary re-renders in a React component and fix the worst offender
- Check whether a new dependency is worth its bytes on a React page
- Add a bundle size budget to a React project's CI checks
- Audit a React web page's load performance without changing any code

## Install

### Claude Code

This skill ships in the `mokata` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack
```

Or copy only this skill to `~/.claude/skills/frontend-perf`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/frontend-perf &&
cp -R "$tmp/src/mokata/skills/frontend-perf" ~/.claude/skills/frontend-perf &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/frontend-perf` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/frontend-perf` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/frontend-perf &&
cp -R "$tmp/src/mokata/skills/frontend-perf" ~/.agents/skills/frontend-perf &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/frontend-perf` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/frontend-perf` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/frontend-perf &&
cp -R "$tmp/src/mokata/skills/frontend-perf" ~/.cursor/skills/frontend-perf &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/frontend-perf` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/JasGujral/mokata-oss.git --path src/mokata/skills/frontend-perf
```

Or copy the folder to `~/.gemini/skills/frontend-perf` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/frontend-perf`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/frontend-perf &&
cp -R "$tmp/src/mokata/skills/frontend-perf" ~/.copilot/skills/frontend-perf &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/frontend-perf` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git
```

Then copy `mokata-oss/src/mokata/skills/frontend-perf` into your agent's skills folder as `frontend-perf`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Frontend perf trigger?

It engages when the mokata routing or spec names frontend-perf, when the spec covers both React web and performance, when an acceptance criterion sets a bundle, render-count or load-time budget for a React web page, or when a React web change is made for speed. It should not be used for backend latency, React Native, or optimizing something that has not been measured.

### Does Frontend perf change code automatically?

No. The default output is a measured finding. Code changes happen only when the spec asks for the improvement or a person requests it.

### Does Frontend perf need any scripts or special tools?

No scripts are bundled. It relies on a production build and a measuring tool the project already has, and it states what could not be measured if none is available.

### Can Frontend perf measure real user interaction speed?

Not in CI. INP is a field metric, so the skill uses TBT and scripted interaction long tasks as lab proxies and labels them as such.

### How do I install Frontend perf in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/frontend-perf to use it in all your projects, or to .claude/skills/frontend-perf in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

### Does Frontend perf run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Frontend perf?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Frontend perf?

The closest alternatives to Frontend perf are Performance, Optimize, Performance reasoning, Benchmark and Web perf.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Performance](https://ai-powered.com/skills/performance): Performance is an open-source agent skill for developer tools.
- [Optimize](https://ai-powered.com/skills/optimize-jasgujral): Optimize is an open-source agent skill for developer tools.
- [Performance reasoning](https://ai-powered.com/skills/performance-reasoning): Performance reasoning is an open-source agent skill for developer tools.
- [Benchmark](https://ai-powered.com/skills/benchmark): Benchmark is an open-source agent skill for developer tools.
- [Web perf](https://ai-powered.com/skills/web-perf): Web perf is an open-source agent skill for developer tools.
- [Benchmark checklist](https://ai-powered.com/skills/benchmark-checklist): Benchmark checklist is an open-source agent skill for developer tools.
- [Performance](https://ai-powered.com/skills/performance-daveebbelaar): Performance is an open-source agent skill for developer tools.
- [Frontend security](https://ai-powered.com/skills/frontend-security): Frontend security is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/frontend-perf
