Ast Grep
Best-practice rule-writing guide for ast-grep, covering patterns, meta variables, composition, constraints, and rewrites.
- CCM score
- 50 of 100
- skills.sh installs
- 351
- GitHub stars
- 228
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers a 5-step workflow from understanding the query through testing and codebase search, plus quick tips
- Includes 46 rules across 8 prioritized categories, from pattern correctness and meta variables to performance and testing
- Enforces
stopBy: endon relational rules (inside,has) so subtree searches stay complete - Designed for writing, reviewing, or debugging YAML rules, pattern syntax, and code rewrites in ast-grep
Install
$ npx -y skills add pproenca/dot-skills --skill ast-grep -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Code Review & Quality, CLI & Terminal
- First seen
- Jun 3, 2026
Questions
What is ast-grep?
ast-grep is an agent skill listed on Claude Marketplaces in the Code Review & Quality category. The listing describes ast-grep like this: ast-grep rule writing and usage best practices.
How do I install ast-grep?
Run npx -y skills add pproenca/dot-skills --skill ast-grep -y in a project to install ast-grep. After that, the agent can use ast-grep in that project.
Which category is ast-grep in?
ast-grep is in the Code Review & Quality category on Claude Marketplaces. Other listings in that category next to ast-grep include improve-codebase-architecture, codebase-design and code-review.
Where is the source code of ast-grep?
The source code of ast-grep is on GitHub at https://github.com/pproenca/dot-skills. The pproenca account on GitHub publishes ast-grep.
More from pproenca/dot-skills
All 100- Mui Base346
- Codemod345
- Skill Authoring345
- Vhs342
- Unix Cli338
- 12 Factor App337
- Rust Refactor336
- Python335
- Ios Design System333
- Js Google328
- Tailwind Refactor326
- Pulumi321
- Harness Engineering317
- Ios Hig314
- Rails Testing313
- Ruby Refactor313
- Think313
- Ios Xcode311
- Restful Hateoas308
- Ios Ui Refactor307
- Rails Dev303
- Swift Optimise297
- Ruby Optimise296
- Ios Testing293
Similar to Ast Grep
More Code Review & Qualitycodemodpproenca/dot-skills345 installsBest-practice guide for writing codemods with JSSG, ast-grep, and workflows, covering 48 rules.
jscodeshiftpproenca/dot-skills427 installsBest-practice guide with 40 rules for writing, reviewing, and debugging jscodeshift codemods across eight prioritized categories.
writing-hookify-rulesanthropics/claude-plugins-official8.2K installsGuide to writing hookify rule files, covering frontmatter fields, event types, and regex pattern tips.
semgrep-rule-creatortrailofbits/skills7K installsGuided workflow for writing custom Semgrep rules with test-first validation, taint mode prioritized for data flow issues.
grepai-search-basicsyoanbernabeu/grepai-skills963 installsBeginner's guide to GrepAI semantic code search, matching by meaning rather than exact text.
dx-code-analyzer-custom-rule-createforcedotcom/sf-skills5K installsCreate custom Code Analyzer rules with Regex, PMD/XPath, or ESLint to enforce patterns beyond the built-in set.