/skills:optimize-reactfrom skills
Diagnoses and fixes React/Next.js performance issues: slow page loads, excessive re-renders, large JS bundles, and laggy interactions. Measures one route, identifies the root cause, applies a fix, and reports before/after medians.
Ships in skills. 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.
Pick one route or action and a user-visible milestone, such as the product list appearing. Use a production build or a fixed preview. Record the build, device profile, fixture, cache state, and measurement method. Run at least three samples per version and record the median.
Follow the measured delay to its cause:
| Evidence | First change to try |
|---|---|
| Requests run in series | Start independent reads together and await them at their point of use. Keep auth checks and real data dependencies in order. With streaming, put slow secondary content behind its own Suspense boundary. |
| Too much script on the first screen | Check which imports actually ship. Split large secondary features at their point of use and defer optional third-party scripts. Compare transferred JS and check the delayed feature still opens. |
| Server work repeats | Check for duplicate reads and large serialized props. Deduplicate within the request where possible. Check user and tenant boundaries before sharing a cache across requests. |
| Typing or clicking feels slow | Use the React Profiler or a browser trace to find expensive commits or long tasks. Remove unnecessary derived-state effects or narrow subscriptions before adding memoization. |
Change the main cause within the requested scope. Run the same measurement again, with the same fixture and cache policy. Check that the original content, permissions, and interactions still work. Report the before/after median, sample count, what changed, and any remaining bottleneck.
See example.md for a timed request waterfall.
Based on vercel-labs/agent-skills (MIT), rewritten by Copybook.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub heyvhuang/copybook-skills --plugin skills24 skills in this plugin
/add-pre-commit-checksUse when asked to add pre-commit hooks, set up Husky or lint-staged, stop bad commits, or run Prettier and type checks on commit. Sets up a pre-commit hook that formats staged files, type-checks with the project config, and runs related tests, proven by blocked and fast commits. Not for picking a test set for a change (run-affected-tests)./build-throwaway-prototypeUse when asked to prototype, spike, try an idea out quickly, sanity-check a state model or logic, or mock up what a UI should look like. Builds a throwaway prototype that answers one named design question from one command or one HTML file while leaving production code untouched. Not for building a finished production page (design-web-page)./check-current-docsUse when asked to use the latest docs, check if an API is still current, check which version the project is on, follow modern HTML or CSS best practices, or avoid outdated patterns; also when adding or changing code that calls a library pinned in the project, such as validation with a schema library. Reads the project lockfile and manifest, checks the official docs or browser guidance for the exact pinned versions, implements the current pattern without deprecated calls, and cites each choice with its URL, version, and date read. Not for moving existing code off an old API (migrate-off-deprecated-api)./check-live-deployUse when asked if a merge is live, if the deploy worked, or to check production after shipping and merging. Verifies that the canonical public URL serves the merged commit past any cache and that the change itself works live, reporting live, not live or unknown with evidence. Not for checking code before a merge (verify-work-done)./check-skill-before-installUse when asked to find a skill for a task, if there is a skill that helps, how to do something with an agent, which plugin to use, or to install a skill. Finds two or three candidate skills, reads each one for scripts, network calls, file writes, licence, and name clashes, and recommends one pick with a proposed install command. Not for getting a second opinion on a plan or trade-off (get-second-opinion)./find-root-causeUse when something is broken: a bug, a failing test, a build error, "it doesn't work", or a fix that didn't hold. Reproduces the failure, traces it to the line where it starts, proves one cause with one change, fixes every copy, and stops with a report after two failed fixes. Not for checking finished work before saying done (verify-work-done).Other plugins' skills for the same job