ast-grep-find

Solid

AST-based code search and refactoring via ast-grep MCP

AI & Automation 496 stars 41 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
90
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# AST-Grep Find Structural code search that understands syntax. Find patterns like function calls, imports, class definitions - not just text. ## When to Use - Find code patterns (ignores strings/comments) - Search for function calls, class definitions, imports - Refactor code with AST precision - Rename variables/functions across codebase ## Usage ### Search for a pattern ```bash uv run python -m runtime.harness scripts/ast_grep_find.py \ --pattern "import asyncio" --language python ``` ### Search in specific directory ```bash uv run python -m runtime.harness scripts/ast_grep_find.py \ --pattern "async def \$FUNC(\$\$\$)" --language python --path "./src" ``` ### Refactor/replace pattern ```bash uv run python -m runtime.harness scripts/ast_grep_find.py \ --pattern "console.log(\$MSG)" --replace "logger.info(\$MSG)" \ --language javascript ``` ### Dry run (preview changes) ```bash uv run python -m runtime.harness scripts/ast_grep_find.py \ --pattern "print(\$X)" --replace "logger.info(\$X)" \ --language python --dry-run ``` ## Parameters | Parameter | Description | |-----------|-------------| | `--pattern` | AST pattern to search (required) | | `--language` | Language: `python`, `javascript`, `typescript`, `go`, etc. | | `--path` | Directory to search (default: `.`) | | `--glob` | File glob pattern (e.g., `**/*.py`) | | `--replace` | Replacement pattern for refactoring | | `--dry-run` | Preview c...

Details

Author
vibeeval
Repository
vibeeval/vibecosystem
Created
2 months ago
Last Updated
1 months ago
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category