ast-grep-rule-crafter

Installation
SKILL.md

ast-grep Rule Crafter

ast-grep uses tree-sitter to parse code into AST, enabling precise pattern matching. Rules are defined in YAML for linting, searching, and rewriting code. The job is not "write a pattern" — it is to ship a rule that has been validated against a positive AND a negative fixture, so it catches what it should and nothing it shouldn't.

Project Configuration

项目级扫描需要 sgconfig.yml 配置文件:

# sgconfig.yml (项目根目录)
ruleDirs:
  - rules          # 规则目录,递归加载所有 .yml 文件

典型项目结构:

Installs
1
GitHub Stars
283
First Seen
Jun 8, 2026
ast-grep-rule-crafter — hylarucoder/hai-stack