astgrep

Community

Unified code search via AST + ripgrep.

Authorraystyle
Version1.0.0
Installs0

System Documentation

What problem does it solve?

AST-based code search enables precise structural matching that textual searches often miss, accelerating code exploration and safer refactoring by focusing on syntax and node relationships rather than just text.

Core Features & Use Cases

  • SG-search: structural pattern matching using ASTs to find code constructs.
  • RG-search: text search fallback for broad coverage.
  • SG-rewrite: safe, previewable code rewriting to apply structural changes.
  • Language support: sg-langs and sg-check coordinate language support and tooling readiness.
  • Use Case: locate function-call patterns, identify refactor opportunities, audit legacy code across large codebases.

Quick Start

Start by running sg-search with a query to locate code patterns across your codebase and review results before optionally applying sg-rewrite changes with --apply.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: astgrep
Download link: https://github.com/raystyle/skills/archive/main.zip#astgrep

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.