Skip to content
Back to skills

Graph Mincut

ASecurity

Find the weakest boundary in a dependency or knowledge graph with an exact minimum cut (@ruvector/mincut-wasm via ruvector). Use when the user asks where to split a module, which files are loosely coupled, what cluster a node belongs to, or how to partition work between agents. Skip for shortest paths or simple neighbour lookups (use agentdb_graph-query k-hop).

  • 82,861 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
ai-agentsgonodebackend

Works with

  • cli
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 9, 2026

npx -y skills add ruvnet/ruflo --skill graph-mincut --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graph Mincut?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graph Mincut
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ruvnet-graph-mincut-6b6e3db7/badge)](https://www.skillsdirectory.com/skills/ruvnet-graph-mincut-6b6e3db7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graph-mincut
description: "Find the weakest boundary in a dependency or knowledge graph with an exact minimum cut (@ruvector/mincut-wasm via ruvector). Use when the user asks where to split a module, which files are loosely coupled, what cluster a node belongs to, or how to partition work between agents. Skip for shortest paths or simple neighbour lookups (use agentdb_graph-query k-hop)."
---

# Graph Min-Cut and Partitioning

A minimum cut is the cheapest set of edges whose removal splits a graph in two. On a code graph it marks where a module boundary costs least; around one node it marks the edge of that node's cluster.

## Tools

| Question | Call |
|---|---|
| Natural split points in this codebase | `npx @claude-flow/cli analyze boundaries src/` (alias `mincut`) |
| Which cluster this knowledge-graph node is in, and what its weakest boundary is | `mcp__claude-flow__agentdb_graph-pathfinder` with `algorithm: "dynamic-mincut"` |
| Ranked neighbours, influence | same tool with `algorithm: "personalized-pagerank"` |

Example pathfinder call:

```json
{ "seedNodeId": "entity:auth-module", "query": "auth boundary", "algorithm": "dynamic-mincut",
  "depth": 3, "threshold": 0, "complexityBudget": { "maxMillis": 2000 } }
```

The response includes `paths` (the nodes on the seed's side of the cut, nearest first) and a `mincut` block with `cutValue`, `cutEdges`, `seedSideSize`, `otherSideSize` and `backend`.

## Reading the result

- `backend: "mincut-wasm"` means the exact cut came from the wasm solver that `ruvector` brings in. It is about 30x faster than the JS Stoer-Wagner fallback at 1,000 nodes (187 ms vs 6 s).
- `backend: "js-fallback"` means ruvector is not installed. The JS fallback only runs on neighbourhoods of 300 nodes or fewer. Run `npm i ruvector` to lift that limit.
- A `cutValue` close to the seed's own degree means the seed is weakly attached, so the cut isolates the seed rather than a cluster. Try a larger `depth`.
- `spectral-sparsify` and `connected-component-churn` are k-hop approximations for now. The response marks them with `implementation`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.