Gitto - GitHub Bug Pattern Search
Purpose
Turn a bug description into targeted GitHub code and issue searches, then summarize patterns and candidate fixes.
When to Use
- Investigating a bug and want to see how others solved similar issues
- Looking for code patterns or examples from public repositories
- The user provides a problem statement but no specific repo to inspect
- Redux/RTK issue triage - finding related issues or prior art
Inputs
- Bug description (required)
- Optional: language, framework, error strings, org/repo constraints, result limit
Process
- Extract key phrases, error strings, and likely library/framework terms from the bug description
- Build 2-4 query variants with GitHub code search qualifiers
- Run searches using the gitto script (uses
ghCLI if authenticated, falls back to API) - Rank results by relevance and return URLs with snippets
- Provide analysis: summarize patterns, likely root causes, and 2-3 candidate fixes
Command
bun ~/.config/opencode/skill/gitto/gitto-search.ts \
--query "<bug description or keywords>" \
--language "typescript" \
--limit 15 \
--issues true
Options
--query(required): Bug description or search keywords--language: Filter by language (e.g., "typescript", "javascript")--repo: Specific repo (e.g., "reduxjs/redux-toolkit")--org: Organization filter--limit: Max results (default: 20)--issues: Include issue search (default: true)
Output Format
- Code results: Repo, file path, URL, snippet
- Issue results: Title, URL, body snippet
- Use results to provide analysis of patterns and candidate fixes
Example Usage
For Redux middleware issues:
bun ~/.config/opencode/skill/gitto/gitto-search.ts \
--query "middleware dispatch undefined action" \
--org "reduxjs" \
--language "typescript" \
--limit 10
For React hooks errors:
bun ~/.config/opencode/skill/gitto/gitto-search.ts \
--query "useEffect cleanup memory leak" \
--language "typescript" \
--issues true
Notes
- Prefers
ghCLI when authenticated for better rate limits - Falls back to public GitHub API if
ghnot available - Does not print or log any tokens
- For Redux issue triage, consider adding
--org reduxjs