Agent Skill banner
ast-grep ast-grep

Agent Skill

Development community

Description

A Claude Code plugin marketplace containing the ast-grep skill for powerful structural code search using Abstract Syntax Tree (AST) patterns. Search your codebase based on code structure rather than j

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ast-grep Plugin Marketplace for AI Agents

A Claude Code plugin marketplace containing the ast-grep skill for powerful structural code search using Abstract Syntax Tree (AST) patterns. Search your codebase based on code structure rather than just text matching.

What is This?

This is a **Claude Code plugin marketplace** that provides the **ast-grep plugin**. The plugin includes a skill that teaches Claude how to write and use ast-grep rules to perform advanced code searches. Unlike traditional text-based search (grep, ripgrep), ast-grep understands the structure of your code, allowing you to find patterns like:

  • "Find all async functions that don't have error handling"
  • "Locate all React components that use a specific hook"
  • "Find functions with more than 3 parameters"
  • "Search for console.log calls inside class methods"

Prerequisites

You need to have ast-grep installed on your system:

# macOS
brew install ast-grep

# npm
npm install -g @ast-grep/cli

# cargo
cargo install ast-grep

Verify installation:

ast-grep --version

Installation

Option 1: Install via skills.sh (Recommended)

npx skills add ast-grep/agent-skill

Option 2: Install via Marketplace

  1. Add the marketplace to your Claude Code:
/plugin marketplace add ast-grep/agent-skill
  1. Install the ast-grep plugin:
/plugin install ast-grep
  1. **Restart Claude Code** to activate the plugin

  2. **Verify installation**: Use `/help` to see if ast-grep skill is available

Option 3: Install Locally for Development

If you're developing or testing locally:

# Clone the repository
git clone https://github.com/ast-grep/agent-skill.git /path/to/local-marketplace

# Add as local marketplace
/plugin marketplace add /path/to/local-marketplace

# Install the plugin
/plugin install ast-grep

Usage Notes

You will need to ask Claude to use this skill explicitly in your queries, like "Use ast-grep to find...