diagnostics-development

Define Biome Diagnostic types and Advices for lint rule error messaging.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/qdhenry/Foundry-OSS --skill diagnostics-development-qdhenry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnostics-development
Source: https://github.com/qdhenry/Foundry-OSS/tree/main/.agents/skills/diagnostics-development
Command: npx skills add https://github.com/qdhenry/Foundry-OSS --skill diagnostics-development-qdhenry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps Biome contributors create robust, user-friendly diagnostics for lint rules and error messaging, improving developer feedback and tooling quality.

Core Features & Use Cases

  • Diagnostic templates using #[derive(Diagnostic)] for defining error types.
  • Advices and CodeFrameAdvice, DiffAdvice, and CommandAdvice to present actionable guidance and code context.
  • Patterns like RuleDiagnostic to integrate diagnostics into the linter workflow.

Quick Start

Provide a new diagnostic by deriving Diagnostic for a lint rule and implementing an appropriate Advice to surface actionable feedback.

Frequently Asked Questions about diagnostics-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom lint diagnostics in Biome?

Biome diagnostics are created by deriving the Diagnostic trait for a custom type and implementing Advice structs like CodeFrameAdvice or DiffAdvice to present actionable guidance and code context to users.

How do CodeFrameAdvice and DiffAdvice improve Biome error messages?

CodeFrameAdvice and DiffAdvice improve Biome error messages by embedding source code snippets and suggested modifications directly into the diagnostic output, providing developers with immediate, actionable context for fixing lint issues.

What is the RuleDiagnostic pattern for Biome linter integration?

The RuleDiagnostic pattern integrates diagnostics into the Biome linter workflow by connecting defined Diagnostic types directly to specific lint rules, ensuring error messaging and advices align with Biome's technical principles and contribution guidelines.

Does implementing Biome diagnostics require specific dependencies or components?

Implementing Biome diagnostics requires no external dependencies or components, relying entirely on internal Rust macros like #[derive(Diagnostic)] and built-in Advice structs to define and render error types within the Biome ecosystem.

When should I use CommandAdvice instead of DiffAdvice in Biome diagnostics?

Use CommandAdvice in Biome diagnostics when you need to suggest an executable command for resolving an issue, whereas DiffAdvice is appropriate for presenting direct code modifications and patch suggestions to the developer.