helix.mcp: Skill for Claude Code

.copilot/skills/incremental-ranked-search/SKILL.md

incremental-ranked-search is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 17 tokens per session (720 once invoked), scanned A, original, MIT.

A search pattern for finding the first useful matches across many remote items without downloading everything. It first gathers lightweight details, ranks likely matches, and fetches content until enough results are found.

In plain words
What is it for?
Searching logs, files, database records, or similar remote resources by metadata, priority buckets, incremental fetching, and early stopping.
Why use it?
It reduces data transfer and waiting time when the full collection is too large or some items are more likely to contain the answer than others.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is lewing/helix.mcp's own configuration. It tells Claude Code and Codex how to work on helix.mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helix.mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/incremental-ranked-search/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for incremental-ranked-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/incremental-ranked-search/github.svg)](https://agentmods.dev/skills/lewing/helix.mcp/incremental-ranked-search)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/incremental-ranked-search"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/incremental-ranked-search/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for incremental-ranked-search

Your own site · 80×15
<a href="https://agentmods.dev/skills/lewing/helix.mcp/incremental-ranked-search"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/incremental-ranked-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 720 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00720
Opus 5 $0.00009 $0.00360
Sonnet 5 $0.00003 $0.00144
Haiku 4.5 $0.00002 $0.00072

Measured 9d ago against content hash 36fd49e65e9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

incremental-ranked-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.copilot/skills/incremental-ranked-search/SKILL.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

When building a tool that must search across many remote resources (logs, files, database records) where:

  • The total set is too large to download all at once
  • Some items are far more likely to contain results than others
  • The caller wants "first N matches" not "all matches"

Use a three-phase pattern: cheap metadata → rank → incremental fetch with early exit.

Pattern

Phase 1: Metadata Collection

Fetch lightweight metadata about ALL items in parallel. This gives you the information needed to rank without downloading content. Look for APIs that return counts, sizes, or status without payload.

Example: AzDO's GET builds/{id}/logs returns lineCount per log without content. Timeline returns result per task without log content.

Phase 2: Ranked Queue

Assign items to priority buckets based on metadata, then sort within buckets by a secondary signal (e.g., size descending = larger items more likely to contain matches).

Bucket 0: Known failures (highest priority)
Bucket 1: Items with warnings/issues
Bucket 2: Partial failures
Bucket 3: Normal items above minimum size threshold
Bucket 4: Orphans / unknowns

Filter items below a minimum threshold (e.g., skip files < 5 lines) to eliminate noise.

Phase 3: Incremental Fetch with Early Exit

Process items sequentially from the ranked queue. Track remainingMatches and pass it to each search call as that call's own maxMatches. Stop when:

  • remainingMatches <= 0 (early exit — found enough)
  • Queue exhausted
  • maxItemsToSearch limit reached (API call budget)
remainingMatches = maxMatches
for item in rankedQueue[0..maxItems]:
    if remainingMatches <= 0: break
    result = search(item, maxMatches: remainingMatches)
    remainingMatches -= result.matchCount

Key Design Decisions

Sequential > Parallel (Phase 3)

Start sequential. Parallel downloads complicate early termination (you may over-download). Add bounded parallelism (SemaphoreSlim) only when measured performance requires it.

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 76 lines · 17 tokens per session scan A 36fd49e65e9d

Subscribe to this mod's changes

incremental-ranked-search is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 720 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.