agent-skill
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
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 moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
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.