</>MCP Agents Market
Plugin

agent-skill

by ast-grep869Updated 2026-09-13

Claude Code

The ast-grep plugin for Claude Code enables AI-powered structural code search using Abstract Syntax Tree (AST) pattern matching instead of simple text-based searching. Developed by ast-grep, this plugin teaches Claude how to write and execute ast-grep rules to find code patterns based on structure rather than strings—locating async functions without error handling, React hooks in specific contexts, or functions exceeding parameter limits. Developers install it via the Claude Code plugin marketplace and then query Claude using natural language to search their codebase intelligently. The plugin supports JavaScript, TypeScript, Python, Rust, Go, Java, C/C++, and many other languages.

Key Features

Structure-aware code search based on Abstract Syntax Tree patterns rather than text matching
Metavariable support using $VAR syntax to match any expression, statement, or identifier
Relational queries to find code within specific contexts (e.g., find X inside Y)
Composite logic operations combining rules with AND, OR, and NOT conditions
Test-driven approach that validates rules against example code before searching the codebase
Multi-language support including JavaScript, TypeScript, Python, Rust, Go, Java, C/C++, Ruby, and PHP
Natural language interface allowing developers to ask Claude for complex code searches
Integration with Claude Code's plugin marketplace for streamlined installation

Use Cases

  • 01Find async functions missing try-catch error handling blocks
  • 02Locate React components using specific hooks or patterns
  • 03Identify functions with excessive parameters for refactoring
  • 04Discover console.log statements in production code or specific contexts
  • 05Detect potential security vulnerabilities like SQL injection points or unsafe eval usage
  • 06Search for deprecated function usage across a codebase during migration

Related Plugins

View more

agent-skill — FAQ

What is the ast-grep Claude Code plugin?+

It's a Claude Code plugin that enables structural code search using Abstract Syntax Tree patterns. Unlike text-based grep tools, it understands code structure, allowing you to find patterns like async functions without error handling or React components using specific hooks.

How do I install the ast-grep plugin in Claude Code?+

First install ast-grep CLI on your system (via brew, npm, or cargo), then run '/plugin marketplace add ast-grep/agent-skill' in Claude Code, followed by '/plugin install ast-grep', and restart Claude Code. Alternatively, use 'npx skills add ast-grep/agent-skill' for quick installation.

What are the prerequisites for using this plugin?+

You must have the ast-grep CLI tool installed on your system before using the plugin. Install it via Homebrew (macOS), npm globally, or cargo, then verify with 'ast-grep --version'.

Which programming languages does the ast-grep plugin support?+

The plugin supports many languages including JavaScript, TypeScript, Python, Rust, Go, Java, C, C++, Ruby, PHP, and more. It works with any language that ast-grep's AST parser can handle.

Is the ast-grep Claude Code plugin free to use?+

Yes, the plugin is open source and follows the MIT license. Both the plugin and the underlying ast-grep tool are free to use.

How do I use the ast-grep plugin after installation?+

Ask Claude natural language questions about code patterns you want to find, and explicitly mention using ast-grep (e.g., 'Use ast-grep to find all async functions with await'). Claude will create appropriate AST-based search rules and execute them on your codebase.

How do I install agent-skill?+

Open the source repository on GitHub and follow its README. agent-skill is a plugin — MCP Agents Market links you directly to the official repo.

Is agent-skill free?+

agent-skill is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches