Claude Skill
ast-grep/agent-skill
A Claude Skill that enables AI agents to perform sophisticated code analysis and transformation using ast-grep's AST pattern matching capabilities for automated refactoring and code maintenance.
Overview
Repository
Install this Skill
npm install -g @ast-grep/cliRegistry
npm install -g @ast-grep/clinpx skills add ast-grep/agent-skillgit clone https://github.com/ast-grep/claude-skill.git /path/to/local-marketplace
Summary
A Claude Skill for the ast-grep project, enabling AI agents to perform code analysis and transformation tasks using abstract syntax tree (AST) patterns.
Key features
- AST-based code analysis
- Pattern matching for code transformation
- Integration with AI agents
- Automated code refactoring
- Syntax-aware search and replace
Use cases
- Automated code refactoring
- Bulk code modifications
- Syntax-aware search in codebases
- Code quality improvement
- Migration between frameworks
README excerpt
# 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: ```bash # macOS brew install ast-grep # npm npm install -g @ast-grep/cli # cargo cargo install ast-grep ``` Verify installation: ```bash 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: ```bash /plugin marketplace add ast-grep/agent-skill ``` 2. **Install the ast-grep plugin**: ```bash /plugin install ast-grep ``` 3. **Restart Claude Code** to activate the plugin 4. **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: ```bash # Clone the repository git clone https://github.com/ast-grep/claude-skill.git /path/to/local-marketplace # Add as local marketplace /plugin marketplace ad
Topics
No topics yet.