graph-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSearch Code Knowledge Graph
搜索代码知识图谱
Search for code entities by name.
.gauntlet/graph.db通过名称搜索中的代码实体。
.gauntlet/graph.dbSteps
步骤
-
Accept query: Get the search term from the user.
-
Run the query script:bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/graph_query.py \ --action search --query "<term>" --limit 20Optional filters:- to search only functions
--kind Function - to search only classes
--kind Class
-
Display results: Show qualified name, file path, line numbers, and relevance score for each match.
-
Offer to read: Ask if the user wants to read the top result's source file.
-
接收查询:获取用户输入的搜索词。
-
运行查询脚本:bash
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/graph_query.py \ --action search --query "<term>" --limit 20可选筛选条件:- :仅搜索函数
--kind Function - :仅搜索类
--kind Class
-
展示结果:显示每个匹配项的限定名称、文件路径、行号和相关性评分。
-
提供读取选项:询问用户是否要读取排名第一的结果对应的源文件。
Query Intelligence
查询智能
The search engine detects query patterns:
- PascalCase (e.g., ): boosts Class and Type results
UserService - snake_case (e.g., ): boosts Function results
get_users - Dotted path (e.g., ): boosts qualified name matches
app.models.User
搜索引擎可识别查询模式:
- PascalCase(例如:):提升类和类型结果的权重
UserService - snake_case(例如:):提升函数结果的权重
get_users - 点路径(例如:):提升限定名称匹配的权重
app.models.User
Prerequisites
前置条件
The graph must be built first. If
does not exist, suggest running the skill.
.gauntlet/graph.dbgraph-build必须先构建图谱。如果不存在,建议运行技能。
.gauntlet/graph.dbgraph-build