·ast-grep
{}

ast-grep

编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。

10安装·1热度·@buildrtech

安装

$npx skills add https://github.com/buildrtech/dotagents --skill ast-grep

如何安装 ast-grep

通过命令行快速安装 ast-grep AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/buildrtech/dotagents --skill ast-grep
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:buildrtech/dotagents。

SKILL.md

查看原文

This skill helps translate natural language queries into ast-grep rules for structural code search. ast-grep uses Abstract Syntax Tree (AST) patterns to match code based on its structure rather than just text, enabling powerful and precise code search across large codebases.

Follow this process to help users write effective ast-grep rules:

Clearly understand what the user wants to find. Ask clarifying questions if needed:

编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。 来源:buildrtech/dotagents。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/buildrtech/dotagents --skill ast-grep
分类
{}数据分析
认证
收录时间
2026-02-25
更新时间
2026-03-10

Browse more skills from buildrtech/dotagents

快速解答

什么是 ast-grep?

编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。 来源:buildrtech/dotagents。

如何安装 ast-grep?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/buildrtech/dotagents --skill ast-grep 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/buildrtech/dotagents