rmc-symbol-forensics

Trace Rust symbol imports, references, and rust-analyzer cross-links across crates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you understand the real-world impact of a Rust symbol by locating where it is imported, referenced, and referenced via rust-analyzer cross-links, so you can make safer refactor or deletion decisions.

Core Features & Use Cases

  • Single-symbol deep dive: Produces a structured forensics report for one qualified symbol, including its declaration context and downstream usage patterns.
  • Import and usage intelligence: Compares who_imports, who_uses, and who_uses_summary to distinguish structural import-only presence from non-import references, including Test/Other consumer breakdowns.
  • Verification via rust-analyzer references: Uses find_references to catch additional reference types that hypergraph indexing might miss (e.g., macro-introduced or cfg-gated cases).
  • Risk-framing outputs: Applies decision frames (safe-to-delete, test-only, critical-path, shared-API, imported-as-bound) and recommends next actions, optionally extending to type method fan-in.

Quick Start

Ask for a single-symbol report by providing the symbol’s qualified name for a deep dive on its declaration, importers, non-import references, and rust-analyzer cross-references.

Frequently Asked Questions about rmc-symbol-forensics

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

FAQPage Schema
How do I check all call sites and references for a Rust symbol before refactoring?

To check all call sites for a Rust symbol before refactoring, you need a forensics report that cross-validates structural imports, consumer usage, and rust-analyzer find_references verification. This process distinguishes structural import-only presence from actual non-import references to support safe refactoring decisions.

How do I know if a Rust symbol is safe to delete from my codebase?

Determining if a Rust symbol is safe to delete requires analyzing importers, consumer usage patterns, and type method fan-in across the workspace. A risk-framing verdict applies decision frames like test-only or critical-path to confirm whether downstream deletion impacts shared APIs.

Does rust-analyzer find_references catch macro-introduced or cfg-gated Rust symbol references?

Yes, rust-analyzer find_references catches macro-introduced or cfg-gated Rust symbol references that standard hypergraph indexing might miss. It verifies additional reference types during workspace-level forensics across crates to ensure accurate cross-validation of qualified items.

What's the best way to analyze cross-crate Rust dependency impact for a single qualified item?

The best way to analyze cross-crate Rust dependency impact for a single qualified item is comparing who_imports, who_uses, and who_uses_summary outputs. This distinguishes structural import presence from non-import references and provides a Test/Other consumer breakdown for risk assessment.

Do I need to build a hypergraph before analyzing Rust symbol usage in a workspace?

Yes, you need prerequisite hypergraph building before analyzing Rust symbol usage in a workspace. This hypergraph indexing is required to coordinate who_imports, who_uses, and read_file_content context rendering for accurate downstream cross-validation.

Why does my Rust symbol show as imported but has no direct usage in the codebase?

A Rust symbol showing as imported with no direct usage indicates structural import-only presence rather than active non-import references. Comparing who_imports against who_uses_summary reveals this pattern, potentially categorizing the symbol as imported-as-bound or safe-to-delete.