Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

vector-cluster — Claude Code skill: install and use

Clusters code files with graph community detection. Use it to inspect related areas of a project and spot outliers.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill vector-cluster -a claude-code
Open on GitHub

What vector-cluster does

This skill runs [email protected] to create code-graph clusters from supplied files. It calls hooks graph-cluster with spectral or Louvain community detection, and can also run hooks graph-mincut. The output is JSON containing cluster assignments, community labels, and graph edges.

It checks for [email protected] and installs the package with npm when needed. Results can be stored with the memory MCP tool under the vector-clusters namespace. If graph.nodes is not iterable appears, run hooks init before clustering.

The top-level cluster command is the wrong path here because [email protected] reserves it for distributed cluster operations. Its --namespace, --k, and --density flags will not work. Use the hooks commands instead, or run k-means in your own code against vectors in AgentDB.

What it helps with

  • group code files by graph communities
  • find related code areas
  • detect outlier files
  • store cluster assignments in agent memory

Example prompts for the agent

  • Run vector-cluster for `src/*.ts` with `hooks graph-cluster`.
  • Cluster `src/app.ts` and `src/api.ts`, then show the community JSON.
  • Run `hooks init` first, then use vector-cluster on `src/*.ts`.

How to install vector-cluster

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill vector-cluster -a claude-code

2Manually: put the files in place

~/.claude/skills/vector-cluster/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vector-cluster/

From the same set104

The whole set →
ruflo ruvnet This skill adds multi-agent orchestration, memory, routing, and MCP tools to a project. Use it for swarm tasks and multi-step workflows. Claude Code CX Codex Cursor +1 4,000installs Swarm Orchestration ruvnet Skill for managing agent swarms with parallel execution, dynamic topology, and automatic load balancing. Use when a single agent is not enough and you need to orchestrate specialists of different types. Claude Code CX Codex Cursor +1 2,100installs github-project-management ruvnet Turns issue triage and board upkeep into gh and ruv-swarm calls: labels, subtasks, duplicate lookup. Useful when the tracker holds more tickets than order. Claude Code CX Codex Cursor +1 1,400installs github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs stream-chain ruvnet Chains sequential agent steps together using streaming JSON flow and provides ready-to-run pipelines. Claude Code CX Codex Cursor +1 1,200installs flow-nexus-swarm ruvnet Deploy cloud-based AI agent swarms and define event-driven workflows with message queues. Use it to coordinate tasks, inspect runs, and scale a swarm. Claude Code CX Codex Cursor +1 1,200installs performance-analysis ruvnet Detects bottlenecks in Claude Flow swarms, profiles agent operations, and generates reports with actionable optimization recommendations. Claude Code CX Codex Cursor +1 1,200installs

Similar

voice-ai-development sickn33 This skill guides work on voice applications and real-time voice agents. Use it when a task involves speech recognition, speech synthesis, or streamed audio. Claude Code CX Codex Cursor +1 959installs agent-tool-builder sickn33 A skill for writing tool schemas an agent can actually use: JSON Schema, descriptions, validation, error paths. Useful when it keeps calling the wrong function. Claude Code CX Codex Cursor +1 958installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs media-use heygen-com Finds or generates media for HyperFrames videos, including voiceovers, music, cutouts, and color grades. Stores files locally in assets. Claude Code CX Codex Cursor +1 1,100,000installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs subagent-driven-development Jesse Vincent This skill runs an implementation plan through fresh subagents for independent tasks and reviews each result. Use it for multi-step work in one session. Claude Code CX Codex 237,746installs orchestration stablyai Coordinates supervised Orca workers with task DAGs, decision gates, and threaded messages. Fits workflows that split work across multiple agents. Claude Code CX Codex Cursor +1 349,200installs

Questions about vector-cluster

How do I install vector-cluster in Claude Code?

Run npx skills add ruvnet/ruflo --skill vector-cluster -a claude-code, then run npx skills add ruvnet/ruflo --skill vector-cluster -a claude-code again. The skill file is placed at ~/.claude/skills/vector-cluster/SKILL.md.

What does vector-cluster do?

It clusters supplied code files through graph community detection in [email protected]. It returns JSON with cluster assignments, community labels, and edges.

Why does cluster with --k fail?

In [email protected], the top-level cluster command is for distributed cluster operations and does not accept --namespace, --k, or --density. Use hooks graph-cluster or hooks graph-mincut for file clustering.

Source text

SKILL.md · MIT
---
name: vector-cluster
description: Cluster code by graph community detection via npx [email protected] hooks graph-cluster (spectral / Louvain)
argument-hint: "<namespace> [--k N]"
allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_list
---

# 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 [email protected] is available**:
   ```bash
   npm ls ruvector 2>/dev/null | grep '0.3.3' || npm install [email protected]
   ```
2. **Run clustering** — in [email protected] 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.
   ```bash
   npx -y [email protected] hooks graph-cluster <files...>
   npx -y [email protected] 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

- **High cohesion** (>0.85): tight, well-defined cluster
- **Medium cohesion** (0.6-0.85): related but diverse content
- **Low cohesion** (<0.6): loose grouping, try higher resolution
- **Outliers**: novel or anomalous files worth investigating

## Caveats

- `cluster --namespace ... --k N` and `cluster --density` are **not** valid in [email protected] — those flags fall through to the distributed-cluster command, which only accepts `--status`, `--join`, `--leave`, `--nodes`, `--leader`, `--info`.
- For namespaced k-means over arbitrary embeddings, run k-means in your own code against vectors stored in AgentDB.

© ruvnet · MIT · ruvnet/ruflo

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor