ast-grep

Provides an agent-friendly wrapper and MCP bindings for ast-grep (sg), letting the agent search and rewrite code by AST shape across many languages, run YAML rules, validate patterns offline, and install the ast-grep binary. Includes a Python helper, install scripts for POSIX/Windows, docs, and smoke tests.

Searches and rewrites code by AST shape across 25 languages. Use when the target is a syntax pattern (every call/class/import shaped like X, a codemod, a YAML rule) rather than literal text; for plain strings, comments, or filenames, use rg.

  • Category: Software development
  • Source: code-yeongyu/oh-my-openagent at commit 224bf31
  • Stars: 71160
  • License: See LICENSE
  • Automated scan and AI review: passed on commit 224bf31 (2026-11-28); includes scripts. All 18 files read in full by the automated scan and the AI review.

What this skill does on your computer

  • Runs commands or scripts on your computer
  • Downloads or installs packages
  • Connects to the internet or other services
  • Creates or changes files
  • Needs administrator or cluster-admin rights
  • Performs security testing (only on systems you're authorized to test)

We checked version 224bf31 on 2026-11-28. Later changes to the repository haven't been checked; the install command gets the checked version.

Works with

  • Claude Code: copy the folder to ~/.claude/skills/ast-grep/ (or .claude/skills/<skill>/ in a project)
  • OpenAI Codex: copy the folder to ~/.codex/skills/ast-grep/
  • GitHub Copilot: copy the folder to .github/skills/ast-grep/ in your repository
  • Cursor: copy the folder to the skills folder in your Cursor settings
  • Gemini CLI: copy the folder to the skills folder in your Gemini CLI settings
  • Amp: copy the folder to the skills folder in your Amp settings

Install the checked version: npx degit code-yeongyu/oh-my-openagent/packages/shared-skills/skills/ast-grep#224bf31ac0aac9446f9ee265f5c3a10e9ba6bd46 ast-grep. AI Agents Store never runs skills, and checks can miss things: review the files before you install. How we review skills