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★ 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.tson samples saved inmigration/samples/;scripts/import.ts, run bypnpm run import: readswebflow-export/, runs every mapper, writes the entries and copies the files they use fromwebflow-export/assets/; it never calls the network, and running it twice gives the same files;webflow-export/andparity-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
seoticket redirects it. Never change a URL silently. - No Webflow runtime: no
webflow.js, no jQuery, now-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, orclient: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.mdchooses Keystatic for editing: then the keystatic skill says how the content and the build change. - Forms post where
migration/decisions.mdsays; never to Webflow. scripts/parity.mjs, run bypnpm parityoncepnpm buildhas run, compares the Webflow page on$LEGACY_SITE_URLwith the same path of the built site, served fromdist/, for each page ofmigration/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 T05orpnpm parity /aboutchooses. 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 oneagent-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 inparity-report/old/(--freshmeasures again).
- in the HTML: the title, the meta description, the canonical, the Open Graph tags, the
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 inwhy, 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.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
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), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…