jelly-ast-grep

Search and refactor code across repositories using AST pattern matching.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/dev-jelly/jelly-dotclaude --skill jelly-ast-grep
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jelly-ast-grep
Source: https://github.com/dev-jelly/jelly-dotclaude/tree/main/skills/jelly-ast-grep
Command: npx skills add https://github.com/dev-jelly/jelly-dotclaude --skill jelly-ast-grep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables semantic code search and refactoring using AST patterns, enabling reliable structural edits.

Core Features & Use Cases

  • AST-based search: find code patterns by structure, not text.
  • Refactor and rename: apply safe renames across a codebase.
  • Lint-like patterns: enforce coding conventions.

Quick Start

Use sg commands to search for a function by its AST pattern and apply a refactor.

Frequently Asked Questions about jelly-ast-grep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for code patterns across a codebase without using text matching?

AST-based semantic search locates code by structure rather than text strings. This Skill uses abstract syntax trees to find functions, classes, and patterns reliably across 20+ programming languages, even when syntax varies.

Can I refactor and rename symbols safely across multiple files?

Yes. This Skill applies AST-based pattern matching to identify and rename symbols consistently across your entire codebase, using sg commands with meta-variable syntax to ensure structural correctness in refactors.

What programming languages does AST-based code search support?

This Skill supports semantic search and refactoring across 20+ programming languages through AST analysis, enabling multi-language repository workflows for finding functions, classes, and enforcing coding conventions.

How do I detect anti-patterns and enforce coding conventions across my code?

Use AST patterns to scan your codebase for structural anti-patterns and linting violations. This Skill's pattern-matching engine locates non-compliant code structures and outputs results as JSON for automated remediation.

Can I use this for API migration and large-scale refactoring?

Yes. AST-based pattern matching enables safe API migrations and large-scale refactors by identifying all structural occurrences of deprecated APIs or patterns, then applying replacements with interactive editing and CLI workflows.

What's the difference between AST search and traditional grep for code refactoring?

AST search understands code structure and semantics, so it finds logically equivalent patterns regardless of formatting or syntax variations. Traditional grep matches text literally, missing structural equivalents and causing false positives in refactors.