Blog 3 min read

Free Astro skills for your AI coding agent

I open-sourced three agent skills that teach Cursor, Claude Code, and other AI tools how to work in Astro + Tailwind projects: best practices, SEO wiring, and content collections. One command to install, grounded in the official docs.

Every Lexington theme ships with context files for AI coding tools: an AGENTS.md brief, scoped Cursor rules, and a design skill extracted from the theme’s own code. Those files teach your agent the design of the theme you bought.

Today I’m open-sourcing the other half. Lexington-Themes/astro-skills is a free, MIT-licensed collection of agent skills that teach the stack: how to work in any Astro + Tailwind project without breaking things. Install them into any project with one command:

bash
npx skills add lexington-themes/astro-skills

What’s in it

Three skills at launch:

astro-tailwind-best-practices covers the everyday conventions. Project structure per the Astro docs, components-first workflow, Tailwind 4 setup done the official way (npx astro add tailwind, not the legacy integration), fonts through Astro’s Fonts API instead of pasted Google Fonts tags, and image rules that stop the classic mistake: passing a width/height pair that doesn’t match the source file, which makes Astro silently crop your image at build time.

astro-seo covers the wiring most sites get half right. Canonical URLs built from Astro.url, sitemaps via @astrojs/sitemap linked from both the head and robots.txt, absolute og:image URLs (relative ones silently fail), and JSON-LD that matches the visible page, including the ListPrice pattern for strikethrough prices.

astro-content-collections covers schemas that don’t bite later. Zod with z.coerce.date(), the image() helper instead of string paths, explicit sorting (collection order is non-deterministic, per the docs), and draft workflows that don’t leak unpublished posts into your RSS feed.

Why “best practices” isn’t just a name

Calling something best practices is a big claim, so every rule in these skills is either linked to the official Astro documentation or explicitly labeled as a field convention, something I’ve settled on after building more than a hundred production themes on this stack. Where Astro has an opinion, the skill follows it and cites it. Where the docs are silent, the skill says so.

That’s also the honest pitch for reading a skill before you install it. A skill is instructions your agent follows with your permissions; you should be able to see exactly where each rule comes from. These are plain Markdown, so go read them.

What’s free and what isn’t

The free skills teach the stack. They deliberately contain no design system: no typography choices, no color tokens, no spacing rhythm. That layer, the part that makes a site look designed rather than generated, ships with every Lexington theme as a design skill extracted from that theme’s actual code.

They’re built to work together: the free skills keep your agent from fighting Astro, the theme’s design skill keeps its output on-brand.

Install

With the skills.sh CLI, which detects your agent and puts the files in the right place:

bash
npx skills add lexington-themes/astro-skills

Or pick individual skills:

bash
npx skills add lexington-themes/astro-skills --skill astro-seo

Or copy a folder from the repo into .cursor/skills/ (Cursor) or .claude/skills/ (Claude Code) by hand. They’re just Markdown files.

/Michael Andreuzza