performance-optimization

performance-optimization is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 126 tokens per session (3,619 once invoked), scanned A, original, Apache-2.0.

A guide for finding and fixing web and backend slowdowns, including page loading, JavaScript size, images, caching, memory, asynchronous work, and database queries.

In plain words
What is it for?
Use it to improve Core Web Vitals, analyze bundles, split or defer code, optimize images and queries, and configure caching.
Why use it?
It helps locate performance bottlenecks and apply targeted fixes with measurable results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to improve Core Web Vitals, analyze bundles, split or defer code, optimize images and queries, and configure caching.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/medy-gribkov/arcana/performance-optimization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add medy-gribkov/arcana --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin performance-optimization — /plugin install performance-optimization after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/performance-optimization/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/performance-optimization"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/performance-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/performance-optimization"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,619 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00126 $0.03619
Opus 5.5 $0.00050 $0.01448
Sonnet 5.5 $0.00025 $0.00724
Haiku 4.5 $0.00013 $0.00362

Measured 1mo ago against content hash ff119f5310df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/performance-optimization/SKILL.md · 401 lines

How it starts

The opening of the file, as written. The whole thing — 401 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Senior performance engineer who identifies bottlenecks and applies targeted optimizations with measurable impact.

Use this skill when

  • Diagnosing or improving Core Web Vitals (LCP, INP, CLS)
  • Reducing JavaScript bundle size or optimizing code splitting
  • Implementing caching at any layer (HTTP, CDN, Redis, application)
  • Optimizing database queries or fixing N+1 problems
  • Debugging memory leaks in Node.js or browser
  • Designing async processing pipelines for throughput

Core Web Vitals

LCP (Largest Contentful Paint) — Target: < 2.5s

LCP measures when the largest visible element finishes rendering. Usually a hero image, video, or large text block.

Common fixes:

  1. Preload the LCP resource: <link rel="preload" as="image" href="/hero.webp">
  2. Inline critical CSS, defer the rest. Use critters for automated critical CSS extraction.
  3. Set fetchpriority="high" on the LCP image. Remove loading="lazy" from above-the-fold images.
  4. Serve from CDN. Eliminate redirect chains.
  5. Use 103 Early Hints to let the browser start fetching before HTML arrives.
<!-- Optimal LCP image -->
<img
  src="/hero.webp"
  srcset="/hero-480.webp 480w, /hero-800.webp 800w, /hero-1200.webp 1200w"
  sizes="(max-width: 600px) 480px, (max-width: 1024px) 800px, 1200px"
  width="1200"
  height="630"
  alt="Hero image"
  fetchpriority="high"
  decoding="async"
/>

INP (Interaction to Next Paint) — Target: < 200ms

INP replaced FID in March 2024. It measures the worst-case delay between user input and visual update across the entire page lifecycle.

Common fixes:

  1. Break long tasks (>50ms) with scheduler.yield() or setTimeout(0).
  2. Move heavy computation to Web Workers.
  3. Debounce rapid-fire events (scroll, resize, input) — 100-150ms debounce.
  4. Avoid layout thrashing: batch DOM reads, then batch DOM writes.
  5. Use content-visibility: auto on offscreen sections.
// Break a long task into yielding chunks
async function processItems(items: Item[]) {
  for (let i = 0; i < items.length; i++) {
    processItem(items[i]);
    if (i % 50 === 0) {
      // Yield to main thread every 50 items
      await new Promise((resolve) => setTimeout(resolve, 0));
    }
  }
}

Read the full file on GitHub · 401 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 401 lines · 126 tokens per session scan A ff119f5310df

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 126 tokens to every session and 3,619 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.