什么是 ast-grep?
通过 ast-grep 进行结构代码搜索 — 当代码形状和元素关系(而不仅仅是文本)很重要时使用。例如,“查找没有错误处理的异步函数”、“将 foo(a, b) 重构为 foo({ a, b })”。使用 Grep 进行简单的名称查找。 来源:poteto/noodle。
通过 ast-grep 进行结构代码搜索 — 当代码形状和元素关系(而不仅仅是文本)很重要时使用。例如,“查找没有错误处理的异步函数”、“将 foo(a, b) 重构为 foo({ a, b })”。使用 Grep 进行简单的名称查找。
通过命令行快速安装 ast-grep AI 技能到你的开发环境
来源:poteto/noodle。
Use Tasks to track progress. Create a task for each step below (TaskCreate), mark each inprogress when starting and completed when done (TaskUpdate). Check TaskList after each step.
Without it, has/inside stop at the first non-matching node instead of traversing the full subtree:
$VAR gets interpreted by the shell. Either escape or single-quote:
通过 ast-grep 进行结构代码搜索 — 当代码形状和元素关系(而不仅仅是文本)很重要时使用。例如,“查找没有错误处理的异步函数”、“将 foo(a, b) 重构为 foo({ a, b })”。使用 Grep 进行简单的名称查找。 来源:poteto/noodle。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/poteto/noodle --skill ast-grep通过 ast-grep 进行结构代码搜索 — 当代码形状和元素关系(而不仅仅是文本)很重要时使用。例如,“查找没有错误处理的异步函数”、“将 foo(a, b) 重构为 foo({ a, b })”。使用 Grep 进行简单的名称查找。 来源:poteto/noodle。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/poteto/noodle --skill ast-grep 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/poteto/noodle