writing-rust-lints

Create custom Rust lints with Dylint for AST and type-checked analysis.

24|1|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/delightful-ai/beads-rs --skill writing-rust-lints
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-rust-lints
Source: https://github.com/delightful-ai/beads-rs/tree/main/.claude/skills/writing-rust-lints
Command: npx skills add https://github.com/delightful-ai/beads-rs --skill writing-rust-lints

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers you to create custom Rust lints, enforcing project-specific code patterns and team conventions beyond what standard tools like Clippy offer.

Core Features & Use Cases

  • Custom Lint Creation: Develop project-specific lints for unique code patterns.
  • Enforce Team Conventions: Build reusable lint libraries to maintain code quality.
  • Dylint Integration: Seamlessly integrate custom lints into your Rust development workflow.
  • Use Case: You need to ensure all unwrap() calls are explicitly handled with expect() messages. This Skill guides you in creating a custom lint to enforce this rule across your codebase.

Quick Start

Use the writing-rust-lints skill to create a new custom lint named my_new_lint.

Frequently Asked Questions about writing-rust-lints

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

FAQPage Schema
How do I create custom Rust lints for project-specific code patterns?

You create custom Rust lints using the Dylint framework, which supports defining both AST-level (EarlyLintPass) and type-checked (LateLintPass) lints to enforce project-specific code conventions.

What is Dylint and how does it help enforce team conventions in Rust?

Dylint is a framework for building custom Rust lint libraries. It allows you to enforce team conventions by creating reusable lint rules that integrate into your standard Rust development workflow.

Can I use clippy_utils and rustc internals when writing custom lints with Dylint?

Yes, writing custom lints with Dylint integrates directly with rustc internals and leverages clippy_utils to generate diagnostics for both AST-level and type-checked lint passes.

How do I write a Rust lint to enforce explicit expect messages instead of unwrap?

You can write a custom Rust lint using Dylint to detect unwrap() calls and enforce that they are replaced with expect() messages, ensuring explicit error handling across your codebase.

What is the difference between EarlyLintPass and LateLintPass in Rust linting?

EarlyLintPass operates on the AST level before type checking, while LateLintPass operates on type-checked code, allowing custom Rust lints to analyze fully resolved types and expressions.

Are there testing utilities available for developing custom Rust lints?

Yes, this approach to writing custom Rust lints provides structured development with templates and testing utilities to validate lint behavior before integrating them into your workflow.