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

vector-hyperbolic — Claude Code skill: hyperbolic embeddings

Places hierarchical data in the Poincaré ball: radius from tree depth, direction from a text embedding. For dependency trees, ontologies, class hierarchies.

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

What vector-hyperbolic does

The skill lays a hierarchy out in the Poincaré ball. A node's radius comes from its depth in the tree, its direction from a text embedding. Parent and child land closer than nodes in different branches, and you need fewer dimensions than a Euclidean layout would take.

It first checks for [email protected] and falls back to npm install [email protected] if the package is missing. Direction comes from npx -y [email protected] embed text "..." -o concept.vec.json. Distance goes through the MCP tool embeddings_hyperbolic distance at curvature -1, which returns success: false for a point on or outside the ball rather than a null. Placed coordinates and neighbours go into memory_store under the hyperbolic-embeddings namespace.

Here is the trap: a text embedding carries no depth. ONNX sentence vectors are unit-norm, so remapping puts every point at the same radius, tanh(0.5) = 0.4621, and the parent-child gap comes out about the same as the cross-branch gap. Set the radius yourself from depth, say r = tanh(depth * k), then measure on your own tree. There is no --model poincare flag in [email protected] even though the argument hint advertises one, so don't copy that call as-is.

What it helps with

  • place a dependency tree by depth instead of text similarity
  • compare geodesic distances between modules
  • spot loosely coupled subtrees in the import graph
  • verify that a node's radius tracks its depth, not its vector length
  • keep placed coordinates and neighbours in agent memory

Example prompts for the agent

  • Put the repo's module tree into the Poincaré ball: take the radius from node depth and the direction from `npx -y [email protected] embed text "module graph"`
  • Compute the geodesic distance between `core` and `plugins/ruflo-ruvector` and tell me which branches they sit in
  • Check on our tree that parent-child distance is clearly smaller than the distance between different branches

How to install vector-hyperbolic

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

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

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

computer-use-agents sickn33 Guides the architecture of AI agents that control screens, cursors, and keystrokes using Anthropic Computer Use or OpenAI Operator. Useful for sandboxed desktop and GUI automation. 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 convex-create-component convex A skill to design and build reusable Convex components with isolated tables and a clear API boundary. Useful when you need to extract backend logic into a self-contained module or package an integration that owns its own data. Claude Code CX Codex Cursor +1 130,600installs debug Yeachan-Heo Diagnoses broken OMC sessions, workflow failures, and repo state issues using traces and targeted reproduction. Claude Code CX Codex Cursor +1 629installs ce-pov EveryInc Forms a grounded verdict on whether an external solution, document, or approach fits your project. Judges only by evidence from your codebase and constraints. Claude Code CX Codex Cursor +1 1,000installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. Claude Code CX Codex 282,859installs

Questions about vector-hyperbolic

How do I install vector-hyperbolic in Claude Code?

Run npx skills add ruvnet/ruflo --skill vector-hyperbolic -a claude-code. The skill lands at ~/.claude/skills/vector-hyperbolic/SKILL.md with its steps and the tools it is allowed to call.

What does vector-hyperbolic do?

It places hierarchical data in the Poincaré ball, with each node's radius set by its depth and its direction taken from a text embedding. Distances are geodesic, so closeness in the tree shows up as a number.

Why does every point sit at the same radius after remapping the embedding?

ONNX vectors such as all-MiniLM-L6-v2 are unit-norm, so remapping pins each point at tanh(0.5) = 0.4621 and the depth disappears. Assign the radius from node depth, then check the distances against your own tree.

Source text

SKILL.md · MIT
---
name: vector-hyperbolic
description: Place hierarchical data in the Poincare ball using depth for the radius and npx [email protected] embed text for direction (a unit-norm text embedding alone has no depth)
argument-hint: "<text> [--model poincare]"
allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search
---

# Vector Hyperbolic

Embed hierarchical data in the Poincare ball model using `ruvector`.

## When to use

Use this skill when your data has inherent hierarchy — dependency trees, module structures, taxonomies, org charts, ontologies. Hyperbolic space captures hierarchical distances with far fewer dimensions than Euclidean embeddings.

## Steps

1. **Ensure [email protected] is available**:
   ```bash
   npm ls ruvector 2>/dev/null | grep '0.3.3' || npm install [email protected]
   ```
2. **Know what a text embedding can and cannot give you.** ONNX sentence embeddings (all-MiniLM-L6-v2) are unit-norm. Rescaling or exp-mapping a unit vector puts every point at the same radius (the MCP `embeddings_hyperbolic convert` gives tanh(0.5) = 0.4621 for all of them), so the radius carries no depth and parent/child distances come out nearly the same as cross-branch distances. Projecting a text embedding does not create hierarchy.
3. **Put the hierarchy in yourself.** Choose each node's radius from its depth in the tree (root near 0, leaves near 1, for example r = tanh(depth * k)), and take its direction from the text embedding, or use embeddings trained on the tree's edges. Measure on your own tree: parent-child distance should be clearly smaller than cross-branch distance.
   ```bash
   npx -y [email protected] embed text "hierarchical concept" -o concept.vec.json   # direction only
   ```
4. **Geodesic distance** for points strictly inside the unit ball: `d(u, v) = arcosh(1 + 2 * ||u-v||^2 / ((1-||u||^2)(1-||v||^2)))`. The MCP `embeddings_hyperbolic distance` computes it (curvature -1) and returns `success: false` for a point on or outside the ball rather than a null distance.
5. **Store results**:
   `mcp__plugin_ruflo-core_ruflo__memory_store({ key: "hyperbolic-CONCEPT", value: "COORDINATES_AND_NEIGHBORS", namespace: "hyperbolic-embeddings" })`

## Caveats

- [email protected] has no `--model poincare` flag; `attention hyperbolic` is the Poincare-ball attention op, not a text-embedding projector.
- "Norm encodes depth" only holds when you set the radius from depth yourself (step 3). It does not come from the embedding.
- If you need a hyperbolic search index, store the placed coordinates in AgentDB and compute geodesic distance in your own retrieval code.

## Poincare ball properties (for points you placed by depth)

| Property | Meaning |
|----------|---------|
| Norm close to 0 | Root-level concept (only if you assigned radius by depth) |
| Norm close to 1 | Leaf-level concept (same condition) |
| Small geodesic distance | Close in the hierarchy you encoded |
| Large geodesic distance | Distant subtrees in the hierarchy you encoded |

## Use cases

- **Dependency analysis**: embed module imports to find tightly coupled subtrees
- **Code architecture**: map class hierarchies to discover structural patterns
- **Knowledge organization**: embed concepts to reveal taxonomic relationships
- **Codebase navigation**: find most specific/general modules relative to a query

© 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