performance-optimization

performance-optimization is a skill for Claude Code, Codex from Xakki/ai-agents-skills. It costs 23 tokens per session (859 once invoked), scanned A, a copy of performance-optimization, MIT.

A set of web-development guidelines for improving loading speed and ongoing performance. It covers server-rendered pages, CSS structure, JavaScript size, caching, and Core Web Vitals, which are common measures of user-facing page performance.

In plain words
What is it for?
Use it when building or reviewing web apps, themes, and frontend interfaces, especially when optimizing rendering, CSS, JavaScript, or loading behavior.
Why use it?
It gives developers practical checks for avoiding slow pages and for measuring whether architectural and styling choices affect performance.

Skill for Claude CodeCodex

Part of the ai-agents-skills plugin — 23 skills, 3 agents, 6 hooks shipped together

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.

agentmods
npx agentmods add skills/xakki/ai-agents-skills/performance-optimization
Any agent
npx skills add Xakki/ai-agents-skills --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/Xakki/ai-agents-skills

Made for: Claude Code, Codex.

Or install ai-agents-skills, the plugin that ships this one along with the rest of its 23 skills, 3 agents, 6 hooks.

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/xakki/ai-agents-skills/performance-optimization.svg)](https://agentmods.dev/skills/xakki/ai-agents-skills/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/xakki/ai-agents-skills/performance-optimization"><img src="https://agentmods.dev/badge/skills/xakki/ai-agents-skills/performance-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00023 $0.00859
Opus 5 $0.00012 $0.00430
Sonnet 5 $0.00005 $0.00172
Haiku 4.5 $0.00002 $0.00086

Measured 5d ago against content hash c9a2f350c65f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

Origin

This is a copy

100% identical to performance-optimization — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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

How it starts

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

Performance Optimization

Apply these performance optimization principles when developing web applications, themes, and frontend interfaces.

Core Performance Principles

  • Prioritize server-side rendering as a first principle, as opposed to client-side JavaScript
  • Minimize client-side JavaScript to reduce bundle size and improve Time to Interactive
  • Optimize for Core Web Vitals: LCP, FID, and CLS
  • Measure performance continuously and establish baselines
  • Consider performance impact of every architectural decision

Server-Side Rendering

  • Render content server-side whenever possible
  • Use streaming rendering for faster Time to First Byte
  • Implement proper caching strategies for rendered content
  • Avoid blocking resources that delay rendering
  • Pre-render static content where applicable

CSS Best Practices

Selector Efficiency

  • Avoid ID selectors for styling; use classes instead
  • Maintain specificity at 0 1 0 where possible
  • Avoid deep nesting of selectors (max 3 levels)
  • Use BEM or similar naming conventions for clarity
  • Prefer class selectors over element selectors

CSS Organization

  • Use CSS variables for colors, spacing, and repeated values
  • Group related styles logically
  • Remove unused CSS to reduce payload
  • Consider critical CSS inlining for above-the-fold content
  • Use CSS containment for complex layouts

Layout Performance

  • Avoid layout thrashing (forced synchronous layouts)
  • Use transform and opacity for animations (GPU accelerated)
  • Minimize paint and composite operations
  • Use will-change sparingly and intentionally
  • Prefer flexbox and grid over floats and positioning

JavaScript Optimization

Code Organization

  • Use the module pattern for code organization
  • Prefix private methods with appropriate indicators
  • Prefer const over let; avoid var
  • Avoid external dependencies when native APIs suffice
  • Split code into logical, loadable chunks

Loading Strategies

  • Defer non-critical JavaScript
  • Use async loading for independent scripts
  • Implement code splitting for large applications
  • Lazy load components and routes
  • Preload critical resources

Read the full file on GitHub · 135 lines

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. 5d ago First seen · 135 lines · 23 tokens per session scan A c9a2f350c65f

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository Xakki/ai-agents-skills (6 stars, last pushed 14d ago), licensed MIT. It adds 23 tokens to every session and 859 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to performance-optimization, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

kanban-retro

Forensic retrospective on how work actually FLOWED through the kanban-pro board — reconstruct each card's timeline from the change-log (lane moves, bounces, forced moves, attention, dispatch loops, rounds, cycle time), attribute it to the model that really served it (model-pro requested-vs-resolved, context overflow…

galvani/kanban-pro · 200 tokens

kanban-worker

Work cards from the shared kanban-pro board (MCP server "kanban-pro") as a pull worker — listwork to get your queue, claimcard before touching anything, move/comment per the card's flow, release when done. Use when asked to "pick up work", "work the board", process kanban cards, or when a task mentions being tracked…

galvani/kanban-pro · 82 tokens

kanban-orchestrator

Manage the shared kanban-pro board (MCP server "kanban-pro") as an orchestrator — turn goals into cards (subcards via parent/child relations), set up each board's workflow (columns + the legal transitions between them), assign and prioritize, watch progress via the change-feed cursor, unblock. Never works cards…

galvani/kanban-pro · 101 tokens

kanban-upgrade

Bring a kanban-pro card up to the CURRENT board structure and make its recorded state TRUE — plan steps, finding statuses, the verification contract (checks), verdict. Evidence-first: never claim a status the card cannot prove. Use after a board/schema change (e.g. checks are new), when a card's report looks stale or…

galvani/kanban-pro · 0 tokens

kanban-pro-work-reporting

Maintain structured, observable work reports on kanban-pro cards via the kanban-pro MCP workreport tools. Use when an agent works, prepares, reviews, routes, asks questions on, or summarizes a kanban-pro card so the card stays self-explanatory without relying on free-form comments.

galvani/kanban-pro · 66 tokens

agent-code-analyzer

Agent skill for code-analyzer - invoke with $agent-code-analyzer.

ruvnet/ruflo · 19 tokens