rmc-reexport-chain

Trace Rust pub use re-export chains and report hop-level visibility.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a Rust item is exposed through multiple pub use facade modules, it becomes unclear which canonical definition is actually being re-exported and how far the public API is “disguised” behind intermediate hops.

Core Features & Use Cases

  • Re-export chain tracing: Walks pub use re-export edges breadth-first (with cycle detection) up to 8 hops to show where an item is visible from each facade depth.
  • Pub type masquerading detection (heuristic): Flags cases where a module declares a pub type alias whose name overlaps with a pub use binding in the same module, indicating an alias may be acting as a re-export disguised as a type.
  • Facade hygiene auditing: Helps decide whether to keep long facade chains or simplify by dropping intermediate hops and flattening to the canonical target.

Quick Start

Build the hypergraph index for your workspace, then run re_export_chain for the canonical target you want to trace and review the hop-by-hop visibility links.

Frequently Asked Questions about rmc-reexport-chain

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

FAQPage Schema
How do I trace Rust pub use re-export chains through facade modules?

Tracing Rust re-export chains requires walking pub use re-export edges breadth-first up to 8 hops with cycle detection. This reports hop-level visibility to show where an item is exposed from each facade depth.

How can I detect if a Rust pub type alias is masquerading as a re-export?

You can detect pub type masquerading by flagging cases where a module declares a pub type alias whose name overlaps with a pub use binding in the same module, indicating an alias may be acting as a re-export disguised as a type.

How do I audit Rust public API hygiene for multi-hop facade modules?

You audit Rust public API hygiene by tracing re-export chains and correlating suspected re-export disguises with audit findings using directory-scoped parameters to decide whether to drop intermediate hops and flatten to the canonical target.

What is the best way to resolve ambiguity when a Rust item is exposed through multiple pub use facades?

The best way to resolve ambiguity when a Rust item is exposed through multiple pub use facades is to trace the re-export chains to identify the canonical definition being re-exported and how far the public API is disguised behind intermediate hops.

Do I need to build a hypergraph index before tracing Rust re-exports?

Yes, tracing Rust re-exports requires calling build_hypergraph first to index your workspace, then running re_export_chain for the canonical target you want to trace and reviewing the hop-by-hop visibility links.

When should I flatten long facade chains in a Rust codebase?

You should flatten long facade chains in a Rust codebase when auditing reveals that intermediate hops are potentially misleading, and simplifying by dropping them to expose the canonical target improves public API hygiene.