Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

performance-optimization

Skill by sanity-io

Performance Optimization guides an AI assistant through measuring, fixing and guarding against slow application performance. It is for developers working on frontend and backend code who have measured performance problems.

  • Score 82
  • 6.4k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install performance-optimization

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sanity-io/sanity /tmp/sanity && mkdir -p ~/.claude/skills && cp -r /tmp/sanity/.agents/skills/performance-optimization ~/.claude/skills/performance-optimization

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install performance-optimization in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Performance Optimization is an agent skill that guides an AI assistant through finding and fixing slow application performance. It follows a fixed workflow: measure a baseline, identify the actual bottleneck, fix it, measure again, and add monitoring or tests to prevent regressions. The skill includes Core Web Vitals targets for LCP, INP and CLS, a symptom-based guide to where to start measuring, and examples of common anti-patterns such as N+1 queries, unbounded data fetching, images without dimensions, unnecessary React re-renders, large bundles and missing caching.

The skill also includes an example performance budget and suggests enforcing budgets in CI with bundlesize and Lighthouse CI. It is aimed at developers working on frontend and backend code. It stresses that optimization should follow measured evidence rather than assumptions. Detailed checklists are referenced in a separate file, references/performance-checklist.md.

Written from the project's SKILL.md and checked against it.

What it can do

  • Measurement workflowGuides a measure, identify, fix, verify and guard loop for performance work.
  • Core Web Vitals targetsLists Good, Needs Improvement and Poor thresholds for LCP, INP and CLS.
  • Bottleneck decision treeSuggests what to measure first based on the symptom, such as slow page load or slow API.
  • N+1 query fixesShows how to replace one query per row with a single query using include.
  • Pagination limitsShows how to add take and skip limits to unbounded data fetches.
  • Image and layout fixesCovers images without dimensions, lazy loading and responsive sizes.
  • React re-render fixesShows stable references, React.memo and useMemo for expensive renders.
  • Bundle splittingShows dynamic imports and route-level code splitting with Suspense.
  • Caching patternsShows in-memory caching with a TTL and HTTP Cache-Control headers.
  • Performance budgetsSets example budgets for bundle size, CSS, images, fonts, API time and Lighthouse score.

What you need

  • Chrome DevTools or Lighthouse for synthetic measurement
  • web-vitals library for real user metrics
  • bundlesize and Lighthouse CI for budget checks in CI

Try asking

  • Profile my page and find out why LCP is above 2.5 seconds.
  • Check this list endpoint for N+1 queries and missing pagination.
  • Review this React component for unnecessary re-renders.

Good to know

  • The skill says not to optimize without evidence of a problem.
  • Code examples are TypeScript and React focused.
  • Detailed checklists are in a referenced file that is not part of this source.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/performance-optimization/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB

Alternatives to performance-optimization

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

performance-optimization: common questions

Does Performance Optimization tell me to measure before changing code?

Yes. The skill says to measure before optimizing and to avoid premature optimization without evidence of a problem.

Which metrics does the performance skill cover?

It covers Core Web Vitals: LCP, INP and CLS, with Good, Needs Improvement and Poor thresholds for each.

How does the skill help prevent performance regressions?

Its guard step adds monitoring or tests, and it suggests enforcing performance budgets in CI with bundlesize and Lighthouse CI.

How do I install performance-optimization?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is performance-optimization free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is performance-optimization safe to use?

It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to performance-optimization?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

performance-optimization Install

Add to stack

Loading.