Agent skill

Performance Optimization

by rohitg00 in rohitg00/awesome-claude-code-toolkit

Web performance optimization including bundle analysis, lazy loading, caching strategies, and Core Web Vitals

Apache-2.0Auto-check passedFrontend & Design

Install Performance Optimization

skills CLI
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill performance-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rohitg00/awesome-claude-code-toolkit performance-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/performance-optimization .claude/skills/performance-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
performance-optimization
GitHub stars
2.7k
Token cost
~1.2k tokens
SKILL.md length
165 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
Apache-2.0

At a glance

Web performance optimization including bundle analysis, lazy loading, caching strategies, and Core Web Vitals

  • Tasks that involve Web performance
  • SKILL.md covers Bundle Analysis and Code…, Image Optimization, Caching Headers and Virtual Lists for Large Data, plus 3 more sections
  • Calls npx
  • Tasks that involve Performance optimization

What it does

Performance Optimization is an agent skill from rohitg00/awesome-claude-code-toolkit. Web performance optimization including bundle analysis, lazy loading, caching strategies, and Core Web Vitals

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Web performance and Performance optimization. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Web performance
  • Tasks that involve Performance optimization

Example prompts

  • “/performance-optimization”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit ebdf1d5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Performance Optimization loads about 1.2k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 165 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 165 words, ~1,248 tokens.

Download SKILL.mdSave it as .claude/skills/performance-optimization/SKILL.md (or your agent's skills folder).
name
performance-optimization
description
Web performance optimization including bundle analysis, lazy loading, caching strategies, and Core Web Vitals

Performance Optimization

Bundle Analysis and Code Splitting

typescript
// Dynamic import for route-level code splitting
const Dashboard = lazy(() => import("./pages/Dashboard"));
const Settings = lazy(() => import("./pages/Settings"));

function App() {
  return (
    <Suspense fallback={<PageSkeleton />}>
      <Routes>
        <Route path="/dashboard" element={<Dashboard />} />
        <Route path="/settings" element={<Settings />} />
      </Routes>
    </Suspense>
  );
}
javascript
// vite.config.ts - manual chunk splitting
export default defineConfig({
  build: {
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ["react", "react-dom"],
          charts: ["recharts", "d3"],
          editor: ["@monaco-editor/react"],
        },
      },
    },
  },
});
bash
# Analyze bundle composition
npx vite-bundle-visualizer
npx source-map-explorer dist/assets/*.js

Image Optimization

tsx
import Image from "next/image";

function ProductImage({ src, alt }: { src: string; alt: string }) {
  return (
    <Image
      src={src}
      alt={alt}
      width={800}
      height={600}
      sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
      placeholder="blur"
      blurDataURL={generateBlurHash(src)}
      loading="lazy"
    />
  );
}
html
<!-- Native lazy loading with aspect ratio -->
<img
  src="product.webp"
  alt="Product photo"
  width="800"
  height="600"
  loading="lazy"
  decoding="async"
  fetchpriority="low"
/>

<!-- Preload LCP image -->
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high" />

Caching Headers

typescript
function setCacheHeaders(res: Response, options: CacheOptions) {
  if (options.immutable) {
    res.setHeader("Cache-Control", "public, max-age=31536000, immutable");
    return;
  }

  if (options.revalidate) {
    res.setHeader("Cache-Control", `public, max-age=0, s-maxage=${options.revalidate}, stale-while-revalidate=${options.staleWhileRevalidate ?? 86400}`);
    return;
  }

  res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
}

app.use("/assets", (req, res, next) => {
  setCacheHeaders(res, { immutable: true });
  next();
});

app.use("/api", (req, res, next) => {
  setCacheHeaders(res, { revalidate: 60, staleWhileRevalidate: 3600 });
  next();
});

Virtual Lists for Large Data

tsx
import { useVirtualizer } from "@tanstack/react-virtual";

function VirtualList({ items }: { items: Item[] }) {
  const parentRef = useRef<HTMLDivElement>(null);

  const virtualizer = useVirtualizer({
    count: items.length,
    getScrollElement: () => parentRef.current,
    estimateSize: () => 50,
    overscan: 5,
  });

  return (
    <div ref={parentRef} style={{ height: "600px", overflow: "auto" }}>
      <div style={{ height: `${virtualizer.getTotalSize()}px`, position: "relative" }}>
        {virtualizer.getVirtualItems().map((virtualRow) => (
          <div
            key={virtualRow.key}
            style={{
              position: "absolute",
              top: 0,
              transform: `translateY(${virtualRow.start}px)`,
              height: `${virtualRow.size}px`,
              width: "100%",
            }}
          >
            <ItemRow item={items[virtualRow.index]} />
          </div>
        ))}
      </div>
    </div>
  );
}

Core Web Vitals Monitoring

typescript
import { onCLS, onINP, onLCP } from "web-vitals";

function sendMetric(metric: { name: string; value: number; id: string }) {
  navigator.sendBeacon("/api/vitals", JSON.stringify(metric));
}

onCLS(sendMetric);
onINP(sendMetric);
onLCP(sendMetric);
  • LCP (Largest Contentful Paint): < 2.5s. Preload hero images, optimize server response time.
  • INP (Interaction to Next Paint): < 200ms. Avoid long tasks, use requestIdleCallback.
  • CLS (Cumulative Layout Shift): < 0.1. Set explicit dimensions on images and embeds.

Anti-Patterns

  • Loading all JavaScript upfront instead of code-splitting by route
  • Serving unoptimized images (no WebP/AVIF, no responsive sizes)
  • Missing width and height on images (causes layout shift)
  • Using Cache-Control: no-cache on static assets with content hashes
  • Rendering thousands of DOM nodes instead of virtualizing lists
  • Blocking the main thread with synchronous computation

Checklist

  • Routes lazy-loaded with dynamic import() and Suspense
  • Bundle analyzed and vendor chunks separated
  • Images served in WebP/AVIF with responsive sizes attribute
  • LCP image preloaded with fetchpriority="high"
  • Static assets cached with immutable headers and content hashes
  • Lists with 100+ items use virtualization
  • Core Web Vitals monitored in production (LCP, INP, CLS)
  • No render-blocking resources in the critical path

© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/performance-optimization of rohitg00/awesome-claude-code-toolkit.

Open the folder on GitHubat commit ebdf1d5

Compare with similar skills

Performance Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Performance Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Performance Optimization this skillrohitg00/awesome-claude-code-toolkit2.7k—~1.2kAutomated safety check: PassApache-2.0
Performancemidudev/100cosas.dev1146 repos~2.3kAutomated safety check: PassMIT
Web Performancemozilla/firefox-devtools-mcp468—~1.2kAutomated safety check: PassCustom licence
Optimizing PerformanceCloudAI-X/claude-workflow-v21.4k1 repos~1.5kAutomated safety check: PassMIT
Performance Optimizationsanity-io/sanity6.4k7 repos~3.1kAutomated safety check: PassMIT
Optimize Loadtextura-agency/next16-claude-starter132—~4.6kAutomated safety check: NotesUnlicense

Similar skills

  • Performance

    midudev/100cosas.dev

    Optimize web performance for faster loading and better user experience.

    114 GitHub starsUsed in 6 repos~2.3k tokens
    Frontend & DesignAuto-check passed
  • Web Performance

    mozilla/firefox-devtools-mcp

    Find and fix why a website is slow by capturing and analyzing a Firefox performance profile, or by analyzing a profile the user already has (a saved file or a profiler.firefox.com share link).

    468 GitHub stars~1.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Optimizing Performance

    CloudAI-X/claude-workflow-v2

    Analyzes and optimizes application performance across frontend, backend, and database layers.

    1.4k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • Performance Optimization

    sanity-io/sanity

    Official

    Optimizes application performance. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 7 repos~3.1k tokens
    Frontend & DesignAuto-check passed
  • Optimize Load

    textura-agency/next16-claude-starter

    Get a page into Lighthouse's green zone on desktop and mobile, for people AND for the robot form crawlers get — build it, audit all four categories (Performance, Accessibility, Best Practices, SEO)…

    132 GitHub stars~4.6k tokensUpdated today
    Frontend & DesignAuto-check: notes
  • Performance Profiling

    xenitV1/Antigravity-Workflows

    Performance profiling principles. An agent skill from xenitV1/Antigravity-Workflows.

    130 GitHub starsUsed in 7 repos~772 tokens
    Frontend & DesignAuto-check: notes

More from rohitg00/awesome-claude-code-toolkit

All 37 skills in this repo
  • Accessibility Wcag

    rohitg00/awesome-claude-code-toolkit

    Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • API Design Patterns

    rohitg00/awesome-claude-code-toolkit

    REST API design with resource naming, pagination, versioning, and OpenAPI spec generation

    2.7k GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Authentication Patterns

    rohitg00/awesome-claude-code-toolkit

    Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • AWS Cloud Patterns

    rohitg00/awesome-claude-code-toolkit

    AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • CI CD Pipelines

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Continuous Learning

    rohitg00/awesome-claude-code-toolkit

    Auto-extract patterns from coding sessions, track corrections, and build reusable knowledge with confidence scoring

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Performance Optimization

What does Performance Optimization do?

Web performance optimization including bundle analysis, lazy loading, caching strategies, and Core Web Vitals. Performance Optimization is an agent skill from rohitg00/awesome-claude-code-toolkit.

When should I use Performance Optimization?

Performance Optimization fits situations like: tasks that involve Web performance; tasks that involve Performance optimization.

How do I install Performance Optimization in Claude Code?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill performance-optimization -a claude-code`. Or copy the skill folder (skills/performance-optimization in rohitg00/awesome-claude-code-toolkit) into .claude/skills/performance-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Performance Optimization in Codex?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill performance-optimization -a codex`. Or copy the skill folder (skills/performance-optimization in rohitg00/awesome-claude-code-toolkit) into .agents/skills/performance-optimization in your project. Codex loads it when a task matches its description.

Can I use Performance Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/awesome-claude-code-toolkit --skill performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-optimization, .gemini/skills/performance-optimization, .github/skills/performance-optimization and .opencode/skills/performance-optimization in your project.

What does Performance Optimization need to run?

Going by SKILL.md and its folder, Performance Optimization needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Performance Optimization access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Performance Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Performance Optimization use?

Performance Optimization is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Performance Optimization use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Performance Optimization?

Skills that share tags, products or a category with Performance Optimization: Performance (midudev/100cosas.dev, 114 stars), Web Performance (mozilla/firefox-devtools-mcp, 468 stars), Optimizing Performance (CloudAI-X/claude-workflow-v2, 1.4k stars) and Performance Optimization (sanity-io/sanity, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Performance Optimization?

rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,683 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on May 12, 2026.

Source: rohitg00/awesome-claude-code-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.