performance-optimization

performance-optimization is a skill for Claude Code, Codex from rafaelghif/antigravity-agents. It costs 38 tokens per session (588 once invoked), scanned A, original, MIT.

A web-performance review and improvement guide focused on loading speed, responsiveness, layout stability, and the size of the files sent to a browser. Core Web Vitals are standard measurements for these aspects of page experience.

In plain words
What is it for?
Use it to review image loading, code splitting, unused code removal, long browser tasks, event handling, and other runtime performance issues.
Why use it?
It helps identify wasted resources and delays that make websites feel slow or jump while loading.

Skill for Claude CodeCodex

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/rafaelghif/antigravity-agents/performance-optimization
Any agent
npx skills add rafaelghif/antigravity-agents --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/rafaelghif/antigravity-agents

Made for: Claude Code, Codex.

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/rafaelghif/antigravity-agents/performance-optimization.svg)](https://agentmods.dev/skills/rafaelghif/antigravity-agents/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/rafaelghif/antigravity-agents/performance-optimization"><img src="https://agentmods.dev/badge/skills/rafaelghif/antigravity-agents/performance-optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00038 $0.00588
Opus 5 $0.00019 $0.00294
Sonnet 5 $0.00008 $0.00118
Haiku 4.5 $0.00004 $0.00059

Measured 4d ago against content hash eb741bb3a22c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

.agents/skills/performance-optimization/SKILL.md · 43 lines

What it actually says

Performance Optimization Protocol

<CRITICAL_DIRECTIVE> You are the Senior Web Performance & Runtime Efficiency Specialist. Your mandate is to deliver blazing fast experiences by optimizing Core Web Vitals and eliminating resource waste. METRIC HONESTY MANDATE: Never claim code is "optimized" without concrete reasoning. If a metric cannot be directly measured, explicitly state what is being optimized and the expected impact. </CRITICAL_DIRECTIVE>

<CORE_WEB_VITALS>

  1. LCP (Largest Contentful Paint <= 2.5s):
    • Prioritize hero assets: Add fetchpriority="high" and priority to above-the-fold images.
    • Self-host fonts with font-display: swap and preload key subset weights.
    • Inline critical CSS; defer non-critical style sheets.
    • Avoid client-side waterfalls before rendering the main visual element.
  2. INP (Interaction to Next Paint <= 200ms):
    • Break long tasks (> 50ms) on the main thread using scheduler.yield() or microtask chunking.
    • Debounce or throttle high-frequency event listeners (scroll, resize, search input).
    • Offload heavy compute (data parsing, encryption, image manipulation) to Web Workers.
  3. CLS (Cumulative Layout Shift <= 0.1):
    • Always specify explicit width and height or CSS aspect-ratio on all <img>, <video>, and embeds.
    • Reserve skeleton or container space for dynamic content, banners, and asynchronous widgets.
    • Never inject dynamic content above existing content unless triggered by direct user action. </CORE_WEB_VITALS>

<BUNDLE_HYGIENE>

  1. Tree-Shaking:
    • Ban barrel imports that pull entire libraries (e.g. import { debounce } from 'lodash'). Use path imports (import debounce from 'lodash/debounce') or native platform methods.
  2. Code-Splitting:
    • Lazy load heavy modules, chart libraries, and interactive modals via dynamic import() or React.lazy().
    • Route-based chunking: Ensure landing pages do not bundle admin dashboard code. </BUNDLE_HYGIENE>

<PROCEDURAL_WORKFLOW>

  1. Audit: Identify rendering bottlenecks, large imports, and missing image dimensions.
  2. Apply Minimal Targeted Fixes: Modify only the bottlenecks without breaking API contracts.
  3. Verify: Run python3 scripts/verify.py --execute and ensure zero layout or functional regressions. </PROCEDURAL_WORKFLOW>
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. 4d ago First seen · 43 lines · 0 tokens per session scan A eb741bb3a22c

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository rafaelghif/antigravity-agents (5 stars, last pushed 5d ago), licensed MIT. It adds 38 tokens to every session and 588 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

coordinate-setup

Discover coding CLIs on the current computer and configure a Coordinate Agents implementation agent. Use for setup, executable checks, registered agents, user-level configuration, and project-over-user precedence.

hogancv/coordinate-agents · 40 tokens

coordinate-recover

Diagnose and safely resume Coordinate Agents Tasks after executable failure, non-zero exit, timeout, stale claim, processing message, or Implementer ERROR. Recovery is explicit and never an automatic retry loop.

hogancv/coordinate-agents · 43 tokens

dev-engineer

Adds logic, state management, TypeScript types, and CRUD operations to UI. Works AFTER ui-first-builder creates the interface. Implements Zustand stores, form handling with React Hook Form + Zod, and prepares for backend connection. Triggers: add logic, add functionality, make it work, state management, form…

wasintoh/toh-framework · 75 tokens

platform-specialist

Doc-driven platform integration expert. Converts a web app to LINE MINI App (LIFF SDK), PWA (Next.js 16), and Capacitor (iOS/Android). Expo & Tauri are secondary/legacy. ปรัชญาหลัก: ดึง docs จริงล่าสุดก่อนเขียนโค้ดเสมอ — ไม่ freeze snippet ที่จะ rot. Triggers: "LINE MINI App", "LIFF", "LINE OA", "convert to app"…

wasintoh/toh-framework · 161 tokens

premium-experience

Premium app generation that creates WOW-factor experiences. Multi-page apps with smooth animations, zero TypeScript errors, and production-ready quality. Lovable-style experience: one prompt, complete app, instant delight. MUST be used alongside vibe-orchestrator for new projects.

wasintoh/toh-framework · 56 tokens

smart-routing

Intelligent request routing for /toh command. Analyzes user intent, assesses confidence, surveys the runtime (2-step, per orchestration-protocol), and routes to the appropriate agent(s). Memory-first approach ensures context awareness. Triggers: /toh command, natural language requests, ambiguous inputs.

wasintoh/toh-framework · 65 tokens