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-code

Installs 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
1secondsky avatarcloudflare-workers-testingsecondsky/claude-skillsComprehensive testing guide for Cloudflare Workers using Vitest and @cloudflare/vitest-pool-workers. Use for test setup, binding mocks (D1/KV/R2/DO), integratio340skills.sh installs
2wordflowlab avatarsetting-detectorwordflowlab/novel-writer-skillsAutomatically detects story settings (genres, time periods, themes) based on keywords and activates corresponding knowledge bases - works silently in the backgr339skills.sh installs
3makenotion avatarnotion-meeting-intelligencemakenotion/claude-code-notion-pluginPrepares meeting materials by gathering context from Notion, enriching with Claude research, and creating both an internal pre-read and external agenda saved to338skills.sh installs
4onewave-ai avatarinbound-lead-qualifieronewave-ai/claude-skillsAnalyze inbound leads (form fills, demo requests) and score based on ICP fit, intent, and urgency. Auto-generates qualification questions, routes to right rep, 338skills.sh installs
5pproenca avatarorvalpproenca/dot-skillsOrval OpenAPI TypeScript client generation best practices. This skill should be used when configuring Orval, generating TypeScript clients from OpenAPI specs, s338skills.sh installs
6webflow avatarcms-collection-setupwebflow/webflow-skillsCreate a new CMS collection in Webflow with specified fields and relationships. Use when setting up blog posts, products, team members, portfolios, or other con337skills.sh installs