Claude Skill
ast-grep/agent-skill
一款 Claude Skill,使 AI 代理能够利用 ast-grep 的 AST 模式匹配功能执行复杂的代码分析和转换,实现自动化重构和代码维护。
概览
仓库信息
安装这个 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
项目简介
ast-grep 项目的 Claude Skill,使 AI 代理能够使用抽象语法树(AST)模式执行代码分析和转换任务。
要点
- 基于 AST 的代码分析
- 用于代码转换的模式匹配
- 与 AI 代理集成
- 自动化代码重构
- 语法感知的搜索和替换
使用场景
- 自动化代码重构
- 批量代码修改
- 代码库中的语法感知搜索
- 代码质量改进
- 框架间迁移
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: ```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
话题
暂无话题