← ClaudeAtlas

rag-curatelisted

Improve RAG corpus quality by adding missing docs, rewriting weak chunks, and filling retrieval gaps. Use after a diagnostic skill (rag-quality, adt-rag-coverage, adt-rag-drift) flags a coverage gap or when the index returns poor/irrelevant results for a known query.
LucasSantana-Dev/sharekit-profile · ★ 1 · AI & Automation · score 70
Install: claude install-skill LucasSantana-Dev/sharekit-profile
# RAG Curate Add missing docs or rewrite weak chunks after a diagnostic (`rag-quality`, `adt-rag-coverage`, `adt-rag-drift`) identifies a gap. Surgical alternative to a full rebuild. ## Corpus directories | Type | Path | |---|---| | Skills | `~/.claude/skills/` | | Standards | `~/.claude/standards/` | | Plans | `~/.claude/plans/` | | Codex | `~/.claude/codex/` | | Handoffs | `~/.claude/handoffs/` | | Code | tracked repos in `build.py` | ## Three curation patterns ### A. Missing doc → write + incremental reindex ```bash mount | grep -q "${DEV_ROOT}" || { echo "BLOCKED: External HD unmounted — RAG index unreachable"; exit 1; } cat > ~/.claude/standards/new-pattern.md <<'EOF' # New Pattern Name ... EOF cd ~/.claude/rag-index venv/bin/python build.py --incremental ~/.claude/standards/new-pattern.md sqlite3 index.sqlite "SELECT COUNT(*) FROM chunks WHERE path LIKE '%new-pattern.md%';" ``` **Done when:** SELECT COUNT confirms >0 chunks indexed for the new doc. **Stop if:** chunks count returns 0 — reindex failed or doc was filtered. ### B. Weak retrieval (cos <0.40) → rewrite ```bash mount | grep -q "${DEV_ROOT}" || { echo "BLOCKED: External HD unmounted — RAG index unreachable"; exit 1; } cd ~/.claude/rag-index venv/bin/python query.py "your weak query" --top 3 # note path + chunk id; edit the source file to add keywords / clarify context venv/bin/python build.py --incremental <path> venv/bin/python query.py "your weak query" --top 3 # cosine should rise ``` **Done