rmc-attribute-audit

Locate Rust items with matching attributes or doc-comment markers and connect findings to usage.

29|5|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-attribute-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rmc-attribute-audit
Source: https://github.com/molaco/rust-code-mcp/tree/main/skills/rmc-attribute-audit
Command: npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-attribute-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It identifies where Rust items carry specific attributes or doc-comment markers and helps you prioritize follow-up by pairing that metadata with usage signals.

Core Features & Use Cases

  • Per-item attribute fingerprint: Extracts all #[...] attributes and /// doc-comment lines for a target item to render precise context without reading the full file.
  • Workspace-wide attribute search: Finds matching attributes and doc-comment bodies across a crate/workspace with match location tagging for clean triage.
  • Usage-aware combination: Correlates each finding with who_uses / who_uses_summary so you can assess whether deprecations or must-use contracts still have real consumers.
  • Common audit recipes: Deprecation rollout, serialization surface inventory, must-use compliance, forward-compat checks (non_exhaustive), and test-only detection (cfg(test)).

Quick Start

Build the hypergraph for your codebase and then search for all deprecated items in crate X by running the attribute search using the pattern #[deprecated.

Frequently Asked Questions about rmc-attribute-audit

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

FAQPage Schema
How do I find all deprecated Rust attributes in a workspace?

To find deprecated Rust attributes in a workspace, you can search across the entire crate using prefix-anchored substring matching on attribute strings like #[deprecated. The audit correlates each finding with usage signals to help you assess whether deprecated items still have real consumers.

Can I check must-use compliance and downstream usage in Rust?

Yes, you can check must-use compliance by locating items with matching attributes and pairing that metadata with downstream caller analysis. By combining attribute matches with who_uses_summary, you can assess whether must-use contracts still have active consumers.

How do I audit Rust doc comments across a codebase?

You can audit Rust doc comments by performing prefix-anchored substring matching across /// doc-comment bodies. This workspace-wide search tags match locations for clean triage, allowing you to extract precise context without reading the full source file.

Do I need a prebuilt HIR workspace to inspect Rust attributes?

Yes, inspecting Rust attributes requires a prebuilt HIR workspace hypergraph. You must build the hypergraph for your codebase first, and then you can run targeted attribute searches to plan safe refactors.

What is the best way to plan a deprecation migration in Rust?

The best way to plan a deprecation migration is to identify items carrying specific attributes and connect those findings to downstream usage. This usage-aware combination allows you to prioritize follow-ups based on whether deprecated items still have real consumers.

Can I identify items with non_exhaustive or cfg(test) attributes in Rust?

Yes, you can identify items with non_exhaustive or cfg(test) attributes by running targeted workspace-wide attribute searches. These common audit recipes help you perform forward-compat checks and detect test-only code efficiently.