一键导入
ccg-rag
Use this skill for semantic code search and codebase understanding. CCG-RAG provides intelligent retrieval using code embeddings and knowledge graphs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill for semantic code search and codebase understanding. CCG-RAG provides intelligent retrieval using code embeddings and knowledge graphs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | ccg-rag |
| description | Use this skill for semantic code search and codebase understanding. CCG-RAG provides intelligent retrieval using code embeddings and knowledge graphs. |
| allowed-tools | ["mcp__code-guardian__rag_*","mcp__code-guardian__documents_*"] |
Intelligent code and documentation retrieval using embeddings and knowledge graphs.
Activate this skill when:
rag_query - Semantic search across codebase
rag_related_code - Find similar code patterns
rag_build_index - Index/reindex codebase
documents_search - Search documentation
documents_find_by_type - Find docs by type (api, guide, spec)
documents_list - List all indexed documents
Find code by describing what it does:
"authentication middleware"
"error handling functions"
"database connection setup"
Find similar implementations:
"find functions similar to validateUser"
"show me other API endpoints"
"related test patterns"
"API documentation for auth"
"setup guide for database"
"architecture decisions"
User: "Find all code related to user authentication"
rag_query({ query: "user authentication login session" })
Results:
1. src/auth/login.ts:authenticate() - Main login handler
2. src/middleware/auth.ts:verifyToken() - JWT verification
3. src/services/session.ts:createSession() - Session management
User: "Show me code similar to the error handler in api.ts"
rag_related_code({ file: "src/api.ts", function: "handleError" })
Results:
1. src/services/db.ts:handleDbError() - 85% similar
2. src/utils/errors.ts:formatError() - 72% similar
User: "Find API documentation for payments"
documents_search({ query: "payment API integration" })
Results:
1. docs/api/payments.md - Payment API Reference
2. docs/guides/stripe-integration.md - Stripe Setup Guide
For accurate results, CCG-RAG uses:
Query → Embed → Top 20 candidates → LLM rerank → Top 5 results
rag_build_index({
paths: ["src/", "lib/"],
exclude: ["node_modules", "dist"],
languages: ["typescript", "javascript"]
})
rag_status()
{
"indexed_files": 245,
"chunks": 1847,
"last_updated": "2025-12-04T08:00:00Z",
"embedding_model": "qwen3-embedding-8b"
}
RAG enhances Latent Chain Mode:
🔍 [analysis]
1. rag_query({ query: "current auth implementation" })
2. Identify hot spots from RAG results
3. Build comprehensive codeMap
📋 [plan]
1. rag_related_code({ function: "targetFunction" })
2. Find similar patterns to follow
3. Plan patches based on existing conventions
Use this skill when working on code projects that need memory persistence, code validation, multi-agent coordination, or workflow tracking. Activates Claude Code Guardian MCP tools.
Use this skill for multi-step development tasks. Latent Chain Mode reduces token usage by 70-80% through hidden-state reasoning with 4-phase workflow: analysis → plan → impl → review.