rag-index-decisions

rag-index-decisions is a skill for Claude Code, Codex from lyonzin/knowledge-rag. It costs 72 tokens per session (1,889 once invoked), scanned A, original, MIT.

A knowledge-base updater for recording important decisions, unusual bug fixes, coding conventions, postmortems, and useful documents or web pages. It uses retrieval-augmented generation (RAG), where an assistant searches stored material to answer later questions.

In plain words
What is it for?
Use it to propose and index architecture decisions, non-obvious fixes, team standards, postmortems, and source documents after asking for approval.
Why use it?
It prevents useful reasoning from disappearing when a session ends and makes past decisions easier to find the next time a similar problem occurs.

Skill for Claude CodeCodex

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

Good fit Use it to propose and index architecture decisions, non-obvious fixes, team standards, postmortems, and source documents after asking for approval.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-index-decisions.svg)](https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-index-decisions)
Your own site
<a href="https://agentmods.dev/skills/lyonzin/knowledge-rag/rag-index-decisions"><img src="https://agentmods.dev/badge/skills/lyonzin/knowledge-rag/rag-index-decisions.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,889 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.00072 $0.01889
Opus 5 $0.00036 $0.00945
Sonnet 5 $0.00014 $0.00378
Haiku 4.5 $0.00007 $0.00189

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

Security

Grade A, and why

rag-index-decisions 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/maintenance/rag-index-decisions/SKILL.md · 210 lines

How it starts

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

rag-index-decisions — close the feedback loop

When to use this skill

Trigger this skill when, during a session, the team (or the agent + user together) produces:

  • A design decision with tradeoffs discussed (worth an ADR)
  • A novel bug fix whose root cause is non-obvious
  • A convention agreed on ("from now on we do X for Y")
  • A postmortem summary — even a paragraph
  • A URL / doc / paper that shaped the decision (worth ingesting via add_from_url)

Do NOT trigger for:

  • Trivial fixes (typo, formatting, obvious one-liner)
  • Session-only context that will not matter next time
  • Highly sensitive material that should NOT be in the RAG (secrets, PII, WIP negotiations)
  • Duplicates of things already indexed

What this skill commits to

When the session produces something worth remembering, the agent proactively suggests indexing it — either:

  • As a new file written to documents/ and indexed via add_document, OR
  • As a URL ingestion via add_from_url if the reference lives elsewhere

The agent does NOT silently index things — always asks the user first, offering a preview of the content and where it will go.


Steps

  1. Recognize the moment. The session hit one of the triggers above.

  2. Draft the artifact in your head. Typical shapes:

    • ADR (Architecture Decision Record): ~200-500 words, structured as Context / Decision / Consequences.
    • Runbook update: step-by-step reproducible playbook.
    • Postmortem: what happened / root cause / fix / prevention.
    • Coding standard: "for X, do Y (not Z), because W."
  3. Propose to the user:

    "This decision looks worth remembering. I can:

    (a) Create docs/adr/0045-token-storage.md with a 300-word ADR summarizing what we agreed, then index it. (b) Just record the summary here, no indexing.

    Which?"

  4. If the user picks indexing, write the file to an appropriate path under documents/ (or wherever the config's documents_dir points), then:

Read the full file on GitHub · 210 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 · 210 lines · 72 tokens per session scan A 05df017b3aee

Subscribe to this mod's changes

rag-index-decisions is a skill published in the GitHub repository lyonzin/knowledge-rag (273 stars, last pushed 4d ago), licensed MIT. It adds 72 tokens to every session and 1,889 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 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

pinecone-research

Agent RAG and long-term memory with Pinecone.

aivrar/portable-hermes-agent · 16 tokens

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG…

davila7/claude-code-templates · 79 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

mem0-integration

Mem0 memory layer integration for AI agents. Implement persistent, semantic memory for long-term context retention and personalization.

a5c-ai/babysitter · 27 tokens