Skip to content
Kitbay
Submit
Skill

ast-grep

NOASSERTIONUpdated on Nov 11, 202670,828GitHub starsIncludes scripts

A shared skill in the oh-my-openagent repository for searching and rewriting code by syntax tree with ast-grep, across about 25 languages.

What the skill teaches

A shared skill in the oh-my-openagent repository for searching and rewriting code by syntax tree with ast-grep, across about 25 languages. It tells the agent to use ast-grep for structural questions, such as calls to a function or empty catch blocks, and to leave text searches to ripgrep and meaning questions to language servers. Patterns are written as code with metavariables, checked before searching, and every rewrite is run as a dry run first. A bundled standard-library Python helper wraps search, replace, YAML rule scans, pattern checks and installation, with install scripts for POSIX and Windows. A source note says the folder is a synced copy of the author's separate ast-grep-skill repository.

Capabilities

  • Search code by syntax pattern
  • Preview and apply structural rewrites
  • Run and test YAML lint rules
  • Install ast-grep on any operating system