skills/smithery.ai/code-search

code-search

SKILL.md

Code Search & Refactoring Tools

ast-grep vs ripgrep

When to Use ast-grep

Use ast-grep when structure matters. It parses code and matches AST nodes, so results ignore comments/strings, understand syntax, and can safely rewrite code.

Best for:

  • Refactors/codemods: rename APIs, change import forms, rewrite call sites or variable kinds
  • Policy checks: enforce patterns across a repo (scan with rules + test)
  • Editor/automation: LSP mode; --json output for tooling
  • Any operation where you'll apply changes to code

When to Use ripgrep

Use ripgrep when text is enough. It's the fastest way to grep literals/regex across files.

Installs
3
First Seen
Mar 21, 2026