Dayz search index

From DayZ-n-Chill/Agentic-Z · View interactive version

Dayz search index is an AI agent skill from the GitHub repository DayZ-n-Chill/Agentic-Z. Builds the semantic-search index over vanilla DayZ source on P:\\ (scripts, configs, layouts, rvmats, XML, JSON) with Voyage AI embeddings in LanceDB for the dayz-rag MCP server. Use when setting up a new machine, after a DayZ update or re-extraction, or when search_dayz_source reports no index.

How to use this skill

Skill file

<!-- skill-dir-note -->

Path note: <skill-dir> in commands below is the absolute path of this skill's folder. When the agent loads this skill the harness exposes the skill's base directory; substitute it before running. Sibling skills are reached via <skill-dir>\..\dayz-X\.

/dayz-search-index

Builds the vector index behind the dayz-rag MCP server's search_dayz_source tool. Follow skills/_shared/dayz-conventions.md.

If you only need the index and don't want to spend Voyage tokens, /dayz-search-download installs a prebuilt one.

Before you run

  1. The indexer runs /dayz-preflight first and stops if it fails (P:\ not mounted). Preflight warnings (Tools, Workshop) don't block it. --status skips the gate, and so does the refusal to overwrite an existing index (below), which is checked before anything else.
  2. Install the dependencies once: python -m pip install -r "<skill-dir>\requirements.txt" (lancedb, tqdm, voyageai, python-dotenv). The indexer exits with that command if any are missing.
  3. Put a Voyage key in .env at the repo root (gitignored): VOYAGE_API_KEY=pa-.... Get one at dash.voyageai.com. The key is found the same way the dayz-rag MCP server finds it (both use .claude/mcp/dayz-rag/voyage_common.py): a variable already set in the environment wins, then the nearest .env at or above the working directory, then the one at the repo (or plugin) root.

How to run

python "<skill-dir>\index.py" --full

Builds (or rebuilds) the whole index. Without --full it refuses, with one [FAIL] line and exit 1, when an index already exists (a manifest.json or a lancedb/chunks.lance table).

python "<skill-dir>\index.py" --status

Prints manifest.json and exits; exits 1 if there is no index. It creates nothing on disk.

Other flags: --ignore-tier-warning skips the free-tier prompt (needed in non-interactive shells), --force overrides the 150,000-chunk ceiling (CHUNK_CEILING). Both are explained in references/cost-and-free-tier.md.

After a build, restart Claude Code so the MCP server opens the new index.

What it indexes

The indexer walks P:\scripts, P:\gui, P:\dz, P:\core, P:\graphics and P:\languagecore and picks up .c .cpp .hpp .h .cfg .layout .rvmat .xml .json .csv. Run --status to see the current chunk, file and token counts (a full build of vanilla came to 77,613 chunks when counted on 1.30 data, with XML, JSON and CSV windowed too).

How each file type is chunked, and what an index built by an older version is missing, is in references/chunking.md.

Where the index lives

~/.claude/dayz-search-index/, per user and outside the repo:

Output

DayZ RAG indexer

DayZ preflight

[OK]    P:\ is mounted
...     (rest of the /dayz-preflight report)

Preflight complete.

[OK]    Vanilla data: P:\dz
[OK]    VOYAGE_API_KEY loaded (ending ...wxyz)
[INFO]  Index: C:\Users\you\.claude\dayz-search-index
[INFO]  Embedding model: voyage-code-3 (1024D, via Voyage cloud)
[INFO]  Estimate rate: $0.18 per 1M tokens (Voyage pricing page is authoritative)

Walking vanilla folders: scripts, gui, dz, core, graphics, languagecore
Indexed extensions: .c, .cfg, .cpp, .csv, .h, .hpp, .json, .layout, .rvmat, .xml

  scripts/  c=<chunks>c/<files>f
  ...
  rvmat dedup:    <n> duplicates (<pct>%)

[INFO]  Resuming: <n> of <total> chunks were embedded by an earlier run (embed-checkpoint.bin)   (only after a failed run)

Embedding <n> chunks via Voyage (voyage-code-3, document mode)...
  embedding: 100%|...| <n>/<n> [<time>] <tokens> tok / ~$<cost>

[OK]    Index built: <n> chunks at C:\Users\you\.claude\dayz-search-index
[INFO]  Tokens used: <tokens>  |  Estimated cost: $<cost>
[INFO]  Embed time: <seconds>s
[INFO]  Restart Claude Code so the dayz-rag MCP server picks up the new index.

Failure modes

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.