astro-developer
- Repo stars 59,805
- Author updated Live
- Author repo astro
- Domain
- AI
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @withastro · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- macOS · Linux · Windows
- Runtime requirements
- Node.js
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: astro-developer
description: Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testin…
category: ai
runtime: Node.js
---
# astro-developer output preview
## PART A: Task fit
- Use case: Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testing, and critical constraints. Use when working on features, fixes, tests, or understanding the codebase structure..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Quick Decision Matrix / Critical Warnings / Quick Command Reference” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testing, and critical constraints. Use when working on features, fixes, tests, or understanding the codebase structure.”.
- **02** When the source has headings, the agent prioritizes “Quick Decision Matrix / Critical Warnings / Quick Command Reference” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Quick Decision Matrix / Critical Warnings / Quick Command Reference”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: astro-developer
description: Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testin…
category: ai
source: withastro/astro
---
# astro-developer
## When to use
- Comprehensive guide for developing in the Astro monorepo. Covers architecture, debugging, testing, and critical constr…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Quick Decision Matrix / Critical Warnings / Quick Command Reference” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "astro-developer" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Quick Decision Matrix / Critical Warnings / Quick Command Reference
rules -> SKILL.md triggers / order / output contract
runtime -> Node.js | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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:
- Prefer Unit Tests: Write unit-testable code by default. Use integration tests only when necessary → testing.md
- Node.js API Restrictions: Cannot use Node.js APIs in
runtime/code → constraints.md - Test Isolation: Must set unique
outDirfor each integration test → testing.md - Runtime Boundaries: Core vs Vite vs Browser execution contexts → architecture.md
- Prerelease Mode: Changesets target
origin/nextbranch (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:
- Read the recommended files for your task
- Apply the patterns and constraints described
- Use the commands and file paths provided
- 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 devwith Vite loader system - NonRunnablePipeline →
astro devwithout 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
outDirto avoid cache pollution
See testing.md for complete patterns and examples.
When NOT to Use This Skill
- Bug triage: Use the
triageskill instead - GitHub Actions analysis: Use the
analyze-github-action-logsskill - Simple questions: Just ask directly, don't load this skill
Related Documentation
- Root: /AGENTS.md
- Root: /CONTRIBUTING.md
- Astro docs: https://docs.astro.build/llms.txt
- Package: packages/astro/src/core/README.md
- Build plugins: packages/astro/src/core/build/plugins/README.md
Decide Fit First
Design Intent
How To Use It
Boundaries And Review