XERJ is a local search tool that automatically indexes folders so coding agents can retrieve relevant code, documents, logs, and PDFs without reading files one at a time. It is for developers and agents using code search, retrieval-augmented generation, security audits, or agent memory.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/xerj-org/xerjnpx agentmods add skills/xerj-org/xerj/xerj-codeWrote 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.
[](https://agentmods.dev/skills/xerj-org/xerj/xerj-code)<a href="https://agentmods.dev/skills/xerj-org/xerj/xerj-code"><img src="https://agentmods.dev/badge/skills/xerj-org/xerj/xerj-code/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.
<a href="https://agentmods.dev/skills/xerj-org/xerj/xerj-code"><img src="https://agentmods.dev/badge/skills/xerj-org/xerj/xerj-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 61 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00078 | $0.09226 |
| Opus 5.5 | $0.00031 | $0.03690 |
| Sonnet 5.5 | $0.00016 | $0.01845 |
| Haiku 4.5 | $0.00008 | $0.00923 |
Grade A, and why
xerj-code 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -fsSLO https://raw.githubusercontent.com/xerj-org/xerj/corpus-hub/tools/xerj-code/hub/<slug>.json How it starts
The opening of the file, as written. The whole thing — 558 lines — stays where its author put it; the contents beside it link to each section on GitHub.
XERJ.code — reference coding
An agent that does not know an API guesses, runs, fails, and guesses again. Each lap costs output tokens, which are the expensive kind. This skill replaces laps with a lookup: clone the repositories that already contain a correct implementation, index them with XERJ, and retrieve the passage before writing.
The trade is deliberate. Retrieval spends input tokens, which are cheaper per
token and cacheable; loops spend output tokens. See COSTS.md for
the arithmetic and for the conditions under which this trade loses.
Status, stated plainly: measured, and the value is real but narrow. (Full case study with real tokens and dollars:
docs/case-studies/reference-coding/CASE_STUDY.md, 2026-08-05.)The comparison that matters is against native Claude Code — the same agent with tools that would grep the source itself — not a bare model. Measured across three regimes, same agent, one objective verdict (compiles + passes hidden tests):
- Unfamiliar code with a contract the model can't recall (a seal, a generational handle, a lazy refill, a specific hash scheme — measured across seven purpose-built libraries, 21 runs): native and xerj both solve 21/21; xerj uses 1.5× fewer output tokens and costs 1.3× less than native, because retrieval replaces the grep. Pure memory fails 1/21 and burns 6.5× the cost flailing. This is the win, and it is decisive. The compiler can leak an API name across a retry loop, but never a contract.
- Memorised code (any popular public crate — even a 256-value table, or a protobuf-style varint): retrieval is overhead. Pure memory is cheapest; injecting a big reference can be the worst arm, because the model re-emits what it was handed.
So: use this when the reference is code the model has not memorised — your own private/proprietary code, an internal API, a post-cutoff or niche library. On public library references the model already knows, it costs more than it saves. The native-vs-xerj gap grows with corpus size (grep pulls the whole tree into context; retrieval pulls one passage).
Since #977 the whole loop is
inside the xerj binary — xerj corpus add / xerj corpus index /
xerj code — plus the xerj_code_search MCP tool for agents without a shell.
The old wrapper scripts (xc-corpus.sh, xc-index.sh, xc.py) are gone; your
existing ~/.xerj-code corpora and indexes work unchanged (see
Migration below).
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago Changed · +31 lines 0ec657746009
- 14d ago Changed · +23 lines 67408fa4bb83
- 15d ago Changed · +18 lines 919f926833cb
- 16d ago Changed · +48 lines d49852fad6b6
- 22d ago Changed · +20 lines 7494199fb8f9
- 28d ago Changed · +100 lines · -1 tokens per session f76ffc52d224
- 29d ago Changed · +37 lines 1c669e70d5b2
- 1mo ago First seen · 281 lines · 79 tokens per session scan A bfb4f3ee8f91
xerj-code is a skill published in the GitHub repository xerj-org/xerj (10,530 stars, last pushed today), licensed Apache-2.0. It adds 78 tokens to every session and 9,226 once invoked, about $0.0003 per session on Opus 5.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.
Other skills, from other repositories
vs-search-tuning-specify-policy-direction
Viking Search tuning for specified policy directions. Use this when the user provides specific queries, a type of query, or a business policy direction, and asks to boost, suppress, or fix a class of search results through request-parameter passthrough. You must only perform read-only baseline evaluation and…
vs-crawler
Crawl websites (news, blogs, papers, GitHub, product docs, RSS feeds) into a fixed-schema JSONL file, then create a dataset and a searchable application in Viking AI Search. Supports one-time crawl and scheduled recurring crawl with automatic incremental sync.
vs-product-qa
Answer Viking AI Search product questions, CLI usage questions, API/auth questions, configuration questions, and troubleshooting questions by grounding every claim in either the installed vs CLI's own output or official Volcengine documentation. Never fabricate.
vs-search-tuning-partial-case
Use when the user provides 1-50 concrete bad-case search queries for one Viking Search app and wants local deterministic fixes. This skill only verifies request-level fine-operation interventions against a read-only baseline scene and delivers a console-ready configuration sheet, validated payloads, and a replay…
vs-user-onboarding
Guide a brand-new SearchCLI/vs user from first-time usage questions to sign-up, purchase of Viking AI Search, AK/SK setup, and a working authenticated CLI. Use when the user says they downloaded or installed SearchCLI/vs and asks how to use it, how to start, sign up, buy, or onboard.
volcengine-documentation
Volcengine official documentation lookup helper. Supports both document search and full-content fetch across Volcengine products, developer tools, support content, best practices, pricing, deployment, troubleshooting, API, SDK, and policy pages.