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.5 | $0.00022 | $0.02289 |
| Sonnet 5.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 2mo 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.
- 2mo 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 2mo ago), licensed MIT. It adds 54 tokens to every session and 5,722 once invoked, about $0.0002 per session on Opus 5.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.
writing-rust-lints compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| writing-rust-lintsdelightful-ai/beads-rs | Skill | 24 | 2mo ago | MIT | A | 54 | Claude Code |
| rust-patternsaffaan-m/ECC | Skill | 298k | 4d ago | MIT | A | 28 | Claude Code, Kiro |
| update-v8-versionopeninterpreter/openinterpreter | Skill | 69k | 3d ago | Apache-2.0 | A | 86 | Codex |
| dd-code-generationDataDog/pup | Skill | 1.0k | yesterday | Apache-2.0 | A | 16 | Claude Code |
| omh-rustrlaope/oh-my-hermes | Skill | 5.2k | yesterday | MIT | A | 74 | Claude Code, Codex |
| swiftidebosun-ai/swiftide | Skill | 802 | yesterday | MIT | A | 47 | Claude Code, Codex |
| azure-keyvault-secrets-rustbenjaminasterA/antigravity-awesome-skills | Skill | 461 | yesterday | MIT | A | 0 | Claude Code, Codex |