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 skills/lyonzin/knowledge-rag/rag-check-firstnpx skills add lyonzin/knowledge-rag --skill rag-check-firstgit clone --depth 1 https://github.com/lyonzin/knowledge-ragWrote 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/lyonzin/knowledge-rag/rag-check-first)<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-check-first"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-check-first.svg" alt="Measured on agentmods" height="20"></a>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.00068 | $0.01404 |
| Opus 5 | $0.00034 | $0.00702 |
| Sonnet 5 | $0.00014 | $0.00281 |
| Haiku 4.5 | $0.00007 | $0.00140 |
Grade A, and why
rag-check-first 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.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
rag-check-first — search before you speak
When to use this skill
Trigger this skill before answering whenever the user asks:
- A technical "how" or "why" question (design, implementation, security, ops)
- Something about "our" / "the project" / "the team" / a named component
- A request to write, refactor, review, or debug code
- A question that could plausibly be answered by an ADR, runbook, README, or spec
Trigger keywords / patterns (non-exhaustive):
- "how does X work", "why did we", "what is the pattern for"
- "add a", "implement", "refactor", "fix", "debug"
- Any mention of a file, module, function, feature, or component by name
- Any question about historical decisions ("we used to", "the old way")
Do NOT trigger for:
- Pure conversation / meta requests ("hi", "thanks", "what's your name")
- Requests that are explicitly about the AI itself
- Well-known facts already in training data with no team-specific angle
What this skill commits to
Before drafting a single line of the answer, the agent will call search_knowledge at least once with a query derived from the user's message. The results shape the answer — training-data knowledge is only a fallback when RAG returns nothing relevant.
Steps
-
Extract the search query from the user's message. Prefer 2–5 keywords, not full sentences. Include domain-specific identifiers (class names, error codes, feature names, ADR IDs).
-
Call
search_knowledge:search_knowledge(query="<extracted keywords>", max_results=5, snippet_mode=true, min_score=0.15)snippet_mode=truekeeps token consumption sanemin_score=0.15cuts obvious noise (adjust higher for terse corpora)
-
Read the top 3 results. Pay attention to
search_method(hybrid>semantic/keywordalone),score, andreranker_score. -
Decide the answer strategy based on what came back:
RAG result What to do ≥1 result with score > 0.5matching the intentAnswer primarily from the RAG content, quote relevant snippets, cite the source ( path:line)1–3 results with lower scores (0.2–0.5) Use as partial context, be explicit that the corpus does not cover this in depth, mix with training-data knowledge 0 results after 2 attempts with varied phrasing State it: "Local corpus does not have this. Answering from general knowledge — verify before acting." Optionally chain to rag-web-fallback
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 First seen · 126 lines · 68 tokens per session scan A 6d331313fcc3
rag-check-first is a skill published in the GitHub repository lyonzin/knowledge-rag (269 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 1,404 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.
Other skills, from other repositories
rag-perf
Performance benchmarking for a deployed NVIDIA RAG Blueprint server: profiling pass + aiperf load test driven by a single YAML config. Not for accuracy / RAGAS scoring (use rag-eval) or for deploying / repairing services (use rag-blueprint).
rag-blueprint
NVIDIA RAG Blueprint — deploy, configure, troubleshoot, and manage. Handles any RAG action: deploy, install, start, enable, disable, toggle, change, configure, troubleshoot, debug, fix, shutdown, stop, or tear down any RAG feature or service (Agentic RAG, VLM, guardrails, query rewriting, models, search, ingestion…
rag-eval
Filesystem RAG benchmarks: corpus/, train.json, evaluaterag.py (RAGAS quality). Not for prod monitoring, latency/throughput benchmarking (use rag-perf), or evals outside this repo layout.
pinecone:full-text-search
Create, ingest into, and query a Pinecone full-text-search (FTS) document index using the graduated document-schema API (Python SDK 10.0.0, API version 2026-07). Use when the user or agent asks to build a text search index on Pinecone, add dense or sparse vector fields, ingest documents, construct scoreby clauses…
pinecone:n8n
Build n8n workflows using the Pinecone Assistant node or Pinecone Vector Store node. Use when building RAG pipelines, chat-with-docs workflows, configuring Pinecone nodes in n8n, troubleshooting Pinecone n8n nodes, or asking about best practices for Pinecone in n8n.
pinecone:quickstart
Interactive Pinecone quickstart for new developers. Choose between two paths - Database (create an integrated index, upsert data, and query using Pinecone MCP + Python) or Assistant (create a Pinecone Assistant for document Q&A). Use when a user wants to get started with Pinecone for the first time or wants a guided…