Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

searching-sourcegraph搜索源图

Agent Skill

searching-sourcegraph 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

931

周安装

40

GitHub Stars

6

下载量

326
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:searching-sourcegraph(搜索源图)
来源仓库:https://github.com/sourcegraph-community/sourcegraph-skill
仓库路径:skills/searching-sourcegraph
安装命令:
npx skills add https://github.com/sourcegraph-community/sourcegraph-skill --skill searching-sourcegraph
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sourcegraph-community/sourcegraph-skill --skill searching-sourcegraph

简介

用于在 SourceGraph 平台上搜索代码实例和跨仓库引用。

  • 适合查找特定函数用法、API 实现或依赖关系。
  • 使用时需提供编程语言、符号名或正则表达式。searching-sourcegraph 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装前建议确认宿主是否支持外部 API 调用。
  • 注意部分私有仓库可能无法访问,需权限配合。

SKILL.md

Searching Sourcegraph

Search before you build. Existing patterns reduce tokens, ensure consistency, and surface tested solutions.

Tool Selection Logic

Start here:

  1. Know the exact symbol or pattern?keyword_search
  2. Know the concept, not the code?nls_search
  3. Need to understand how/why?deepsearchdeepsearch_read
  4. Tracing a symbol's usage?find_references
  5. Need full implementation?go_to_definitionread_file
  6. Need to know what repos a user has worked on?get_contributor_repos
GoalTool
Concepts/semantic searchnls_search
Exact code patternskeyword_search
Trace usagefind_references
See implementationgo_to_definition
Initiate a deep searchdeepsearch
Read deep search resultsdeepsearch_read
Read filesread_file
Browse structurelist_files
Find reposlist_repos
Search commitscommit_search
Track changesdiff_search
Compare versionscompare_revisions
Find repos a user has worked onget_contributor_repos

Scoping (Always Do This)

repo:^github.com/ORG/REPO$           # Exact repo (preferred)
repo:github.com/ORG/                 # All repos in org
file:.*\.ts$                         # TypeScript only
file:src/api/                        # Specific directory
file:.*\.test\.ts$ -file:__mocks__   # Tests, exclude mocks

Start narrow. Expand only if results are empty.

Combine filters: repo:^github.com/myorg/backend$ file:src/handlers lang:typescript

Context-Aware Behaviour

When the user provides a file path or error message:

  • Extract symbols, function names, or error codes
  • Search for those exact terms first
  • Trace references if the error involves a known symbol

When the user asks "how does X work":

  • Use deepsearch to initiate the search, then deepsearch_read to retrieve results
  • Follow up with read_file on key files mentioned in the response

When the user asks who worked on something or what repos a contributor has touched:

  • Use get_contributor_repos with one or more usernames to discover their active repositories
  • Then scope subsequent searches to those repos

When the user is implementing a new feature:

  • Search for similar existing implementations first
  • Read tests for usage examples
  • Check for shared utilities before creating new ones

When troubleshooting an error, build failure, or runtime exception:

  • Extract exact symbols, error codes, or log lines from the stack trace or build output
  • Search for the error site, then trace the full call chain with find_references
  • Check recent changes with diff_search and commit_search early — regressions are common
  • Identify all affected code paths and services before proposing a fix

When fixing a bug:

  • Extract exact symbols from the error message or stack trace
  • Search for the error site, then trace the full call chain with find_references
  • Check recent changes with diff_search and commit_search early — regressions are common
  • Find all affected code paths before writing the fix
  • Read existing tests to understand intended behaviour

Workflows

For detailed step-by-step workflows, see:

  • workflows/implementing-feature.md — when building new features
  • workflows/understanding-code.md — when exploring unfamiliar systems
  • workflows/debugging-issue.md — when troubleshooting errors, build failures, stack traces, support issues, or runtime exceptions
  • workflows/fixing-bug.md — when fixing bugs with extensive Sourcegraph search
  • workflows/code-review.md — when reviewing a pull request or changeset

Efficiency Rules

Minimise tool calls:

  • Chain searches logically: search → read → references → definition
  • Don't re-search for the same pattern; use results from prior calls
  • Prefer keyword_search over nls_search when you have exact terms (faster, more precise)

Batch your understanding:

  • Read 2-3 related files before synthesising, rather than reading one and asking questions
  • Use deepsearch + deepsearch_read for "how does X work" instead of multiple keyword searches

Avoid common token waste:

  • Don't search all repos when you know the target repo
  • Don't use deepsearch for simple "find all" queries — keyword_search is faster
  • Don't re-read files you've already seen in this conversation

Query Patterns

IntentQuery
React hooksfile:.*\.tsx$ use[A-Z].*= \(
API routes`file:src/api app\.(get\post\put\delete)`
Error handling`catch.*Error\\.catch\(`
Type definitions`file:types/ export (interface\type)`
Test setup`file:.*\.test\. beforeEach\beforeAll`
Config files`file:(webpack\vite\rollup)\.config`
CI/CDfile:\.github/workflows deploy

For more patterns, see query-patterns.md.

Output Formatting

Search results:

  • Present as a brief summary, not raw tool output
  • Highlight the most relevant file and line
  • Include a code snippet only if it directly answers the question

Code explanations:

  • Start with a one-sentence summary
  • Use the codebase's own terminology
  • Reference specific files and functions

Recommendations:

  • Present as numbered steps if actionable
  • Link to specific patterns found in the codebase
  • Note any existing utilities that should be reused

Common Mistakes

MistakeFix
Searching all reposAdd repo:^github.com/org/repo$
Too many resultsAdd file: pattern or keywords
Missing relevant codeTry nls_search for semantic matching
Not understanding contextUse deepsearch_read
Guessing patternsRead implementations with read_file

Principles

  • Start narrow, expand if needed
  • Chain tools: search → read → find references → definition
  • Check tests for usage examples
  • Read before generating

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.5%
按下载量换算109

Claude

28.97%
按下载量换算94

Cursor

19.67%
按下载量换算64

Gemini CLI

9.61%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills