Skip to content

Installation

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 (Editor Integration)

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 (Standalone or alternative editor integration)

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 astro-eslint-parser
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

To install the AI agent skills into your project (so Claude, Cursor, and Copilot Workspace know the rules and how to fix them):

bash
astro-doctor install

This copies three skill files to .agents/skills/ in your project root.

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 correctness
Astro Doctor accessibility rulesFocused subset
Performance (client directives, images, scripts)
Security (set:html)
Best practices (class:list, env vars)Partial
CLI health score + CI reports
AI agent skills

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.