Search Shopify's codebase using Grokt code search. Use when searching code across Shopify repos, finding implementations, looking up symbols, reading files from indexed repos, bulk searching multiple patterns, or checking index stats. Triggers on grokt, code search, search code, find code, search shopify repos, bulk search, get file from repo, grokt stats, search codebase.
Grokt indexes Shopify's repositories for fast code search. The skill wraps the Grokt MCP via a compiled CLI.
The CLI binary is pre-compiled at scripts/grokt. It connects to https://grokt.shopify.io/mcp (HTTP transport, no auth needed on VPN).
# Search for code
scripts/grokt search-code --query "Shop.current file:app/models" --per-page 10
# Bulk search multiple patterns at once
scripts/grokt bulk-search --queries "Shop.current,PaymentMethod,def process_payment"
# Get full file contents
scripts/grokt get-file --repo "shop/world" --path "app/models/shop.rb"
# Check index stats
scripts/grokt grokt-stats
Search across all indexed Shopify repositories. Supports regex and filters.
scripts/grokt search-code --query "<query>" [--scope <scope>] [--page <n>] [--per-page <n>]
| Flag | Default | Description |
|---|---|---|
--query | required | Search query (see syntax below) |
--scope | optimal | optimal (all repos) or shop-world (monorepo only) |
--page | 0 | Pagination offset |
--per-page | 10 | Results per page (max 50) |
Query syntax:
| Pattern | Meaning |
|---|---|
snowdevil | Files containing "snowdevil" |
potato or snowdevil | Either word |
class snowdevil | Both words (AND, any order) |
"class Kafka" | Exact phrase |
Kafka | Case-sensitive (uppercase) |
kafka | Case-insensitive (lowercase) |
snowdevil -test | Exclude files with "test" |
snowdevil -file:test | Exclude paths containing "test" |
Shop.current file:app/models | Only in app/models/ |
flag lang:ruby | Only Ruby files |
config f:\.yml$ | Files ending in .yml |
foo.*bar | Regex pattern |
def (create|update)_ | Regex alternation |
sym:PaymentMethod | Symbol definitions only |
Search for multiple patterns in a single request (max 10 queries).
scripts/grokt bulk-search --queries "Shop.current,PaymentMethod,def process_payment" [--scope <scope>] [--per-page <n>]
Retrieve full file contents from any indexed repository.
scripts/grokt get-file --repo "shop/world" --path "app/models/shop.rb"
The github.com/ prefix on repo is optional.
Get index statistics (repo count, file count, index size, last update).
scripts/grokt grokt-stats
| Flag | Description |
|---|---|
--timeout <ms> | Call timeout in milliseconds |
--output <format> | text (default), markdown, json, raw |
scripts/grokt search-code --query "sym:PaymentMethod lang:ruby"scripts/grokt get-file --repo "<repo>" --path "<path>"scripts/grokt bulk-search --queries "def authorize,def capture,def refund" --scope optimal --per-page 5--scope shop-world to restrict to shop/world| Problem | Fix |
|---|---|
| Connection timeout | Ensure you're on Shopify VPN |
| No results | Simplify query — multiple words are AND'd. Start with 1-2 keywords |
| Too many results | Add file/lang filters or use exact phrases |