원클릭으로
graph-structure
Structural graph analysis — cycles, SCCs, topological order, articulation points, bridges, k-core, dependency layers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Structural graph analysis — cycles, SCCs, topological order, articulation points, bridges, k-core, dependency layers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Build, reload, and maintain the Mycelium symbol index — the prerequisite for every other Skill.
One-shot architecture tracing — get entry points, call graph neighborhood, and source snippets for any natural-language question about how code works.
Look up symbols, kinds, ancestors, descendants, siblings — the foundation tools any agent reaches for first.
Navigate the call graph — callers, callees, call trees, entry points, dead and isolated symbols.
Navigate the import graph — direct imports, import trees, importers (who pulls this in).
Rank symbols by importance — PageRank, betweenness, fan-in/out, hub detection, top-file diagnostics.
| name | graph-structure |
| description | Structural graph analysis — cycles, SCCs, topological order, articulation points, bridges, k-core, dependency layers. |
| allowed-tools | ["mcp__mycelium__get_stats","mcp__mycelium__get_graph_metrics","mcp__mycelium__detect_cycles","mcp__mycelium__get_scc_groups","mcp__mycelium__topological_sort","mcp__mycelium__find_articulation_points","mcp__mycelium__find_bridge_edges","mcp__mycelium__get_biconnected_components","mcp__mycelium__get_k_core","mcp__mycelium__get_dependency_layers","mcp__mycelium__get_strongly_connected_components","mcp__mycelium__get_wcc","mcp__mycelium__get_degree_histogram","mcp__mycelium__find_cycle_members"] |
| category | analysis |
| icon | 🕸️ |
| marketplace_examples | [{"query":"Are there circular dependencies in my imports?","tool":"mcp__mycelium__detect_cycles"},{"query":"Find the strongly connected components in the call graph","tool":"mcp__mycelium__get_scc_groups"},{"query":"Topologically sort all modules by dependency order","tool":"mcp__mycelium__topological_sort"}] |
graph-structure — what shape is this graph?This Skill bundles 14 structural-analysis tools. Where centrality ranks nodes by importance, graph-structure answers questions about the graph's overall shape: cycles, connected components, articulation points, layering.
Includes detect_cycles and get_dependency_layers — two of the top-10 most useful tools per the v0.1.1 external evaluation.
Use when:
Do NOT use when:
centrality.call-graph or reachability.| Developer question | Tool |
|---|---|
| "Are there circular dependencies in my imports?" | mcp__mycelium__detect_cycles |
| "Find the strongly connected components in the call graph" | mcp__mycelium__get_scc_groups |
| "Topologically sort all modules by dependency order" | mcp__mycelium__topological_sort |
| "Which nodes are articulation points — removing one breaks the graph?" | mcp__mycelium__find_articulation_points |
| "Give me overall graph metrics for this codebase" | mcp__mycelium__get_graph_metrics |
get_stats — high-level summaryNode count, edge count, edge-kind histogram, language breakdown. The "is the index sane" sanity check.
mcp__mycelium__get_stats({})
→ { "nodes": 12453, "edges": 47821, "languages": ["rust", "python"], "by_edge_kind": { "calls": 28301, "imports": 11320, "extends": 213, "implements": 7987 } }
get_graph_metrics — density, diameter, average degree⚠️ Performance: see #153. On graphs > 5k nodes, may exceed default time budget — v0.1.4 adds time_budget_ms.
detect_cycles ⭐ — find every cycleThe single most-recommended structural tool. Returns the list of cycles as ordered node sequences.
mcp__mycelium__detect_cycles({ "edge_kind": "imports", "limit": 50 })
→ { "cycles": [["src/a.py", "src/b.py", "src/a.py"], ...], "count": 3 }
get_scc_groups — strongly connected componentsA cycle in the graph corresponds to an SCC of size ≥ 2. Returns the components, sorted by size.
topological_sort — dependency orderReturns nodes in topological order. Fails (or returns an error envelope) if the graph has cycles. Use detect_cycles first to confirm acyclicity.
find_articulation_points — single-node bottlenecksNodes whose removal disconnects the graph. Useful for identifying refactor-risk choke points.
find_bridge_edges — single-edge bottlenecksEdges whose removal disconnects the graph. Often correspond to load-bearing imports or call chains.
get_biconnected_components — robust modulesMaximal subgraphs with no articulation points internally. These are the "robust modules" of the codebase — chunks that stay connected even when individual nodes are removed.
get_k_core — densely-connected subgraphThe k-core decomposition — useful for finding the densely-connected "hot" parts of the codebase.
get_dependency_layers ⭐ — layered orderingStratifies nodes by dependency depth (0 = leaves, 1 = depends only on leaves, etc.). The build-order view. One of the top-10 most useful tools.
get_scc — SCC membership for one symbolCheaper than get_scc_groups if you only need to know "which cycle does this symbol belong to".
get_wcc — weakly connected components⚠️ Performance: see #153.
get_degree_histogram — degree distribution⚠️ Performance: see #153.
find_cycle_members — which symbols are in cyclesGiven an edge kind, lists every symbol that's part of any cycle.
detect_cycles --edge-kind imports.topological_sort (after confirming no cycles).get_scc_groups + get_biconnected_components.find_articulation_points + find_bridge_edges.get_dependency_layers.Four tools (get_graph_metrics, get_wcc, get_degree_histogram, find_articulation_points) currently exceed budget on the 926-node Mycelium-core index per #153. v0.1.4 introduces time_budget_ms + partial-result envelopes.
mycelium detect-cycles --edge-kind imports --limit 50 --format=json
mycelium get-dependency-layers --format=json
mycelium topological-sort --edge-kind calls
Per RFC-0090. tests/parity.test.json uses a 5-node fixture with a small cycle to exercise cycle / SCC / topo / articulation in one place.
centrality — for per-node importance scores.call-graph, import-graph, inheritance — for the edges that this Skill analyses.