About sourcebot
A usage guide for developers researching external libraries, frameworks, and code patterns with Sourcebot MCP. It defines a repository-scoped search workflow and distinguishes external code research from local code search.
Key features
- 01Workflow for external code and pattern searches
- 02Repository ID format guidance
- 03Repository-scoped search instructions
- 04Retrieving specific file contents
- 05Division between external and local search tools
Use cases
- 01Find API usage in external libraries
- 02Locate code examples in official repositories
- 03Research framework implementations and practices
- 04Look for dependency upgrade and migration patterns
MCP support
The guide covers using Sourcebot MCP to list repositories, search code, and retrieve file contents. It requires searches to be scoped by repository IDs.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ pedronauck/ skills --skill sourcebotAfter installing, type/sourcebotin Claude Code to confirm it loaded.
Details
From the project READMESourcebot Guide
Expert guidance for using Sourcebot MCP to search external libraries, frameworks, and code patterns.
When to Use
- External library research: Finding code patterns in Effect-TS, TanStack, Vercel AI SDK, etc.
- API discovery: Understanding how external libraries implement specific features
- Documentation examples: Finding real-world usage examples from official repositories
- Framework patterns: Learning best practices from external framework codebases
- Migration guidance: Finding upgrade patterns and breaking changes in external libraries
When NOT to Use
- Local project code: Use
codebase_searchorosgrep searchinstead - Local components: Use local search tools for project files
- Local utilities: Never use Sourcebot for your own codebase
Required Workflow
- First, call
list_reposto get available repository IDs - Identify relevant repository ID(s) for your search (e.g., "Effect-TS/effect" for EffectTS)
- Always include
filterByRepoIdswhen callingsearch_code - Use
get_file_sourceto fetch specific file contents when needed
Repository ID Format
- CRITICAL: Repository IDs must be in format
"owner/repo"(e.g.,"Effect-TS/effect","vercel/ai") - DO NOT include the
github.com/prefix - The
list_repostool returns IDs like"github.com/owner/repo"- strip the prefix when using infilterByRepoIds
Usage Examples
Searching EffectTS patterns
{
"query": "Effect.gen yield",
"filterByRepoIds": ["Effect-TS/effect"],
"includeCodeSnippets": true
}
Searching AI SDK
{
"query": "streamText tool calling",
"filterByRepoIds": ["vercel/ai"],
"includeCodeSnippets": true
}
Searching multiple repos
{
"query": "error handling patterns",
"filterByRepoIds": ["Effect-TS/effect", "vercel/ai"],
"includeCodeSnippets": true
}
Best Practices
- Use descriptive queries (not just keywords, but full descriptions)
- Always specify
filterByRepoIdsto scope searches - Set
includeCodeSnippets: truewhen you need actual code examples - Use
get_file_sourceafter finding relevant files to see full context
Tool Hierarchy for Code Search
- Sourcebot - For EXTERNAL libraries and frameworks only
codebase_search(if available) - For local project codeosgrep search- For local code when codebase_search unavailablegrep/find- Last resort for exact string matching
Critical Requirements
- MANDATORY: Use Sourcebot MCP 5-7 times when researching external libraries
- CRITICAL: NEVER use Sourcebot to search local project code
- CRITICAL: Always use
filterByRepoIdson EVERYsearch_codecall - TASK INVALIDATION: Task will be invalidated if you don't use Sourcebot 5-7 times when dealing with external libraries
- AFTER SOURCEBOT: Also use Perplexity and Context7 for updated information on external libraries
Comments
Markdown supported