Agent skills
Give your coding agent the same Astro patterns your checks enforce. The installer copies one portable skill into your project, with optional hooks for Claude Code and Cursor.
Install the skill
pnpm dlx @santi020k/astro-doctor@latest installRun the command from your project root. It writes skills/astro-doctor.md, offers to create a GitHub Actions workflow, and can install native agent hooks. Use --dry-run to preview the file changes first.
pnpm dlx @santi020k/astro-doctor@latest install --dry-run
pnpm dlx @santi020k/astro-doctor@latest install --agent-hooks| Destination | When it is installed |
|---|---|
skills/astro-doctor.md | Every install; reference it from your agent's project instructions. |
.claude/skills/astro-doctor.md | With --agent-hooks or after accepting the native hooks prompt. |
.cursor/rules/astro-doctor.mdc | With --agent-hooks or after accepting the native hooks prompt. |
What the skill covers
The portable skill explains Astro Doctor checks with code examples: island hydration, image optimization, accessible markup, safe HTML and environment variables, content collections, and project configuration. It also documents scanning and CI workflows.
- Ask your agent to explain a finding before changing a component.
- Use the examples to choose a fix that fits your page.
- Run Astro Doctor again to verify the result.
Reference it from your agent
For agents that read a project instructions file, reference the installed Markdown file. The Claude Code and Cursor hooks contain the same skill when you enable them.
Read skills/astro-doctor.md before editing Astro components.
After changing a component, run Astro Doctor and address relevant findings.Repository resources
Astro Doctor's repository also contains contributor skills for rule implementation and Astro performance. These files are separate from the portable skill installed by the CLI. Browse them directly or copy the resources you need:
- Astro rules reference — rule patterns and examples.
- Astro performance guide — hydration, images, View Transitions, and server islands.
- Add a rule — the repository's test-driven contribution workflow.