Skip to main content

rag-context

Dynamically fetch and inject relevant context from files, codebases, docs, or external sources.

Source facts

Repository
glayph/Agent
Last source activity
September 19, 2026 at 22:39
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
rag-context
description
Dynamically fetch and inject relevant context from files, codebases, docs, or external sources.
version
1.0.0
author
Miki
license
MIT
platforms
["linux","macos","windows"]
metadata
{"Miki":{"tags":["rag","retrieval","context-injection","knowledge-base"],"related_skills":["semantic-summarization","memory-management"]}}
# Retrieval-Augmented Context (Dynamic RAG) ## Trigger conditions - User mentions RAG, retrieval, context injection, knowledge base - Task requires info not in active conversation (code reference, API docs, config) - User asks "check X" or "look up Y" ## Retrieval strategy (ordered by cost) ### 1. Exact match (fastest) - Grep/RG for known symbols, filenames, error strings - Use glob for file patterns ### 2. Semantic (codebase) - Read file headers, imports, exports, type signatures - Grep for function/class definitions matching intent ### 3. Structural (docs/config) - Read README, package.json, tsconfig, config YAML - Scan directory tree for relevant paths ### 4. External (web) - Fetch docs URLs, search web for API references - Fetch GitHub raw content for library source ## Context injection rules - **Prefer excerpts over whole files** — extract 5-20 relevant lines - **Tag source origin**: `[src/path.ts:42]` or `[web: docs.url]` - **Summarize what you found** before quoting - **If nothing found**: say so immediately — don't fabricate ## Multi-turn RAG - Track what's already retrieved in-session - Don't re-fetch same content unless explicitly asked - On ambiguity: retrieve top 2-3 candidates, present choices
View on GitHub