Use when: exploring code, search code snippets, finding implementations by intent, understanding how features work. Triggers: [fast context], [search code], [find where], [how does X work], [understand codebase], [research codebase], [find X], [locate X], [code search], [grep code], [where is], [let me search].
/plugin marketplace add towry/dots/plugin install claude-code-skills@local-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
SKILL-disable.mdscripts/sgrep.shrg to grep file content, use fd to find files.bunx repomix ./ will generate repomix-output.xml file in repo root contains codebase index, you can use grep to search in it quickly.bunx repomix ./ only once to generate the index file, the index file contains all the file paths and code snippets of the codebase.rg <pattern> repomix-output.xml -m 3 to narrow down search scope.fd if you want to search files.It is faster to first narrow down search scope with repomix-output.xml THAN do a global search and grep all the time.
Find files by name:
# .nix files
fd -e nix
# .tsx files
fd -e tsx
# Files named "config" in src/
fd "config" src/
# .nix files with "config" in name
fd -e nix "config"
# .nix files with "config" in name in nix/ directory
fd -e nix "config" nix/
# Exclude pattern
fd -e nix "config" --exclude "node_modules"
# Exclude multiple patterns
fd -e nix "config" --exclude "*.test.nix" --exclude "ai"
Search file content:
# Exact phrase
rg "function handleClick"
# Regex pattern
rg "export.*useHook"
# Show 2 lines after match
rg -A 2 "TODO"
# In .nix files with pattern match
rg -t nix "export"
# In .tsx files with pattern match
rg -t tsx "TODO"
# Fixed string search (literal, not regex)
rg -F "TODO:"
# Search with glob pattern
rg "export" --glob "*.nix"
# Search in specific directory with glob
rg "TODO" --glob "conf/**"
# Exclude pattern with !
rg "TODO" --glob "!node_modules"
# Include directory, exclude files matching pattern
rg "TODO" --glob "nix/**" --glob "!**/*test*"
Search in repomix index:
bunx repomix ./
# use -m 3 to limit match lines in per-file
rg "search term" repomix-output.xml -m 3 | head -20
rg "search term" repomix-output.xml -m 3 | tail -10
Once you get the concrete file paths or code snippets, you can use rg or fd again to further narrow down or explore related code.