perf-astro

Optimize Astro websites with critical CSS inlining and asset compression.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/Matheusrlr/payment-orchestrator --skill perf-astro-matheusrlr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-astro
Source: https://github.com/Matheusrlr/payment-orchestrator/tree/main/skills-catalog/skills/%28performance%29/perf-astro
Command: npx skills add https://github.com/Matheusrlr/payment-orchestrator --skill perf-astro-matheusrlr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires astro-critters, @playform/compress, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of achieving high performance scores (95+ on Lighthouse) for websites built with Astro, by providing specific optimizations.

Core Features & Use Cases

  • Critical CSS Inlining: Automatically identifies and inlines CSS needed for above-the-fold content.
  • Compression: Minifies HTML, CSS, and JavaScript assets for smaller file sizes.
  • Optimized Font Loading: Implements strategies to prevent render-blocking font requests.
  • LCP Optimization: Includes techniques for preloading Largest Contentful Paint images.
  • Use Case: Improve your Astro site's user experience and SEO by ensuring it loads quickly and efficiently, passing performance audits with flying colors.

Quick Start

Install the necessary packages and configure astro.config.mjs with the provided code.

Frequently Asked Questions about perf-astro

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I improve Lighthouse performance scores for an Astro website?

Critical CSS inlining extracts and embeds above-the-fold styles directly into HTML, preventing render-blocking requests. This web vitals optimization technique ensures the Largest Contentful Paint loads quickly for Astro site visitors.

How do I optimize Core Web Vitals in Astro using compression?

You can optimize Core Web Vitals in Astro by integrating compression packages to minify HTML, CSS, and JavaScript assets. This reduces overall file sizes and improves loading efficiency for high Lighthouse performance scores.

Do I need astro-critters and @playform/compress to optimize Astro site speed?

Yes, optimizing Astro site speed with this approach requires integrating astro-critters and @playform/compress packages. These dependencies handle critical CSS inlining and asset compression within your astro.config.mjs file.

How do I prevent render-blocking fonts in an Astro project?

To prevent render-blocking font requests in an Astro project, apply optimized font loading strategies. This technique delays or preloads font assets appropriately, ensuring text renders quickly without stalling the page load process.

What is the best way to optimize the Largest Contentful Paint in Astro?

The best way to optimize Largest Contentful Paint in Astro is by preloading LCP images and inlining critical CSS. These combined techniques ensure the primary visual elements load without waiting on external stylesheet requests.