astro-developer

withastro/astro · Agent Skill

Provides a guide for developing within the Astro monorepo, covering architecture, debugging, and testing to assist with codebase tasks.

Jump to install ↓

Overview

PublisherwithastroOrganization
Repositorywithastro/astro ↗
Skill folderastro-developer
Stars62,485
Bundled files5
Licensenot specified — check with the author
Last updatedAugust 12, 2026
LinksSkill source ↗ · Repository ↗

Mozgi check

What we found in the skill files. Details come with a subscription.

Security
low risk · no obvious risks found — the full report shows the details
Compatibility
needs extra software
Similar skills
144 similar skills found
Also with subscription

Installation

A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.

Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.

Install the “astro-developer” skill from mozgi.io (https://mozgi.io/skills/astro-developer/) for me.

1. Download the archive: https://mozgi.io/skills/astro-developer/download
   If it fails, take the skill folder from the source: https://github.com/withastro/astro/tree/main/.agents/skills/astro-developer
2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me.
3. Put the “astro-developer” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.).
4. Make sure <skills folder>/astro-developer/SKILL.md exists.
5. Briefly tell me what this skill does and offer to try it on my task.

If you cannot do a step yourself, tell me what to click or type.

Review the source files

5 files Download Zip

Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.

SKILL.md contents

Original author text · read-only

Astro Developer Skill

Context-loading skill for AI agents and developers working in the Astro monorepo. Loads relevant documentation based on your task.

Quick Decision Matrix

What are you doing? → Read these files:

| Task | Primary Docs | Supporting Docs |

| -------------------------- | -------------------------------------------------------------------- | ---------------------------------- |

| Adding a core feature | architecture.md ↗, constraints.md ↗ | testing.md ↗ |

| Fixing a bug | debugging.md ↗ | architecture.md ↗ |

| Writing/fixing tests | testing.md ↗ | constraints.md ↗ |

| Creating an integration | Explore packages/integrations/ for examples | testing.md ↗ |

| Understanding architecture | architecture.md ↗ | - |

| Dealing with errors | debugging.md ↗, constraints.md ↗ | testing.md ↗ |

| Understanding constraints | constraints.md ↗ | architecture.md ↗ |

Critical Warnings

Before you start, be aware of these common pitfalls:

1. Prefer Unit Tests: Write unit-testable code by default. Use integration tests only when necessary → testing.md ↗

2. Node.js API Restrictions: Cannot use Node.js APIs in runtime/ code → constraints.md ↗

3. Test Isolation: Must set unique outDir for each integration test → testing.md ↗

4. Runtime Boundaries: Core vs Vite vs Browser execution contexts → architecture.md ↗

5. Prerelease Mode: Changesets target origin/next branch (check .changeset/config.json)

Quick Command Reference

# Development
pnpm install                                    # Install (root only)
pnpm run build                                  # Build all packages
pnpm run dev                                    # Watch mode
pnpm run lint                                   # Lint codebase

# Testing
pnpm -C packages/astro exec astro-scripts test "test/**/*.test.js"  # All tests
pnpm -C packages/astro exec astro-scripts test -m "pattern"         # Filter tests
pnpm run test:e2e                               # E2E tests
node --test test/file.test.js                   # Single test

# Examples
pnpm --filter @example/minimal run dev          # Run example

# Changesets
pnpm exec changeset --empty                     # Create changeset, no interactive mode

Key File Paths

packages/astro/src/
├── core/              # Node.js execution context (build/dev commands)
├── runtime/
│   ├── server/        # Vite SSR execution context
│   └── client/        # Browser execution context
├── virtual-modules/   # Virtual module entry points
├── content/           # Content layer system
├── vite-plugin-*/     # Vite plugins
└── types/             # Centralized TypeScript types

packages/integrations/  # Official integrations
examples/              # Test your changes here
test/fixtures/         # Test fixtures

Note: Error stack traces in node_modules/ map to source in packages/. See architecture.md ↗ for details.

Usage

This skill loads relevant context—it doesn't orchestrate workflows. After loading appropriate docs:

1. Read the recommended files for your task

2. Apply the patterns and constraints described

3. Use the commands and file paths provided

4. Search docs for error messages if you encounter issues

Architecture Quick Summary

Three Execution Contexts:

  • core/ → Node.js, build/dev commands, avoid Node APIs except in Vite plugins
  • runtime/server/ → Vite SSR, CANNOT use Node APIs
  • runtime/client/ → Browser, CANNOT use Node APIs at all

Five Pipeline Types:

  • RunnablePipeline → astro dev with Vite loader system
  • NonRunnablePipeline → astro dev without runtime module loading (Cloudflare adapter)
  • BuildPipeline → astro build + prerendering
  • AppPipeline → Production serverless/SSR
  • ContainerPipeline → Container API

See architecture.md ↗ for complete details.

Testing Quick Summary

Philosophy: Prefer unit tests over integration tests. Write unit-testable code by default.

Unit tests (fast, preferred):

  • Test pure functions and business logic
  • Extract business logic from infrastructure
  • Use dependency injection

Integration tests (slow, use sparingly):

  • Only for features that cannot be unit tested (virtual modules, full build pipeline)
  • Always set unique outDir to avoid cache pollution

See testing.md ↗ for complete patterns and examples.

When NOT to Use This Skill

  • Bug triage: Use the triage skill instead
  • GitHub Actions analysis: Use the analyze-github-action-logs skill
  • Simple questions: Just ask directly, don't load this skill

Related Documentation

  • Root: /AGENTS.md
  • Root: /CONTRIBUTING.md
  • Astro docs: https://docs.astro.build/
  • Package: packages/astro/src/core/README.md
  • Build plugins: packages/astro/src/core/build/plugins/README.md

Frequently asked questions

What does the astro-developer skill do?

Provides a guide for developing within the Astro monorepo, covering architecture, debugging, and testing to assist with codebase tasks.

How do I install astro-developer?

Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.

Which AI models work with astro-developer?

Skills are plain Markdown instructions (the Agent Skills format), so astro-developer works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.

Is astro-developer free?

The skill is published openly by withastro. The skill itself costs nothing — you only pay your AI provider for the tokens you use. No license is specified in the repository — check the terms with the author before commercial use.

Is it safe to install skills?

A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.

How is a skill different from an MCP server or a plugin?

An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.

Related skills

All skills →