🔍
QualityTypeScript

Ast-Grep

by code-yeongyu

Ast-Grep is a Quality skill for Claude Code, published by code-yeongyu in lazycodex.

3.2K stars201 forkson code-yeongyu/lazycodexAdded 2026/08/17+1% in starsRepository updated 2026/08/09
aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
Install in seconds
Install Ast-Grep
Copy Ast-Grep into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/code-yeongyu/lazycodex/tree/main/plugins/omo/skills/ast-grep ~/.claude/skills/ast-grep

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/code-yeongyu/lazycodex.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
plugins/omo/skills/ast-grep/SKILL.md in code-yeongyu/lazycodex
Installs to
~/.claude/skills/ast-grep
Collection
One of 25 skills cataloged from this repository
Category
Quality1354 skills

What Ast-Grep does

Ast-Grep performs AST-aware code search and rewrite, letting you match code by structure rather than text. Use it for deterministic codemods like rewriting console.log to logger.info, stripping `as any`, or migrating require to import across a codebase.

Ast-Grep is cataloged under Quality on DirSkills. Ast-Grep comes from a repository tagged ai, ai-agents, claude, claude-code and cli.

Documentation

README

ast-grep

sg (also installed as ast-grep) is an AST-aware search and rewrite tool across 25 languages. It treats your pattern as code, parses it the same way it parses your project, and matches structurally. It is the right tool whenever your question depends on code shape rather than text bytes.

This skill ships a Python wrapper at scripts/ast_grep_helper.py and platform install scripts at install.sh (POSIX) and install.ps1 (Windows). The helper adds offline pattern validation, the two-pass write trick, and binary auto-resolution. Use it as your default entry point.


When to use this skill

Use it whenever the user's question is about code structure, not bytes:

This is the opening of the README. Read the full README on GitHub.

Frequently asked about Ast-Grep

  • What else does code-yeongyu publish alongside Ast-Grep?

    Ast-Grep is one of 25 skills that DirSkills catalogs from code-yeongyu/lazycodex, the repository it ships in. Its siblings there include Bug Fix Contribution, Codex Rules and Coding Agent Sessions. Each one is a separate skill with its own page in this directory, installs the same way Ast-Grep does, and is maintained by code-yeongyu in that same repository. The rest of the collection is listed on the code-yeongyu/lazycodex page.

  • How does Ast-Grep compare to other Quality skills?

    Ast-Grep ranks #404 by stars among the 1354 Quality skills in this catalog. The most-starred ones next to it are Benchmark, Benchmark Optimization Loop and API Design Patterns. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Ast-Grep against them. Open each page to compare what they document and how they install.

More from code-yeongyu/lazycodex

Ast-Grep is one of 25 skills cataloged on DirSkills from code-yeongyu/lazycodex.

See all 25 skills
🐛
2w ago

Bug Fix Contribution

Bug Fix Contribution debugs a concrete LazyCodex or Codex defect, implements the smallest tested fix in a fresh temporary workspace, and delivers it as a verified-fix issue for LazyCodex-owned repos or a fork PR for upstream openai/codex.
Quality
3.2K201
📜
2w ago

Codex Rules

Codex Rules injects static project instructions and file-specific rules into Codex sessions automatically. Use it to configure supported rule file locations, matching behavior, and environment variables for Codex.
AI Engineering
3.2K201
🔍
2w ago

Coding Agent Sessions

Coding Agent Sessions locates, reads, and reconstructs coding-agent sessions across products such as Codex, Claude, OpenCode, Senpi, and others. Use it when asked to find, search, or export local agent transcripts, session IDs, token usage, or subagent histories.
AI Engineering
3.2K201
💬
2w ago

Comment Checker

Comment Checker helps Codex understand and respond to automatic comment-checker feedback emitted after successful edit-like PostToolUse hooks. Use it when a patch triggers a warning and Codex must fix or explain the flagged comment before moving on.
AI Engineering
3.2K201
📊
2w ago

Data Scientist

Data Scientist processes and analyzes data files using DuckDB and Polars for high-performance workloads. Use it when you need to query, filter, join, aggregate, visualize, or clean CSV, Parquet, JSON, or DuckDB datasets.
Data
3.2K201
🐞
2w ago

Debugging

Debugging applies a hypothesis-driven workflow to find root causes of crashes, silent failures, wrong responses, memory leaks, and async misbehavior in any language or binary, using runtime evidence and locking fixes with failing tests. Use it when attaching debuggers, reverse engineering binaries, or reproducing flaky or CI-only failures.
Quality
3.2K201