
Ast Grep
This teaches Claude how to write and debug ast-grep rules, the AST-based code search and transformation tool. It walks through the full workflow from inspecting AST structure to writing YAML rules with patterns, meta variables, and constraints. The 46 best practices are categorized by impact, which is genuinely useful since ast-grep's relational rules and meta variable system have real gotchas. The recurring emphasis on "always use stopBy: end" hints at a common footgun. If you're setting up linting rules or doing large-scale code migrations and want Claude to understand ast-grep's pattern syntax without hallucinating invalid YAML, this covers the essentials.
- skills.sh installs
- 340
- GitHub stars
- 222
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pproenca/dot-skills --skill ast-grep --agent claude-codeInstalls into .claude/skills of the current project.
Files
ast-grep Community Best Practices
Comprehensive best practices guide for ast-grep rule writing and usage, maintained by the ast-grep community. Contains 46 rules across 8 categories, prioritized by impact to guide automated rule generation and code transformation.
When to Apply
Reference these guidelines when:
- Writing new ast-grep rules for linting or search
- Debugging patterns that don't match expected code
- Optimizing rule performance for large codebases
- Setting up ast-grep projects with proper organization
- Reviewing ast-grep rules for correctness and maintainability
General Workflow
Follow this workflow when creating ast-grep rules for code search:
Step 1: Understand the Query
Clarify what you want to find:
- Target programming language
- Edge cases to handle
- What to include vs exclude
Step 2: Create Example Code
Write a sample code snippet representing the desired match pattern.
Step 3: Write the ast-grep Rule
Sponsors
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Documentation, Debugging
- First seen
- Jun 3, 2026
More from pproenca/dot-skills
All 100- Audio Voice Recovery340
- Orval338
- Mui Base335
- Codemod334
- Vhs331
- Skill Authoring330
- Unix Cli326
- Python323
- Rust Refactor322
- Ios Design System319
- 12 Factor App318
- Js Google317
- Tailwind Refactor314
- Pulumi310
- Harness Engineering305
- Ios Hig303
- Rails Testing301
- Think301
- Ruby Refactor299
- Ios Xcode298
- Restful Hateoas298
- Rails Dev293
- Ios Ui Refactor291
- Ruby Optimise286