Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Rag Engineering

ASecurity

Design, diagnose and evaluate retrieval-grounded generation with evidence provenance. Use when building or improving document-backed AI answers, measuring retrieval quality, investigating unsupported citations, or deciding whether chunking, hybrid search, reranking or query transformation helps. Do not use for ordinary database search without generation, general browsing, or memory persistence design without a retrieval-quality problem.

2 stars
0 votes
0 copies
0 views
Added 10/6/2026
ai-agentsrustgogitdatabase

Security Analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned 10/6/2026

$npx -y skills add Sathvikar01/Agent-engineering-skills --skill rag-engineering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rag Engineering?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Rag Engineering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sathvikar01-rag-engineering/badge)](https://www.skillsdirectory.com/skills/sathvikar01-rag-engineering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: rag-engineering
description: >-
  Design, diagnose and evaluate retrieval-grounded generation with evidence provenance. Use when building or improving document-backed AI answers, measuring retrieval quality, investigating unsupported citations, or deciding whether chunking, hybrid search, reranking or query transformation helps. Do not use for ordinary database search without generation, general browsing, or memory persistence design without a retrieval-quality problem.
metadata:
  collection: "Agent Engineering"
  version: "2.0.0"
---

# RAG Engineering

Establish a labeled query/source set before stacking retrieval components. Diagnose whether evidence is absent, not retrieved, discarded during assembly, or misused during generation.

## Build the minimal pipeline

1. Define answerable/unanswerable queries, relevant source IDs/spans, freshness, tenant/permissions, citation requirements and latency/cost budgets. Version the corpus and index. Deduplicate documents and label source relevance without injecting gold answer keys or scoring annotations into the generation context; legitimate accessible evidence remains eligible.
2. Baseline query → candidate generation → metadata/access filtering → context assembly → grounded generation → citation/provenance verification. Enforce access before model-visible results, including caches/reranking. Choose sparse retrieval for exact identifiers/terms and dense retrieval for semantic similarity based on task evidence, not fashion.
3. Test chunk boundaries, size/overlap, document structure, metadata and embedding model/index consistency. Preserve parent document/span/version IDs; deduplicate overlapping chunks. More chunks are not more independent evidence.
4. Add query transformation, hybrid candidate fusion or reranking only after a specific failure analysis and matched ablation. Bound fan-out, candidate count and stage time. Preserve the user's constraints during rewriting; hallucinated rewrites can retrieve convincing irrelevant evidence.
5. Assemble context with bounded tokens, relevance, diversity, freshness and provenance. Preserve citation anchors and essential neighboring text. Mark truncation and conflicts. Retrieved text remains untrusted data; it cannot alter tool policy or instructions.
6. Generate claims only from sufficient evidence, distinguish quoted facts from inference, cite supporting sources and abstain when unsupported/conflicting beyond the task's tolerance. Verify that a citation supports its associated claim and belongs to the accessible source/version, not merely that its URL exists.

## Evaluate each stage

7. Measure Recall@K over labeled relevant documents/spans; use MRR for first relevant rank and nDCG for graded/ranked relevance when useful. Define relevance granularity, K and treatment of unanswerable queries before computing. Deduplicate document identities for document-level scores. Read [retrieval scoring](references/retrieval-scoring.md) for worked metrics and error attribution.
8. Evaluate context evidence retention and final correctness, groundedness, citation precision/support, abstention and hallucinations separately. Compare generation using oracle evidence with actual retrieval to separate retrieval from generation errors. Include poisoned sources and access-boundary cases.
9. Freeze splits by source/time/entity where leakage is plausible, repeat stochastic generation, and compare sparse, dense, hybrid, reranker and rewrite variants one at a time. Keep a component only if quality gains exceed noise and operational/complexity costs. Tune on development queries, then evaluate once on held-out sources/tasks.

Deliver a pipeline/data contract, query gold set, stage metrics, error taxonomy, provenance/citation example and ablation decision. Do not assume a vector database, framework, reranker or multi-agent retriever is required. source-driven-development owns checking engineering docs; this skill owns an application's evidence pipeline.

## Hand evidence to the decision path

Track retrieved candidates, context-visible spans and actual decision/claim support separately. Retrieval relevance does not prove support for an emitted answer. Carry source/span/version and transformation lineage into an application-owned ledger; proposed used IDs require reconciliation against observed accessible evidence and actual claim support. Cite used support, not every candidate. Hand this contract to evidence-provenance; retain retrieval metrics/pipeline ablations here. Reconcile structured facts, explanation and citations before returning grounded answers.

Attribution

Sathvikar01Sathvikar01
View sourceSee grades on GitHubMore from Sathvikar01 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →