astro-performance

astro-performance is a skill for Claude Code from RadOrigin-LLC/RAD-Claude-Skills. It costs 105 tokens per session (2,667 once invoked), scanned A, original, Apache-2.0.

A performance guide for Astro websites, focused on keeping pages mostly HTML and limiting browser JavaScript. It covers loading speed measurements, client directives, deferred content, images, fonts, and bundle size.

In plain words
What is it for?
Use it to review Astro pages for Core Web Vitals issues, reduce unnecessary JavaScript, choose client directives, optimize images and fonts, and configure prefetching or deferred content.
Why use it?
It helps identify patterns that make Astro pages load slowly, shift during loading, or respond late to user actions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import DataSection from '../components/DataSection.astro';.

Part of the rad-astro plugin — 5 skills, 1 agent shipped together

Good fit Use it to review Astro pages for Core Web Vitals issues, reduce unnecessary JavaScript, choose client directives, optimize images and fonts, and configure prefetching or deferred content.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/RadOrigin-LLC/RAD-Claude-Skills
agentmods
npx agentmods add skills/radorigin-llc/rad-claude-skills/astro-performance

Made for: Claude Code.

Or install rad-astro, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

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 astro-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/astro-performance/github.svg)](https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/astro-performance)
Your own site
<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/astro-performance"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/astro-performance/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 astro-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/radorigin-llc/rad-claude-skills/astro-performance"><img src="https://agentmods.dev/badge/skills/radorigin-llc/rad-claude-skills/astro-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,667 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.00105 $0.02667
Opus 5 $0.00053 $0.01333
Sonnet 5 $0.00021 $0.00533
Haiku 4.5 $0.00011 $0.00267

Measured 11d ago against content hash 37b630edd544, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

astro-performance 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 11d 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.

archive/plugins/rad-astro/skills/astro-performance/SKILL.md · 224 lines

How it starts

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

Astro Performance Optimization

Core Mental Model: HTML First, JavaScript Only When Necessary

Astro ships ZERO JavaScript by default. This is the primary performance advantage of the framework. Treat every client:* directive as a conscious decision to add JavaScript payload to the page. Your goal is to maintain the zero-JS baseline and add interactivity only where it is surgically necessary.

Target these Core Web Vitals thresholds on every page:

  • LCP (Largest Contentful Paint): under 2.5 seconds
  • CLS (Cumulative Layout Shift): under 0.1
  • INP (Interaction to Next Paint): under 200 milliseconds

When reviewing or building Astro pages, start from the assumption that zero client-side JavaScript is correct, then justify each addition.

The Hydration Storm Anti-Pattern (CRITICAL)

A "hydration storm" occurs when multiple client:load directives cause the browser to download, parse, and execute multiple framework runtimes simultaneously on page load. This is the single most common performance mistake in Astro projects. Watch for these patterns and flag them immediately:

  • NEVER use client:load on multiple components without explicit justification for each one. Every client:load fires on page load and competes for the main thread.
  • NEVER wrap entire page layouts or large sections in a single framework component (React, Vue, Svelte) with client:load. This hydrates EVERYTHING inside that component, defeating Astro's island architecture entirely.
  • NEVER use .map() to spawn dozens of client:* islands in a loop. If you have a list of items that each get a client:visible or client:load directive, you are creating N separate island instances. Instead, render list items as static HTML and hydrate a single controller or filter component that manages the entire list.

When you find hydration storms, apply these fixes:

  1. Audit every client:* directive in the project. For each one, ask: does this component need interactivity on page load, or can it wait?
  2. Replace client:load with client:visible for components below the fold. Replace with client:idle for components that need interactivity but not immediately.
  3. Break large interactive sections into small, granular islands. Extract the interactive parts (buttons, forms, toggles) into their own island components, and leave surrounding content as static Astro markup.

Read the full file on GitHub · 224 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. 11d ago First seen · 224 lines · 105 tokens per session scan A 37b630edd544

Subscribe to this mod's changes

astro-performance is a skill published in the GitHub repository RadOrigin-LLC/RAD-Claude-Skills (5 stars, last pushed 24d ago), licensed Apache-2.0. It adds 105 tokens to every session and 2,667 once invoked, about $0.0005 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

svg

Load this skill whenever the project contains SVG graphics — inline SVGs, external SVG files, SVG icons, SVG illustrations, or SVG-based data visualizations. Under no circumstances use SVG without proper accessible titles, descriptions, and ARIA roles where required. Absolutely always add and to meaningful SVGs and…

mgifford/accessibility-skills · 104 tokens

audio-video

Load this skill whenever the project contains audio or video content, media players, podcasts, video embeds, or any / elements. Under no circumstances publish audio or video without captions, transcripts, and audio descriptions where required. Absolutely always apply WCAG 1.2 criteria for time-based media.

mgifford/accessibility-skills · 65 tokens

forms

Load this skill whenever the project contains forms, inputs, selects, checkboxes, radio buttons, text areas, or any validation flow. Under no circumstances create a form without visible labels, error identification, and keyboard accessibility. Absolutely always associate every input with a label and provide clear…

mgifford/accessibility-skills · 62 tokens

keyboard

Load this skill for every project containing interactive UI elements — buttons, links, modals, dropdowns, sliders, tabs, carousels, or any custom widget. Under no circumstances create an interactive component that cannot be fully operated by keyboard alone. Absolutely always ensure visible focus indicators, logical…

mgifford/accessibility-skills · 78 tokens

light-dark-mode

Load this skill whenever the project supports light/dark mode, colour theme switching, high-contrast mode, or responds to prefers-color-scheme. Under no circumstances hard-code colours that break in alternative themes. Absolutely always test colour contrast in both light and dark themes, and respect user OS-level…

mgifford/accessibility-skills · 69 tokens

manual-testing

Load this skill whenever you are planning, executing, or reviewing manual accessibility testing. Manual testing with real assistive technologies is essential — automated tools catch only 30–40 % of WCAG issues. Absolutely always include keyboard-only testing and at least one screen reader test before marking a feature…

mgifford/accessibility-skills · 74 tokens