astro-static-islands
/astro-static-islands
Pomaga budować serwisy treściowe w Astro z wyspami statycznymi i minimalnym JavaScriptem po stronie klienta.
- Autor
- nextboxis ↗
- Repozytorium
- library-skill-agents ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 28.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 1
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 28.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.
Co robi i kiedy
Pomaga budować serwisy treściowe w Astro z wyspami statycznymi i minimalnym JavaScriptem po stronie klienta.
Oryginalny opis (EN)
Use this skill when building content-focused websites using Astro static islands architecture to achieve near-zero client-side JavaScript.
Jak działa
- When to use
- Prerequisites
- Step-by-step workflow
- Commands / code examples
- Common mistakes & pitfalls
- Verification checklist
- Related skills
Podgląd SKILL.md
---
name: astro-static-islands
description: Use this skill when building content-focused websites using Astro static islands architecture to achieve near-zero client-side JavaScript.
---
# Astro Static Islands
## When to use
Use this skill for marketing sites, documentation hubs, developer blogs, and content portfolios where Lighthouse performance and SEO are primary requirements.
## Prerequisites
- Node.js 18.14.1+ or 20+.
- Astro installed via `npm create astro@latest`.
## Step-by-step workflow
1. **Design Astro page templates**: Use `.astro` files combining a frontmatter script fence (`---`) with HTML-like component markup.
2. **Implement content collections**: Define structured schema collections under `src/content/config.ts` using Zod for type-safe Markdown/MDX content.
3. **Isolate interactive components**: Build interactive UI widgets in your choice of UI framework (React, Vue, Svelte, or Solid).
4. **Hydrate with client directives**: Use explicit client directives (`client:load`, `client:visible`, `client:idle`) to hydrate islands on demand.
5. **Generate static assets**: Run `astro build` to output optimized HTML, CSS, and minimal island JavaScript bundles.
## Commands / code examples
```astro
---
// src/pages/blog/[slug].astro
import { getCollection, getEntry } from 'astro:content';
import BaseLayout from '../../layouts/BaseLayout.astro';
import InteractiveComments from '../../components/InteractiveComments.tsx';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({ params: { slug: post.slug } }));
}
const { slug } = Astro.params;
const post = await getEntry('blog', slug);
const { Content } = await post.render();
---
<BaseLayout title={post.data.title}>
<article class="prose max-w-3xl mx-auto p-4">
<h1>{post.data.title}</h1>
<p class="text-gray-500">Published on {post.data.date.toLocaleDateString()}</p>
<Content />
<!-- Island hydrated only when scrolled into view -->
<InteractiveComments client:visible postId={post.id} />
</article>
</BaseLayout>
```
## Common mistakes & pitfalls
- Overusing `client:load` on below-the-fold widgets, degrading initial page load metrics.
- Attempting to pass non-serializable props (functions, complex class instances) to client framework islands.
- Using client-only framework state to manage site-wide static navigation.
## Verification checklist
- [ ] Pages render pure static HTML by default.
- [ ] Interactive islands specify explicit `client:*` directives.
- [ ] Content collections enforce strict schemas with Zod.
- [ ] Output site scores 95+ across all Core Web Vitals audits.
## Related skills
- react-fundamentals
- svelte-sveltekit
- web-vitals-lcp-cls-inp-optimization
- html5-semantic-web
Wersje
W bazie nie ma innych skilli o nazwie astro-static-islands.
Migawka bazy z 13.11.2026 · wersja paczki dae99af1efda (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 2 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100astro
Dostarcza wiedzę o Astro 5+: Content Collections, Islands, SSG i SSR, integracje oraz migracja z Next.js. - 90frontend-astro-architecture
Projektuje strony Astro z domyślnie zerowym JavaScriptem, wyspami z dyrektywami client, routingiem plików i kolekcjami treści ze schematami Zod. - 100astro
Pomaga budować strony w Astro: komponenty, strony, kolekcje treści, adaptery SSR i wdrożenia statyczne. - 100astro
Wspiera pracę z frameworkiem Astro: architektura wysp, kolekcje treści, dyrektywy klienta i obsługa wielu frameworków w stronach statycznych i bogatych w treść. - 100astro
Wspiera budowę stron treściowych i marketingowych w Astro 6: static-first, wyspy i częściowa hydracja, kolekcje treści, server islands, renderowanie na żądanie, adaptery i migracja z Astro 5. - 85astro-optimizer
Audytuje i optymalizuje strony Astro pod kątem JavaScriptu po stronie klienta, Core Web Vitals, obrazów, kolekcji treści i czasu budowania, z pomiarami.