New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Vector Hyperbolic

Free

Embed hierarchical data in hyperbolic space.

by ruvnet67.6k stars on ruvnet/ruflo
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Vector Hyperbolic does

Vector Hyperbolic is a skill designed for embedding hierarchical data within the Poincare ball model using the ruvector library. This approach is particularly useful when dealing with data structures that exhibit inherent hierarchy, such as dependency trees, taxonomies, or organizational charts. By leveraging hyperbolic space, it allows for the representation of hierarchical relationships with significantly fewer dimensions compared to traditional Euclidean embeddings, making it easier to visualize and analyze complex data relationships.

The skill operates by first ensuring that the ruvector@0.2.25 package is installed. Users can then generate a base ONNX embedding of their hierarchical concepts and project these embeddings into the Poincare ball. The process involves normalizing the generated vectors to fit within the unit ball and calculating geodesic distances, which grow logarithmically with tree depth. This property helps maintain the integrity of the hierarchical relationships within the data.

Vector Hyperbolic is particularly beneficial for developers and data scientists who need to analyze and visualize hierarchical data structures. Use cases include dependency analysis to identify tightly coupled modules, mapping class hierarchies to uncover structural patterns in code architecture, and organizing knowledge to reveal taxonomic relationships. The skill facilitates codebase navigation by allowing users to find the most specific or general modules relative to a query, enhancing overall data comprehension and manipulation.

While the skill provides powerful capabilities for embedding and analyzing hierarchical data, it is important to note that the ruvector@0.2.25 version does not support a direct Poincare ball command-line interface flag, meaning users must treat hyperbolic projection as a post-processing step. Additionally, for those needing a hyperbolic search index, it is recommended to store projected coordinates in an external database and implement custom retrieval logic for geodesic distance calculations.

When to use it

Use Vector Hyperbolic when working with data that has a clear hierarchy, such as taxonomies or dependency trees, and you want to leverage hyperbolic space for better representation.

When not to use it

This skill may not be suitable for flat data structures or when you require a straightforward Euclidean embedding without hierarchical considerations.

What you can build with it

Dependency Analysis

Embed module imports to identify tightly coupled subtrees within your codebase.

Code Architecture Mapping

Map class hierarchies to discover structural patterns and relationships in your application.

Knowledge Organization

Embed concepts to reveal taxonomic relationships, enhancing the understanding of your data.

How to install Vector Hyperbolic

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/vector-hyperbolic --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

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 ruvector@0.2.25 is available:
    npm ls ruvector 2>/dev/null | grep '0.2.25' || npm install ruvector@0.2.25
    
  2. Generate a base ONNX embedding (ruvector@0.2.25 does not expose a --model poincare flag on embed text):
    npx -y ruvector@0.2.25 embed text "hierarchical concept" -o concept.vec.json
    
  3. Project into the Poincare ball in your own code (or via the experimental neural substrate):
    npx -y ruvector@0.2.25 embed neural --help
    
    For an ad-hoc projection, normalize the 384-dim vector to live inside the unit ball (x_i / (||x|| * (1 + epsilon))) and persist the projected coordinates alongside the original embedding.
  4. Geodesic distance: d(u, v) = arcosh(1 + 2 * ||u-v||^2 / ((1-||u||^2)(1-||v||^2))) Distance grows logarithmically with tree depth, preserving hierarchy.
  5. Store results: mcp__plugin_ruflo-core_ruflo__memory_store({ key: "hyperbolic-CONCEPT", value: "COORDINATES_AND_NEIGHBORS", namespace: "hyperbolic-embeddings" })

Caveats

  • ruvector@0.2.25 has no first-class Poincare ball CLI flag. Treat hyperbolic projection as a post-processing step over a standard ONNX embedding.
  • If you need a hyperbolic search index, store projected coordinates in AgentDB and compute geodesic distance in your own retrieval code.

Poincare ball properties

PropertyMeaning
Norm close to 0Generic, root-level concept
Norm close to 1Specific, leaf-level concept
Small geodesic distanceClosely related in hierarchy
Large geodesic distanceDistant or different subtrees

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

Frequently asked questions about Vector Hyperbolic

Similar skills