什么是 ast-grep?
编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。 来源:buildrtech/dotagents。
编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。
通过命令行快速安装 ast-grep AI 技能到你的开发环境
来源:buildrtech/dotagents。
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编写 ast-grep 规则以执行结构代码搜索和分析的指南。当用户需要使用抽象语法树 (AST) 模式搜索代码库、查找特定代码结构或执行简单文本搜索之外的复杂代码查询时使用。当用户要求搜索代码模式、查找特定的语言结构或查找具有特定结构特征的代码时,应该使用此技能。 来源:buildrtech/dotagents。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/buildrtech/dotagents --skill ast-grep 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/buildrtech/dotagents