بنقرة واحدة
rag-for-code-documentation
Handle code-aware retrieval by preserving symbols, file structure, and API context.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Handle code-aware retrieval by preserving symbols, file structure, and API context.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use this skill when building, debugging, or improving Retrieval-Augmented Generation systems, including chunking, vector database selection, hybrid search, reranking, multimodal RAG, code documentation RAG, retrieval latency, and production RAG architecture.
Chunk nested documents into parent-child levels so retrieval can move from broad sections to fine-grained passages.
Use semantic boundaries and embedding similarity to chunk text for higher-relevance retrieval.
Route RAG chunking decisions across semantic, hierarchical, sliding-window, contextual-header, and framework-selection strategies.
Use overlapping windows to preserve context across chunk boundaries while controlling retrieval size.
Reduce retrieval latency with caching, batching, and index-level optimization.
| name | rag-for-code-documentation |
| title | RAG for Code Documentation |
| description | Handle code-aware retrieval by preserving symbols, file structure, and API context. |
| allowed-tools | ["Read","Grep","Glob","Bash"] |
| category | data-type-handling |
| tags | ["code","programming","syntax","api","documentation"] |
RAG for code documentation requires specialized handling due to code's structured nature, syntax-specific patterns, and the importance of preserving function signatures, imports, and contextual relationships. This skill covers embedding code snippets, handling API references, and retrieving code-aware context.
Generic RAG approaches struggle with code-related queries:
Parse code files into structured chunks that preserve syntactic units.
Why: AST-based parsing preserves code structure that would be lost with generic text chunking.
Use embeddings designed for code or augment text embeddings with code-aware features.
Why: Code-specific embeddings capture semantic meaning in code (function relationships, patterns) that general embeddings miss.
Store code chunks with rich metadata for effective retrieval.
Why: Rich metadata enables filtering by language, type, file path, and other code-specific attributes.
Search with code-specific considerations.
Why: Code-aware search combines semantic understanding with precise filtering for programming-specific use cases.
Specialized handling for API reference queries.
Why: API queries often require exact matching (function/class names) rather than pure semantic search.
Practical references include the CodeBERT paper, GraphCodeBERT paper, StarCoder paper, and GitHub code search.