·ast-grep
{}

ast-grep

ampcode/amp-contrib

編寫 ast-grep 規則以執行結構代碼搜索和分析的指南。當用戶需要使用抽象語法樹 (AST) 模式搜索代碼庫、查找特定代碼結構或執行簡單文本搜索之外的複雜代碼查詢時使用。當用戶要求搜索代碼模式、查找特定的語言結構或查找具有特定結構特徵的代碼時,應該使用此技能。

29安裝·0熱度·@ampcode

安裝

$npx skills add https://github.com/ampcode/amp-contrib --skill ast-grep

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) 模式搜索代碼庫、查找特定代碼結構或執行簡單文本搜索之外的複雜代碼查詢時使用。當用戶要求搜索代碼模式、查找特定的語言結構或查找具有特定結構特徵的代碼時,應該使用此技能。 來源:ampcode/amp-contrib。

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/ampcode/amp-contrib --skill ast-grep
分類
{}資料分析
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 ast-grep?

編寫 ast-grep 規則以執行結構代碼搜索和分析的指南。當用戶需要使用抽象語法樹 (AST) 模式搜索代碼庫、查找特定代碼結構或執行簡單文本搜索之外的複雜代碼查詢時使用。當用戶要求搜索代碼模式、查找特定的語言結構或查找具有特定結構特徵的代碼時,應該使用此技能。 來源:ampcode/amp-contrib。

如何安裝 ast-grep?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/ampcode/amp-contrib --skill ast-grep 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/ampcode/amp-contrib

詳情

分類
{}資料分析
來源
skills.sh
收錄時間
2026-02-01