Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

fe-astro

/fe-astro

Pisze i przegląda strony w Astro 7: wyspy, dyrektywy klienta, obrazy, kolekcje treści i zmienne środowiskowe, by strony ładowały mało JavaScriptu.

Licencja
MIT
Ostatnia zmiana repozytorium
11.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 11.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pisze i przegląda strony w Astro 7: wyspy, dyrektywy klienta, obrazy, kolekcje treści i zmienne środowiskowe, by strony ładowały mało JavaScriptu.

Oryginalny opis (EN)

Writes and reviews Astro 7 sites - islands and client directives, server islands, processed scripts, astro:assets images, content collections and environment variables - so pages ship little JavaScript and stay safe. Use when editing .astro files or astro.config, adding a React, Vue or Svelte island, upgrading from Astro 6, or asked to review Astro code.

Jak działa

  1. Rules
  2. Do this
  3. Check
  4. References
Sekcje z nagłówków SKILL.md, w oryginale · 36 linii, 403 słów
Podgląd SKILL.md
---
name: fe-astro
description: Writes and reviews Astro 7 sites - islands and client directives, server islands, processed scripts, astro:assets images, content collections and environment variables - so pages ship little JavaScript and stay safe. Use when editing .astro files or astro.config, adding a React, Vue or Svelte island, upgrading from Astro 6, or asked to review Astro code.
license: MIT
compatibility: Any agent that reads Agent Skills. The audit command needs Node.js 20 or newer.
metadata:
  title: Astro sites and islands
  area: frameworks
  lane: B
  requires: astro
  globs: "**/*.astro astro.config.* src/content.config.* src/pages/** src/layouts/** src/components/**"
  rules: "astro/static-by-default astro/client-only-framework astro/directive-on-framework-component astro/server-defer-fallback astro/script-processed astro/public-env-secret js/asset-import"
  version: 0.1.0
---

# Astro sites and islands

Read `.frontend-skills/profile.json` (Astro version, adapter, island frameworks) and `.frontend-skills/lessons.md` first when they exist; a confirmed lesson wins over this skill. Islands also follow their framework's skill.

## Rules

- Framework components render without a directive unless they need interactivity; then use the latest directive that works (astro/static-by-default).
- `client:only` names its framework and has a `slot="fallback"` (astro/client-only-framework).
- `client:*` goes only on framework components imported into the `.astro` file, never on Astro components (astro/directive-on-framework-component).
- A `server:defer` island has `slot="fallback"` content and gets small serializable props (astro/server-defer-fallback).
- `<script>` tags carry no attribute but `src` so Astro bundles them; `is:inline` only on purpose; data via `data-*`, not `define:vars` (astro/script-processed).
- Secrets never get the `PUBLIC_` prefix; declare them in `astro:env` as server secrets (astro/public-env-secret).
- Local images live in `src/` and render with `<Image>` or `<Picture>`; never hard-code `/images/...` paths (js/asset-import).
- `set:html` only with trusted or sanitized HTML; it is not escaped.
- Every page has a unique `<title>`; close every tag and keep valid nesting (Astro 7 errors or no longer repairs it).

## Do this

1. Read `astro.config.*`: integrations (`@astrojs/react`, `vue`, `svelte`), the adapter (needed for `server:defer` and `prerender = false`), `site`, `base`, `image`, `env.schema`.
2. Keep pages prerendered; opt one route out with `export const prerender = false`, and personalise parts with server islands instead of making the whole page dynamic.
3. Use content collections (`src/content.config.ts` with a loader and a schema) for Markdown and data, and `getCollection()` to read them.
4. Pass the above-the-fold image `priority` on `<Image>`; give `public/` images explicit `width` and `height`.
5. Style with scoped `<style>` in the component; use `is:global` or `:global()` only where needed, and `class:list` for conditional classes.
6. For small behaviour without a framework, define a custom element in a processed `<script>`; it runs once per page and works for every instance.

## Check

- `npx github:dawidolko/frontend-skills audit --changed` reports `client:only` without a framework, directives on Astro components, server islands without fallback, unprocessed scripts, public secrets and hard-coded asset paths.
- `astro check` (with `@astrojs/check`) type-checks `.astro` files; `astro build` fails on unclosed tags in Astro 7.
- Use the dev toolbar's Audit app as a first pass, then a browser audit (`audit --url`).

## References

- [references/astro.md](references/astro.md): directive choice, server islands, scripts, images, environment variables, security options and the Astro 7 upgrade notes. Read it when adding an island, a dynamic route or upgrading.
Pliki w paczce (2)
  • SKILL.md 4 KB
  • references/astro.md 6 KB

Wersje

W bazie nie ma innych skilli o nazwie fe-astro.

Migawka bazy z 13.11.2026 · wersja paczki 3945f91ddeef (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100astro
    Wspiera tworzenie stron w Astro: wyspy, kolekcje treści, akcje, renderowanie po stronie serwera i wielkość JavaScriptu.
  • 90astro-guide
    Pomaga pisać i rozbudowywać strony w Astro: wyspy, kolekcje treści, layouty, MDX i optymalizację obrazów.
  • 100astro-islands
    Dodaje interaktywność do stron Astro przez dyrektywy client:* oraz renderuje dynamiczną treść serwera przez server:defer.
  • 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.
  • 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ść.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.