rmc-dependency-metric

Rank Rust workspace crates by instability and abstractness metrics.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you understand architectural coupling in a Rust workspace by ranking crates with Robert Martin-inspired instability and abstractness metrics, so you can quickly spot cores, workhorses, facades, and risky rigid components.

Core Features & Use Cases

  • Workspace-wide per-crate ranking: Computes efferent (fan-out), afferent (fan-in), instability, abstractness, and item counts across local crates.
  • Multiple sortable views: Sorts by instability, abstractness, afferent, efferent, or item_count to match different architecture questions.
  • Drill-down path: Uses the top-ranked crate to guide follow-up symbol-level edge inspection with per-crate crate_edges.

Quick Start

Build the workspace hypergraph, then run crate_dependency_metric with sort_by="afferent" and an appropriate top_n to get the architectural core ranking for your local crates.

Frequently Asked Questions about rmc-dependency-metric

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

FAQPage Schema
How do I measure architectural instability in a Rust workspace?▼

You measure architectural instability in a Rust workspace by ranking crates with Robert Martin-style metrics, calculating efferent and afferent dependencies to identify cores, facades, and rigid layers.

What is the best way to find the architectural core of my Rust crates?▼

The best way to find the architectural core is to rank crates by afferent dependencies using dependency metrics, revealing the most depended-upon workhorses and facades in your local workspace.

How do I calculate abstractness and instability metrics for Rust crates?▼

You calculate abstractness and instability metrics for Rust crates by applying a dependency metric tool that evaluates workspace coupling, sorting results to reveal the architectural shape of local components.

Do I need to build a hypergraph before analyzing Rust crate dependencies?▼

Yes, you need to build a hypergraph before analyzing Rust crate dependencies, because the instability and abstractness ranking requires a prebuilt workspace hypergraph to process local crate relationships.

Can I sort Rust crate dependency metrics by fan-in and fan-out?▼

Yes, you can sort Rust crate dependency metrics by afferent or efferent counts, as well as instability, abstractness, or item count, matching different architectural review questions.

What should I do after identifying an unstable Rust crate in my architecture review?▼

After identifying an unstable Rust crate, you should follow up with per-crate edge inspection to drill down into symbol-level dependencies and understand the specific coupling causing architectural risk.