mcpField
S
sourcebot

sourcebot

github.com/pedronauckDevelopment644185 installsUpdated 1w ago
Repository

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

  1. 01Workflow for external code and pattern searches
  2. 02Repository ID format guidance
  3. 03Repository-scoped search instructions
  4. 04Retrieving specific file contents
  5. 05Division between external and local search tools

Use cases

  1. 01Find API usage in external libraries
  2. 02Locate code examples in official repositories
  3. 03Research framework implementations and practices
  4. 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 sourcebot

After installing, type/sourcebotin Claude Code to confirm it loaded.

Details

From the project README

Sourcebot 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_search or osgrep search instead
  • Local components: Use local search tools for project files
  • Local utilities: Never use Sourcebot for your own codebase

Required Workflow

  1. First, call list_repos to get available repository IDs
  2. Identify relevant repository ID(s) for your search (e.g., "Effect-TS/effect" for EffectTS)
  3. Always include filterByRepoIds when calling search_code
  4. Use get_file_source to 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_repos tool returns IDs like "github.com/owner/repo" - strip the prefix when using in filterByRepoIds

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 filterByRepoIds to scope searches
  • Set includeCodeSnippets: true when you need actual code examples
  • Use get_file_source after finding relevant files to see full context

Tool Hierarchy for Code Search

  1. Sourcebot - For EXTERNAL libraries and frameworks only
  2. codebase_search (if available) - For local project code
  3. osgrep search - For local code when codebase_search unavailable
  4. grep/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 filterByRepoIds on EVERY search_code call
  • 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