Use this skill when working with ast-grep, an AST-based code search, lint, and rewrite tool. Activate when the user asks to search code patterns, refactor code structurally, create linting rules, or perform AST-based code analysis. Helps with pattern syntax, meta-variables, rule configuration, and CLI commands for Java, JavaScript, TypeScript, Python, Rust, Go, and 20+ other languages.
安装
npx skills add skempken/ast-grep-skill --skill ast-grepnpx skills add skempken/ast-grep-skill --skill ast-grep -a claude-code -gnpx skills add skempken/ast-grep-skill --skill ast-grep -a codex -ggemini skills install https://github.com/skempken/ast-grep-skill.git --path .claude/skills/ast-grepgh skill install skempken/ast-grep-skill ast-grepgit clone --depth 1 https://github.com/skempken/ast-grep-skill /tmp/skempken__ast-grep-skill
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/skempken__ast-grep-skill/.claude/skills/ast-grep ~/.claude/skills/ast-grep # Claude Code
cp -R /tmp/skempken__ast-grep-skill/.claude/skills/ast-grep ~/.agents/skills/ast-grep # Codex, Cursor, Gemini CLI, Copilot, OpenCode