Command Palette

Search for a command to run...

Назад к скиллам
скилл № 23181

astro-conventions

How the new Astro site is laid out and built in this repository. Use before writing or reviewing code of the site.

БесплатноБез исполняемых скриптов
openfabriqот openfabriq★ 40 звёзд на GitHub

Установить astro-conventions в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Astro conventions

Every agent of the migration reads this skill. Keep it short and prescriptive.

  • Stack: Astro, TypeScript strict, Vitest, pnpm. The site is static: the build never calls Webflow.
  • Layout:
    • src/content.config.ts: one collection per Webflow CMS collection, with a Zod schema;
    • src/content/<collection>/: the imported entries, committed;
    • src/lib/mappers/<collection>.ts: one mapper per collection, a pure function from a Webflow item to an entry (references resolved, rich text cleaned of Webflow's classes), tested in <collection>.test.ts on samples saved in migration/samples/;
    • scripts/import.ts, run by pnpm run import: reads webflow-export/, runs every mapper, writes the entries and copies the files they use from webflow-export/assets/; it never calls the network, and running it twice gives the same files;
    • webflow-export/ and parity-report/ are in .gitignore;
    • src/layouts/, src/components/, src/pages/: one component per block a page template repeats, built once.
  • URLs: the new site keeps every old URL (trailing slash included), or the seo ticket redirects it. Never change a URL silently.
  • No Webflow runtime: no webflow.js, no jQuery, no w- class kept for its behavior. An interaction becomes CSS (:hover, <details>, transitions, @keyframes, scroll-driven animations) when it can.
  • No JavaScript in the browser by default. A component that needs it is an island (client:visible, or client:idle), for a reason written in the pull request.
  • Images go through astro:assets (<Image />), stored with the content, with their alternative text from Webflow. No URL of Webflow's CDN in the new site.
  • Until the switch, editors write in Webflow and the weekly sync brings the content back: an entry is never edited by hand. After the switch, the content stays Markdown in the repository, unless migration/decisions.md chooses Keystatic for editing: then the keystatic skill says how the content and the build change.
  • Forms post where migration/decisions.md says; never to Webflow.
  • scripts/parity.mjs, run by pnpm parity once pnpm build has run, compares the Webflow page on $LEGACY_SITE_URL with the same path of the built site, served from dist/, for each page of migration/parity/*.json:
    • in the HTML: the title, the meta description, the canonical, the Open Graph tags, the h1, and the links as a set;
    • in a browser (agent-browser), on desktop (1440 px) and phone (390 px): the visible text and the page height;
    • it writes the screenshots of both sites at each width in parity-report/, and lists the links whose page does not exist yet, which a later ticket builds;
    • it fails on any difference that the page's entry does not list, and on a height that differs more than 5 %.
    • it is quick: by default it compares the pages of the parity files the branch changes (its ticket's), or every page on the default branch; pnpm parity --all, pnpm parity T05 or pnpm parity /about chooses. A change to what every page shares (the layout, a shared component, the global CSS) runs --all. It measures a page at a width in one agent-browser batch (viewport, open, wait for the load, eval, screenshot), never one process per step nor a fixed wait, and keeps the old site's measures a day in parity-report/old/ (--fresh measures again).
  • migration/parity/T<nn>.json, one file per ticket, lists its pages: { "pages": [{ "path": "/about", "ignoreLinks": [], "ignoreText": [], "heightTolerance": 0.05, "why": "" }] }. An exception or a tolerance above 0.05 says why in why, and the ticket that removes its cause removes it; never one only to make parity pass. A ticket writes its own file and never touches another's, so two pull requests never conflict on it.
  • Commits: imperative subject line that references the ticket.
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл astro-conventions?

How the new Astro site is laid out and built in this repository. Use before writing or reviewing code of the site.

Как установить скилл astro-conventions?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл astro-conventions запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить astro-conventions с