Skip to contentView the source on GitHub

Installation

Start with a single scan, then add Astro Doctor to your project, editor, or CI workflow.

CLI only (no config required)

Run astro-doctor without installing it at all:

bash
pnpm dlx @santi020k/astro-doctor@latest

This scans the current directory and prints a health report with score.

Install as a dev dependency

Add to your project so it's always available and pinned to a version:

bash
pnpm add -D @santi020k/astro-doctor

VS Code extension

For the best experience in VS Code or Cursor, install the official Astro Doctor extension from theMarketplace:

bash
ext install santi020k.vscode-astro-doctor

This provides live diagnostics, hovers, quick fixes, and a visual health score sidebar. SeeVS Code Extension for full features.

ESLint plugin

For live in-editor diagnostics (VS Code, Neovim, WebStorm, etc.), install the ESLint plugin and add it to your flat config:

bash
pnpm add -D @santi020k/eslint-plugin-astro-doctor
javascripteslint.config.js
// eslint.config.js
import astroDoctorPlugin from '@santi020k/eslint-plugin-astro-doctor'

export default [
  astroDoctorPlugin.configs.recommended,
  // Add your other config here
]

The recommended config includes astro-eslint-parser as the parser for*.astro files and enables all rules at their default severities.

Agent skills

Install the portable Astro Doctor skill so your coding agent can reference the checks and their code examples:

bash
astro-doctor install

This writes skills/astro-doctor.md in your project root. Add--agent-hooks for optional Claude Code and Cursor copies. SeeAgent skills for destinations and setup options.

GitHub Action

See GitHub Action for full setup instructions. No extra installation is required — the action runs astro-doctor internally.

Works alongside eslint-plugin-astro

astro-doctor is designed to complementeslint-plugin-astro(the official community plugin), not replace it. The two cover different ground:

Coverage areaeslint-plugin-astroastro-doctor
Syntax correctnessIncluded—
Astro Doctor accessibility rulesIncludedFocused subset
Performance (client directives, images, scripts)—Included
Security (set:html)IncludedIncluded
Best practices (class:list, env vars)PartialIncluded
CLI health score + CI reports—Included
AI agent skills—Included

If you already use eslint-plugin-astro (e.g. viaeslint-config-basic), add astro-doctor on top for performance scanning, health scoring, and AI context.