skill-rag-router
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill RAG Router
Skill RAG Router
Intelligent skill discovery and routing system using semantic search and knowledge graph relationships.
基于语义搜索和知识图谱关联的智能技能发现与路由系统。
Capabilities
功能特性
- Semantic Skill Search: Uses for meaning-based skill matching
ck --sem - Hybrid Search: Combines semantic + keyword matching via
ck --hybrid - Session Awareness: Integrates with beads/bd for session context
- Memory Integration: Uses claude-mem for cross-session learning
- 语义技能搜索:使用进行基于语义的技能匹配
ck --sem - 混合搜索:通过结合语义+关键词匹配
ck --hybrid - 会话感知:与beads/bd集成以获取会话上下文
- 记忆集成:使用claude-mem实现跨会话学习
Trigger Conditions
触发条件
Activate this skill when:
- User explicitly requests skill discovery (, "find a skill for...")
/meta - Task complexity score >= 0.7
- Task involves > 20 files
- Task spans > 2 domains (frontend, backend, security, etc.)
- User asks "what skill can help with..."
在以下场景激活该技能:
- 用户明确请求技能发现(,“为我找一个能...的技能”)
/meta - 任务复杂度评分≥0.7
- 任务涉及文件数>20
- 任务跨越>2个领域(前端、后端、安全等)
- 用户询问“什么技能可以帮我处理...”
Usage
使用方法
bash
undefinedbash
undefinedExplicit invocation
显式调用
/meta [query]
/meta [查询内容]
Examples
示例
/meta "optimize prompts for RAG pipeline"
/meta "debug authentication flow"
/meta "refactor legacy codebase"
undefined/meta "优化RAG流水线的提示词"
/meta "调试认证流程"
/meta "重构遗留代码库"
undefinedSearch Implementation
搜索实现
bash
undefinedbash
undefinedSemantic search for skills
技能语义搜索
ck --sem "[query]" ~/.claude/skills/ --jsonl --top-k 5
ck --sem "[query]" ~/.claude/skills/ --jsonl --top-k 5
Hybrid search (semantic + keyword)
混合搜索(语义+关键词)
ck --hybrid "[query]" ~/.claude/skills/ --threshold 0.6
ck --hybrid "[query]" ~/.claude/skills/ --threshold 0.6
Index skills
技能索引
ck --index ~/.claude/skills/ --model bge-small --quiet
undefinedck --index ~/.claude/skills/ --model bge-small --quiet
undefinedOutput Format
输出格式
Returns ranked skill suggestions with:
- Skill name and path
- Confidence score (0-1)
- Relevant snippet from SKILL.md
- Trigger match explanation
返回排序后的技能建议,包含:
- 技能名称与路径
- 置信度得分(0-1)
- 来自SKILL.md的相关片段
- 触发匹配说明
Integration Points
集成点
- SessionStart: Indexes skills, loads routing cache
- UserPromptSubmit: Analyzes prompts for skill suggestions
- beads/bd: Session-aware task tracking
- claude-mem: Cross-session routing patterns
- SessionStart:索引技能,加载路由缓存
- UserPromptSubmit:分析提示词以提供技能建议
- beads/bd:会话感知任务追踪
- claude-mem:跨会话路由模式学习
Scripts
脚本
- : Index all skills with ck
scripts/index-skills.sh - : Main routing logic
scripts/router.sh - : Intent → skill matching for hooks
scripts/suggest-skills.sh
- :使用ck为所有技能建立索引
scripts/index-skills.sh - :主路由逻辑
scripts/router.sh - :用于钩子的意图→技能匹配脚本
scripts/suggest-skills.sh