名称: sourcegraph-integration 描述: Sourcegraph跨仓库代码搜索。用于搜索代码模式、查找实现和探索代码库。支持仓库和文件过滤器。 允许的工具: Bash(python *)
Sourcegraph代码搜索
认证
重要: 凭证由代理层自动注入。直接运行脚本即可。
可用脚本
所有脚本位于 .claude/skills/vcs-sourcegraph/scripts/
search.py - 代码搜索
python .claude/skills/vcs-sourcegraph/scripts/search.py --query "func handleError" [--repo-filter "github.com/org/*"] [--file-filter "*.go"] [--limit 20]
搜索语法
| 过滤器 | 示例 | 描述 |
|---|---|---|
repo: |
repo:github.com/org/* |
按仓库过滤 |
file: |
file:*.py |
按文件路径过滤 |
lang: |
lang:python |
按语言过滤 |
type: |
type:symbol |
搜索类型(符号、文件、差异、提交) |
查询支持正则表达式模式。