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.
npx agentmods add commands/skymanbp/rag-your-code/searchgit clone --depth 1 https://github.com/skymanbp/rag-your-codeWhat 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 | $0.00029 | $0.00618 |
| Opus 5 | $0.00015 | $0.00309 |
| Sonnet 5 | $0.00006 | $0.00124 |
| Haiku 4.5 | $0.00003 | $0.00062 |
Grade A, and why
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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/rag-your-code:search
Retrieve focused context for: $ARGUMENTS
What to do
python -m ragyourcode.cli search "$ARGUMENTS" --json --limit 8
Add --graph --hops 1 when callers, callees or containment are relevant.
Prefer one hop; use two only when the first produced concrete edge evidence.
Then read the returned files and line ranges directly before saying
anything about the code. Results are navigation, not the file: results carries
the identifier, path, line range, signature, description, score and matched
terms, and the code arrives once in context, trimmed to a budget.
omitted_for_budget says how many results the context did not reach — read
those from the path and line range each result reports, or raise
--max-chars. (open is an action of the JSON-lines agent protocol, not a
subcommand.)
Cite every claim as path:line, taken from the result rather than remembered.
Matching is lexical by default
The default embedder is a feature hash, so a query sharing no word with a unit
scores zero against it — synonyms do not match. Ask in the vocabulary the code
uses: prefer retry charge gateway timeout over "重试扣款失败", and try two or
three wordings before concluding something is absent.
An empty result is an answer, not a failure
Retrieval returns nothing rather than the unit that ranked least badly. Read
diagnosis.reason:
| reason | what it means | what to do |
|---|---|---|
no_query_term_in_index |
no word of the question is here | re-ask in the code's vocabulary, or check the index root |
only_ubiquitous_terms_matched |
only words used throughout matched | add a term specific to what you want |
too_little_of_the_query_matched |
most of the question is absent | ask something narrower, or write descriptions |
matched_terms_are_scattered |
the words are here, never together | the subject is probably not in this repository — say so and stop |
Never respond by lowering search.min_coverage or
search.min_concentration. That restores the guessing this exists to
prevent. If two or three rephrasings all come back empty, report that the
repository does not appear to contain it — do not keep going until something
is returned.
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.
- 2d ago First seen · 57 lines · 29 tokens per session scan A 04f3324b3ac8
search is a command published in the GitHub repository skymanbp/rag-your-code (1 stars, last pushed 6d ago), licensed MIT. It adds 29 tokens to every session and 618 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.
Other commands, from other repositories
fieldtheory
Explain and drive the Field Theory CLI — bookmark-sourced seeds, repo-aware possibility runs that score ideas onto a 2x2 grid, and the interconnected .md files they leave behind. Trigger when the user asks about ft, bookmarks, seeds, ft possible (or the older name ft ideas), grids, dots/nodes, or how to turn saved…
rb-setup
First-time setup. Configure the LLM API key, or a no-API-key local host runner (Codex / Trae / Claude / any headless CLI) that RepoBrain uses for codebase Q&A and refresh. / 首次 setup,配置 RepoBrain 代码问答与 refresh 所需的 LLM API key,或无需 API key 的本地 host runner(Codex / Trae / Claude / 任意无头 CLI)。.
rp-reminder-cli
Continue your current workflow using rp-cli instead of built-in alternatives.
index
Index the codebase for semantic search.
codesage-reindex
Force an incremental codesage re-index (use when git hooks didn't fire). Auto-cleans orphan vec tables if the config model has changed.
test
Run the test suite for the given package and summarize failures.