什麼是 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