スキル一覧に戻る
natsukium

ast-grep

by natsukium

ast-grepは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

91🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: ast-grep description: AST-based code search and transformation tool using tree-sitter. Use for structural pattern matching, refactoring deprecated APIs, detecting anti-patterns, migrating code between library versions, and enforcing coding standards.

ast-grep - AST-based Code Search and Transformation

ast-grep is an AST-based tool for searching, linting, and refactoring code across multiple languages. It uses tree-sitter to parse code into Abstract Syntax Trees, enabling precise structural pattern matching.

Key Pattern Syntax

  • $META - Matches a single AST node (e.g., $VAR, $FUNC, $ARG)
  • $$$ - Matches zero or more AST nodes (useful for function arguments, statements)
  • $_ - Non-capturing metavariable (matches but doesn't capture)
  • Patterns must be syntactically valid code in the target language

Triggers

AST pattern, structural search, code refactoring, find anti-patterns, migrate code, console.log, deprecated API, function definition, class search, method signature, unused variables, security vulnerabilities, code transformation, pattern matching

When to Use

  • Finding specific code patterns across large codebases
  • Refactoring code (replacing deprecated APIs, updating syntax)
  • Detecting anti-patterns or potential bugs
  • Migrating between library versions
  • Enforcing coding standards
  • Interactive code rewriting

Examples

スコア

総合スコア

65/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新

+5
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です