adt-rag-drift

adt-rag-drift is a skill for Claude Code from LucasSantana-Dev/sharekit. It costs 22 tokens per session (1,044 once invoked), scanned B, original, MIT.

A tool for finding stale information in a retrieval index: pieces of files that changed or were deleted after indexing. Retrieval is the process of finding stored information for later use.

In plain words
What is it for?
Use it to report stale chunks, fix entries for deleted or changed files, and decide between incremental updates and a full index rebuild.
Why use it?
It detects when searches silently return outdated or orphaned content and recommends whether to update individual pieces or rebuild the index.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Good fit Use it to report stale chunks, fix entries for deleted or changed…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lucassantana-dev/sharekit/adt-rag-drift
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 LucasSantana-Dev/sharekit --skill adt-rag-drift
Clone the repo
git clone --depth 1 https://github.com/LucasSantana-Dev/sharekit

Made for: Claude Code.

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 adt-rag-drift

README.md
[![agentmods](https://agentmods.dev/badge/skills/lucassantana-dev/sharekit/adt-rag-drift.svg)](https://agentmods.dev/skills/lucassantana-dev/sharekit/adt-rag-drift)
Your own site
<a href="https://agentmods.dev/skills/lucassantana-dev/sharekit/adt-rag-drift"><img src="https://agentmods.dev/badge/skills/lucassantana-dev/sharekit/adt-rag-drift.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,044 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.
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.00022 $0.01044
Opus 5 $0.00011 $0.00522
Sonnet 5 $0.00004 $0.00209
Haiku 4.5 $0.00002 $0.00104

Measured 6d ago against content hash b516a6006e84, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

adt-rag-drift 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 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/rag-index/weekly.md | grep -A 30 "Stale chunks"
sharekit-profile/.claude/skills/adt-rag-drift/SKILL.md · 150 lines

How it starts

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

RAG Drift

Drift occurs when the index contains chunks from files that have been deleted or modified since indexing. The retrieval system silently returns outdated or orphaned content without error. Detect and fix drift before it degrades quality.

What is drift?

Two types of drift corrupt the index: see references/drift-types.md for details.

Drift is silent. Retrieval still works, but returns wrong or outdated info.

Detect drift

BLOCKED if External HD unmounted — report.py embedder cache unreachable; query local sqlite instead.

Check stale count: Read the drift summary to determine action:

  • <5 stale chunks: normal churn; can wait for next full rebuild
  • 5–20 chunks: fix incrementally today
  • 20 chunks: full rebuild recommended (faster than 20+ incremental ops)

Run the report script:

cd ~/.claude/rag-index
venv/bin/python report.py

Read the drift summary:

cat ~/.claude/rag-index/weekly.md | grep -A 30 "Stale chunks"

See references/report-examples.md for example output.

Done when: report shows stale count and recommended action based on thresholds above.

Fix missing chunks (deleted files)

For files that no longer exist, delete their orphaned chunks:

sqlite3 ~/.claude/rag-index/index.sqlite

In the sqlite prompt:

-- View chunks from the deleted file
SELECT COUNT(*), path FROM chunks 
WHERE path LIKE '%old-skill/SKILL.md%'
GROUP BY path;

-- Delete them
DELETE FROM chunks 
WHERE path LIKE '%old-skill/SKILL.md%';

-- Confirm deletion
SELECT COUNT(*) FROM chunks 
WHERE path LIKE '%old-skill/SKILL.md%';

Exit sqlite: .exit

Quick delete (one line):

sqlite3 ~/.claude/rag-index/index.sqlite \
  "DELETE FROM chunks WHERE path = '~/.claude/old-skill/SKILL.md';"

Done when: sqlite confirms 0 chunks for that path (query returns no rows).

Fix modified chunks (updated files)

Files that exist but have changed since indexing need incremental reindex:

cd ~/.claude/rag-index
venv/bin/python build.py --incremental ~/.claude/standards/old-auth.md

Read the full file on GitHub · 150 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 150 lines · 22 tokens per session scan B b516a6006e84

Subscribe to this mod's changes

adt-rag-drift is a skill published in the GitHub repository LucasSantana-Dev/sharekit (1 stars, last pushed 6d ago), licensed MIT. It adds 22 tokens to every session and 1,044 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories