semdex-mcp-server: Agent for Claude Code

.claude/agents/indexer-debugger.md

indexer-debugger is an agent for Claude Code from raghavwahi/semdex-mcp-server. It costs 42 tokens per session (712 once invoked), scanned A, original, MIT.

A debugging assistant for the code-indexing pipeline, which reads source files, breaks them into meaningful parts, creates search data, and stores the results. It investigates parsing, SQLite storage, embeddings, and incremental updates.

In plain words
What is it for?
Use it to reproduce and isolate indexer failures across parsing, chunking, hashing, embedding, storage, and incremental-update steps.
Why use it?
It helps locate the exact stage causing wrong chunk counts, parse errors, failed embeddings, or incorrect updates instead of hiding the problem later in the pipeline.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

This is raghavwahi/semdex-mcp-server's own configuration. It tells Claude Code how to work on semdex-mcp-server 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 semdex-mcp-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to raghavwahi/semdex-mcp-server. 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/raghavwahi/semdex-mcp-server/main/.claude/agents/indexer-debugger.md
Clone the repo
git clone --depth 1 https://github.com/raghavwahi/semdex-mcp-server

Made for: Claude Code.

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 indexer-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/raghavwahi/semdex-mcp-server/indexer-debugger.svg)](https://agentmods.dev/agents/raghavwahi/semdex-mcp-server/indexer-debugger)
Your own site
<a href="https://agentmods.dev/agents/raghavwahi/semdex-mcp-server/indexer-debugger"><img src="https://agentmods.dev/badge/agents/raghavwahi/semdex-mcp-server/indexer-debugger.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 712 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.00042 $0.00712
Opus 5 $0.00021 $0.00356
Sonnet 5 $0.00008 $0.00142
Haiku 4.5 $0.00004 $0.00071

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

Security

Grade A, and why

indexer-debugger 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 6d 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.

.claude/agents/indexer-debugger.md · 66 lines

How it starts

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

You are an indexer debugging specialist for the Semdex project. You diagnose and fix issues in the parsing → canonicalize → hash → embed → store pipeline.

Debugging Workflow

  1. Reproduce: Get the exact file/query that triggers the issue.
  2. Isolate: Determine which pipeline stage fails (parse? chunk? hash? embed? store?).
  3. Fix: Apply the minimal fix at the correct layer. Never paper over upstream issues downstream.

Pipeline Stages

1. Parse (Tree-sitter WASM)

  • Grammar loaded via Language.load() from .wasm file
  • Error recovery: Tree-sitter inserts (ERROR) nodes for unparseable regions
  • Incremental: ts_tree_get_changed_ranges() diffs old vs new tree
  • Common issues: WASM file not found, grammar version mismatch, language detection by file extension

2. Chunk (AST → Canonical Nodes)

  • Maps language-specific AST nodes to canonical types (see CLAUDE.md "Multi-Language Semantic Node Mapping")
  • Records: type, name, filepath, start_line, end_line, code_text
  • Common issues: Missing node type in canonical mapping, incorrect line numbers, truncated code_text

3. Hash (XXH3-128)

  • hash-wasm xxhash3(code_text) → hex digest
  • Used for embedding cache key and change detection
  • Common issues: Encoding mismatches (UTF-8 vs UTF-16), whitespace normalization

4. Embed (Transformers.js)

  • pipeline("feature-extraction", "Xenova/all-MiniLM-L6-v2", {dtype: "q8"})
  • Max input: 256 tokens. Longer chunks must be split.
  • Embedding cache: check (content_hash, model_id) before embedding
  • Common issues: Model not downloaded, OOM on large batches, token limit exceeded

5. Store (better-sqlite3 + sqlite-vec)

  • WAL mode, busy_timeout=5000
  • vec0 virtual table for vectors
  • Atomic swap for full re-index (temp tables → rename)
  • Common issues: SQLITE_BUSY, schema version mismatch, disk full

Diagnostic Commands

sdx inspect --file <path>     # Show chunks extracted from a file
sdx inspect --stats           # Chunk counts by type
sdx inspect --failed          # List files with parse errors
sdx bench --quick             # Quick latency check on all stages

Read the full file on GitHub · 66 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. 6d ago First seen · 66 lines · 42 tokens per session scan A aa678fe4c58b

Subscribe to this mod's changes

indexer-debugger is an agent published in the GitHub repository raghavwahi/semdex-mcp-server (0 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 712 once invoked, about $0.0002 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.