rag-onboard-context

rag-onboard-context is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 63 tokens per session (1,429 once invoked), scanned A, original, MIT.

A startup check for a document search system’s stored knowledge. It checks what information is available before the agent answers questions.

In plain words
What is it for?
Checking the collection’s size and categories, then testing whether likely topics return useful results.
Why use it?
It prevents the agent from making assumptions about documents it cannot access or topics the collection does not cover.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Checking the collection’s size and categories, then testing whether likely topics return useful results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lyonzin/knowledge-rag/rag-onboard-context
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.

Any agent
npx skills add lyonzin/knowledge-rag --skill rag-onboard-context
Clone the repo
git clone --depth 1 https://github.com/lyonzin/knowledge-rag

Made for: Claude Code, Codex.

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 rag-onboard-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-onboard-context.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-onboard-context)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-onboard-context"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-onboard-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,429 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00063 $0.01429
Opus 5 $0.00032 $0.00714
Sonnet 5 $0.00013 $0.00286
Haiku 4.5 $0.00006 $0.00143

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

Security

Grade A, and why

rag-onboard-context 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 8d 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.

skills/foundation/rag-onboard-context/SKILL.md · 137 lines

How it starts

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

rag-onboard-context — know your corpus before you use it

When to use this skill

Run this skill:

  • At the start of any new conversation where knowledge-rag is available and the user is about to ask substantive questions
  • When the topic shifts significantly (from security to infrastructure, from dev to research)
  • After a major reindex (the corpus content changed under you)
  • When the user says "I just indexed new docs" or similar

Do NOT run repeatedly — once per session is usually enough. The query_cache keeps it cheap even if you do.


What this skill commits to

Before diving into task-specific work, the agent gathers a mental map of the corpus:

  • How big — chunk count, document count, cache health
  • What is in it — which categories exist, roughly how many docs per category
  • What flavor — probe 1–2 topics the user is likely to ask about, see if there are hits

That mental map informs every subsequent decision: whether to search first, whether to fall back to the web, how to phrase queries.


Steps

  1. Get index health:

    get_index_stats()
    

    Note: documents_count, chunks_count, cache_hit_rate, embedding_model, embedding_dim.

  2. Enumerate categories:

    list_categories()
    

    Note: which categories exist and how many docs each has. This tells you the corpus's shape.

  3. Probe 1–2 topics the user is likely to touch. If the user's first message mentions a domain, probe it. Otherwise, probe the top 2 largest categories:

    search_knowledge(query="<category-typical-term>", max_results=3, snippet_mode=true)
    
  4. Optionally, if you need concrete file names, call:

    list_documents(category="<top-category>", limit=10)
    
  5. Store the summary internally — do not necessarily surface it to the user unless they ask. The value is that YOU now know:

    • "The corpus has 15K chunks across 8 categories"
    • "Biggest categories are security (5K), development (3K), research (2K)"
    • "Search for mitre attack returned 3 solid hits — MITRE content is well indexed"
    • "Search for kubernetes returned nothing — no k8s docs indexed, defer to general knowledge"

Read the full file on GitHub · 137 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. 8d ago First seen · 137 lines · 63 tokens per session scan A 0f97de073319

Subscribe to this mod's changes

rag-onboard-context is a skill published in the GitHub repository lyonzin/knowledge-rag (273 stars, last pushed 3d ago), licensed MIT. It adds 63 tokens to every session and 1,429 once invoked, about $0.0003 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-30.