ruvnet avatar

Vector Cluster

Groups code files by semantic similarity using graph-based community detection (spectral clustering or Louvain) via ruvector's graph hooks. You point it at a collection of files and it identifies natural clusters based on how the code relates. Useful when you're trying to understand the architecture of an unfamiliar codebase or find related functionality scattered across a project. Fair warning: the top-level cluster command in ruvector 0.2.25 is reserved for distributed operations that aren't ready yet, so you're working with the graph-cluster and graph-mincut hooks specifically. Outputs JSON with cluster assignments and cohesion scores that help you spot tight groupings versus loose associations.

skills.sh installs
729
GitHub stars
81.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add ruvnet/ruflo --skill vector-cluster --agent claude-code

Installs into .claude/skills of the current project.

Files

Vector Cluster

Cluster vectors in a namespace by semantic similarity using ruvector.

When to use

Use this skill when you have a collection of embeddings and want to discover natural groupings. Clustering reveals themes, identifies outliers, and helps organize large vector collections.

Steps

  1. Ensure ruvector@0.3.13 is available:
    npm ls ruvector 2>/dev/null | grep '0.3.3' || npm install ruvector@0.3.13
    
  2. Run clustering — in ruvector@0.3.13 the only working clustering is via hooks graph-cluster (spectral/Louvain over a code graph). The top-level cluster command is reserved for distributed cluster ops and is currently "Coming Soon" upstream.
    npx -y ruvector@0.3.13 hooks graph-cluster <files...>
    npx -y ruvector@0.3.13 hooks graph-mincut <files...>
    
  3. Review output — JSON with cluster assignments, community labels, and edges. If you see "graph.nodes is not iterable", run hooks init first to seed the graph state.
  4. Store results: mcp__plugin_ruflo-core_ruflo__memory_store({ key: "clusters-PROJECT-TIMESTAMP", value: "CLUSTER_ASSIGNMENTS", namespace: "vector-clusters" })

Interpreting results

Sponsors

Details

Repository
github.com/ruvnet/ruflo
Categories
Frontend Development, AI & Agent Building
First seen
Jun 3, 2026

More from ruvnet/ruflo

All 236
1diodeinc avataridiomatic-zenerdiodeinc/pcbStyle rules and idioms for writing high-quality Zener HDL code. Use when writing, reviewing, or refactoring `.zen` files — modules, reference designs, or board 724skills.sh installs
2ruvnet avatarbrowser-replayruvnet/rufloReplay a recorded session trajectory against the same URL or a mutated variant; uses browser-selectors embedding similarity to recover from DOM drift721skills.sh installs
3joellewis avatarfixed-income-sovereignjoellewis/finance_skillsAnalyze US Treasury securities and interest rate risk: bond pricing, yield curve construction, duration, convexity, TIPS, and forward/spot rate analysis. Use wh718skills.sh installs
4mindrally avatarfirebase-developmentmindrally/skillsFirebase development guidelines for Firestore, Authentication, Functions, and Storage with TypeScript and Angular.715skills.sh installs
5uniswap avatarv4-hook-generatoruniswap/uniswap-aiGenerate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, ME714skills.sh installs
6alirezarezvani avatardependency-auditoralirezarezvani/claude-skillsAudit and manage dependencies across multi-language projects. Identifies vulnerabilities, license conflicts, transitive dependency risks, and safe-upgrade paths711skills.sh installs