Menu

Post image 1
Post image 2
1 / 2
0

CLAUDE.md for Astro: 10 Rules That Stop AI From Breaking Island Architecture

DEV Community·Olivia Craft·27 days ago
#xqO7K1rG
Reading 0:00
15s threshold

Astro is a framework that wins by default — server-rendered HTML, zero JavaScript unless you ask for it, fast on any host. Then AI coding assistants get involved, and three weeks later your "fast Astro site" ships 280 KB of React on a marketing page that has one button on it. Not because the assistant is dumb. Because the assistant doesn't know which Astro patterns are load-bearing and which are footguns. So it picks client:load because it's the simplest hydration directive in the docs. It writes a React component because that's what most of its training data is. It reads frontmatter as any because nobody told it the schema exists. A CLAUDE.md file in your repo root fixes this. Claude Code reads it on every task, and so does any AI assistant that respects the convention. Below are the 10 rules that have stopped my Astro projects from drifting into "SPA-shaped" by accident. 1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More