helix-query-optimize

Installation
SKILL.md

Helix Query Optimization

Optimize Helix queries by aligning their shape with what the Helix interpreter actually does at each step. Every rule in this skill is grounded in the source — see REFERENCE.md for the mechanism and the file:line cite, and EXAMPLES.md for paired Rust DSL + JSON forms.

When To Use

Use this skill when the task is to:

  • understand why a Helix query is slow
  • review a query for missed index push-down or accidental full scans
  • decide if a where_(...) or has(...) is filtering at the index or in memory
  • tighten BM25 or vector search routes (tenant scope, distance lifecycle, projection)
  • bound Repeat traversals or order Coalesce branches by cost
  • audit write-path safety (drop_edge vs drop_edge_by_id, add_n dupes, for_each_param cost)

Reference Files

  • REFERENCE.md — full optimizer mental model: index types, source dispatch table, predicate-index resolution catalog, RuntimeState transitions, limit/dedup pushdown, OrderBy paths, projection rules, repeat/branching cost, batch semantics, write-path mechanics, dynamic query cost. Every claim cites enterprise/helix/src/traversal/interpreter.rs (helix-hyperscale) or sdks/rust/src/dsl.rs (the helix-db DSL crate).
  • EXAMPLES.md — paired Rust DSL + JSON dynamic patterns for every optimization rule below: weaker form, stronger form, what changed and why.
Installs
51
Repository
helixdb/skills
First Seen
Apr 11, 2026
helix-query-optimize — helixdb/skills