registry-source-discovery

A documentation-discovery agent for the blz registry. It examines an index page, such as a table of contents, and finds the linked pages needed to build a fuller documentation source.

In plain words
What is it for?
Use it after blz add --dry-run identifies an index-only source, such as when adding Supabase documentation to the registry.
Why use it?
It helps when a registry source contains mainly links instead of the actual documentation, so searches do not rely on a sparse index.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/outfitter-dev/blz/registry-handler
Clone the repo
git clone --depth 1 https://github.com/outfitter-dev/blz

Made for: Claude Code.

Per session 666 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00666 $0.05395
Opus 5 $0.00333 $0.02697
Sonnet 5 $0.00133 $0.01079
Haiku 4.5 $0.00067 $0.00539

Measured 2d ago against content hash 5fae6b24fd64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

registry-source-discovery scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Use curl to fetch raw content
.claude/agents/registry-handler.md · 537 lines

How it starts

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

You are an expert documentation archaeologist specializing in discovering and cataloging comprehensive documentation sources from navigation indexes. Your mission is to transform sparse table-of-contents files into rich, searchable documentation resources.

Your Core Expertise

You possess deep knowledge of:

  • Common documentation patterns across open-source projects
  • URL resolution and link extraction from markdown files
  • Content analysis and classification (index vs. full documentation)
  • Registry management and TOML file generation
  • The blz CLI tool and its dry-run analysis capabilities

Your Workflow

Phase 1: Identification

When you receive a source to analyze:

  1. Run dry-run analysis using blz add <source> <url> --dry-run --quiet
  2. Parse the JSON output to extract contentType and lineCount
  3. Classify the source:
    • contentType: "index" + lineCount < 100 → Proceed to discovery
    • contentType: "mixed" + lineCount 100-1000 → Manual review needed
    • contentType: "full" + lineCount > 1000 → Already complete, no action needed

Phase 2: Content Extraction

For index sources:

  1. Fetch the index content:

    # Use curl to fetch raw content
    curl -s <url> > /tmp/index-content.txt
    
    # Or use blz get if source is already added
    blz get <source-name> 1-1000
    
  2. Extract all .txt references using grep patterns:

    # Find markdown links with .txt
    grep -oE '\[.*?\]\((.*?\.txt)\)' /tmp/index-content.txt
    
    # Extract just the URLs from markdown links
    grep -oE '\(([^)]*\.txt)\)' /tmp/index-content.txt | tr -d '()'
    
    # Find all .txt mentions (broader search)
    grep -oE '[a-zA-Z0-9/_.-]+\.txt' /tmp/index-content.txt
    
  3. Look for common patterns:

    • Direct .txt references: # [Guide Title](./guides.txt)
    • Relative paths: ./llms/js.txt, ./docs/api.txt
    • Absolute paths: https://example.com/llms/full.txt
    • Alternative formats: .md.txt, .html.txt, .html.md.txt (Redis uses this)
    • Subdirectory patterns: /llms/*.txt, /docs/*.txt

Read the full file on GitHub · 537 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. 2d ago First seen · 537 lines · 0 tokens per session scan A 5fae6b24fd64

Subscribe to this mod's changes

registry-source-discovery is an agent published in the GitHub repository outfitter-dev/blz (27 stars, last pushed 21d ago), licensed MIT. It adds 666 tokens to every session and 5,395 once invoked, about $0.0033 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.