ast-grep
A skill from the OmAgents toolkit for searching and rewriting code by its syntax tree with the ast-grep command-line tool, so matches inside strings and comments are not picked up as they would be with plain text search.
スキルの内容
A skill from the OmAgents toolkit for searching and rewriting code by its syntax tree with the ast-grep command-line tool, so matches inside strings and comments are not picked up as they would be with plain text search. It checks whether sg is installed or can run through npx, explains pattern syntax with metavariables that bind one node or many, and lets the language be detected from file extensions or set explicitly. Rewrites are always previewed before being applied to all files. A refactor mode works one file at a time through a task queue kept by a loop_engine.py script, running tests after each change, and grep equivalents are given when ast-grep is missing.
できること
- Search code by syntax pattern
- Preview and apply structural rewrites
- Refactor file by file with tests after each
- Fall back to grep when ast-grep is missing
概要
- 公開元
- OmAgents
インストール
プロジェクトのドキュメントに、確認できるインストール手順がありません。 プロジェクトの手順を見る
含まれるファイル
- agents/openai.yaml
MCPサーバーやスキルは、お使いのコンピューターでコードを実行したり、データを操作したりできます。インストールする前にソースを確認してください。
詳細
出典
- スキルファイル(SKILL.md)github.com/omagents/omagents2026年11月17日
- GitHubリポジトリgithub.com/omagents/omagents · 根拠となる項目:ライセンス, 公開元, 活動状況2026年11月17日
- リポジトリ内のフォルダ(ast-grep)github.com/omagents/omagents · 根拠となる項目:スクリプトを含む2026年11月17日