Borrowing it
Nothing to install: this file belongs to delightful-ai/beads-rs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/delightful-ai/beads-rs/main/.claude/skills/writing-rust-lints/SKILL.mdgit clone --depth 1 https://github.com/delightful-ai/beads-rsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/delightful-ai/beads-rs/writing-rust-lints)<a href="https://agentmods.dev/skills/delightful-ai/beads-rs/writing-rust-lints"><img src="https://agentmods.dev/badge/skills/delightful-ai/beads-rs/writing-rust-lints/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/delightful-ai/beads-rs/writing-rust-lints"><img src="https://agentmods.dev/badge/skills/delightful-ai/beads-rs/writing-rust-lints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.05722 |
| Opus 5 | $0.00027 | $0.02861 |
| Sonnet 5 | $0.00011 | $0.01144 |
| Haiku 4.5 | $0.00005 | $0.00572 |
Grade A, and why
writing-rust-lints scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 809 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Rust Lints with Dylint
Create custom Rust lints that run as dynamic libraries via Dylint.
When to Use
- Creating project-specific lints for code patterns
- Enforcing team conventions that Clippy doesn't cover
- Building reusable lint libraries
- Any task involving
LateLintPass,EarlyLintPass, or rustc internals
Quick Start
cargo dylint new my_lint_name
cd my_lint_name
# Edit src/lib.rs, ui/main.rs
cargo build && cargo test
Macro Selection
digraph macro_selection {
"Need custom lint?" [shape=diamond];
"Has state/config?" [shape=diamond];
"Multiple lints?" [shape=diamond];
"Use declare_late_lint!" [shape=box];
"Use impl_late_lint!" [shape=box];
"Manual register_lints" [shape=box];
"Need custom lint?" -> "Has state/config?" [label="yes"];
"Has state/config?" -> "Multiple lints?" [label="no"];
"Has state/config?" -> "Use impl_late_lint!" [label="yes"];
"Multiple lints?" -> "Use declare_late_lint!" [label="no"];
"Multiple lints?" -> "Manual register_lints" [label="yes"];
}
declare_late_lint!: Single lint, no state. Generates everything.impl_late_lint!: Single lint WITH state/config. Pass initializer.- Manual
register_lints: Multiple lints in one library. Usedylint_library!().
NEVER mix: If using declare_late_lint!, do NOT manually write dylint_library!() or register_lints.
EarlyLintPass (AST-level)
For lints that don't need type information (AST-only):
#![feature(rustc_private)]
extern crate rustc_ast;
extern crate rustc_lint;
extern crate rustc_session;
use rustc_ast::ast::{Expr, ExprKind};
use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
use rustc_session::{declare_lint, declare_lint_pass};
declare_lint! {
pub MY_EARLY_LINT,
Warn,
"description"
}
declare_lint_pass!(MyEarlyLint => [MY_EARLY_LINT]);
impl EarlyLintPass for MyEarlyLint {
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) {
// AST-level checks - NO type info available
if let ExprKind::MethodCall(method_call) = &expr.kind {
if method_call.seg.ident.name.as_str() == "unwrap" {
cx.lint(MY_EARLY_LINT, |diag| {
diag.primary_message("found unwrap");
});
}
}
}
}
// IMPORTANT: Still need this for Dylint
dylint_linting::dylint_library!();
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 809 lines · 54 tokens per session scan A 9f06229ba705
writing-rust-lints is a skill published in the GitHub repository delightful-ai/beads-rs (24 stars, last pushed 22d ago), licensed MIT. It adds 54 tokens to every session and 5,722 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
omh-rust
This is a Hermes-native rust workflow skill.
bevy-ecs
Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the Time resource for frame-rate-independent motion. Use when building or debugging a Bevy game in Rust — when the user mentions…
rust-project
Modern Rust project architecture guide for 2025. Use when creating Rust projects (CLI, web services, libraries). Covers workspace structure, error handling, async patterns, and idiomatic Rust best practices.
gcs-rust-download-object-api
Fix "DownloadObjectRequest not found" error in google-cloud-storage Rust crate. Use when: (1) Trying to download objects from GCS using the Rust SDK, (2) Looking for a download request type in http::objects::download module, (3) Compile error about missing type. The downloadobject method uses GetObjectRequest from the…
azure-keyvault-secrets-rust
Client library for Azure Key Vault Secrets — secure storage for passwords, API keys, and other secrets.