rag-security-first

rag-security-first is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 94 tokens per session (2,513 once invoked), scanned B, original, MIT.

A security-workflow guide that makes a local knowledge collection the first source for cybersecurity tasks. It covers incidents, vulnerabilities, attacker techniques, detection rules, and defensive checks.

In plain words
What is it for?
Use it to investigate threats, map activity to MITRE ATT&CK, review CVEs, analyze exploits, create detection rules, and validate defensive controls.
Why use it?
It reduces the risk of missing relevant internal guidance or using outside information before checking your own security material.

Skill for Claude CodeCodex

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

Good fit Use it to investigate threats, map activity to MITRE ATT&CK, review CVEs, analyze exploits, create detection rules, and validate defensive controls.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-security-first/github.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-security-first)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-security-first"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-security-first/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.

agentmods 80×15 button for rag-security-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-security-first"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-security-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,513 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

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 →

  • high YARA Match · line 52
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
  • high YARA Match · line 181
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
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.00094 $0.02513
Opus 5.5 $0.00038 $0.01005
Sonnet 5.5 $0.00019 $0.00503
Haiku 4.5 $0.00009 $0.00251

Measured 1mo ago against content hash 4b3e9709f867, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

rag-security-first scanned grade B 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 1mo 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.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

Example: `search_knowledge(query="LSASS dump credential access detection", max_results=5)`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/domain/rag-security-first/SKILL.md · 207 lines

How it starts

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

rag-security-first — RAG-driven security workflow

When to use this skill

Trigger this skill for any security-flavored task:

  • Threat triage or incident response
  • MITRE ATT&CK technique mapping (T1078, T1055, …)
  • CVE lookup or vulnerability analysis
  • Exploit / payload / attacker-technique questions
  • Red team / blue team / purple team exercises
  • CTF challenge analysis
  • Detection engineering (Sigma / Snort / YARA / KQL / SPL / LQL rules)
  • Defensive control validation
  • Compliance / hardening questions

Prerequisite: the RAG should be loaded with security-relevant content. The cybersecurity preset is optimized for this — it ships 8 categories, 200+ routing keywords, and 69 query expansions covering sqli → SQL injection, privesc → privilege escalation, etc.


What this skill commits to

For security tasks, the corpus is primary:

  1. Search the corpus before hitting any external threat-intel MCP (mcp__cti__*, mcp__virustotal__*, mcp__shodan__*).
  2. Use the query-expansion mappings (sqli → SQL injection) — they exist for a reason.
  3. Cite the MITRE technique ID + the internal runbook link.
  4. Only escalate to external threat-intel when the corpus does not cover the specific IOC / CVE / technique in enough depth.

Steps

  1. Classify the intent. Is it:

    • Detection — "we saw X in logs, is this bad?"
    • Response — "we confirmed compromise, what now?"
    • Prevention — "how do we harden against X?"
    • Research — "how does X actually work?"
  2. Extract the security signature from the user's message:

    • MITRE ATT&CK ID (T1078, T1078.001, TA0004)
    • CVE ID (CVE-2024-1234)
    • Malware family (Cobalt Strike, Mimikatz, LSASS dump)
    • Attack technique term (Kerberoasting, AS-REP Roasting, pass-the-hash)
    • IOC (hash, domain, IP — treat as verbatim in the search)
  3. Search the corpus with the security preset in mind:

    search_knowledge(query="<signature> <intent>", max_results=5, min_score=0.15)
    

    Example: search_knowledge(query="LSASS dump credential access detection", max_results=5)

Read the full file on GitHub · 207 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. 1mo ago First seen · 207 lines · 94 tokens per session scan B 4b3e9709f867

Subscribe to this mod's changes

rag-security-first is a skill published in the GitHub repository lyonzin/knowledge-rag (300 stars, last pushed yesterday), licensed MIT. It adds 94 tokens to every session and 2,513 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

rag

Use when building grounded Q&A over your own corpus — chunk, retrieve hybrid, rerank, ground, cite chunk ids, refuse when the sources fall short — or when the right document is retrieved but the answer is still wrong, invented, or unmeasured. NOT operating the store itself — collection schema, HNSW efsearch…

ericrisco/rsc-harness · 79 tokens

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).

NVIDIA-AI-Blueprints/rag · 56 tokens

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…

NVIDIA-AI-Blueprints/rag · 92 tokens

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.

NVIDIA-AI-Blueprints/rag · 48 tokens

assessing-vector-and-embedding-weaknesses

Test vector stores for embedding inversion, cross-tenant leakage, and poisoning.

adriannoes/awesome-agentic-ai · 26 tokens

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-io/pinecone-claude-code-plugin · 163 tokens