Skip to content
cccskills
FreePublished on GitHub

ast-grep

Use this skill when the user wants to search code structurally using AST patterns, perform linting, or rewrite code automatically across multiple files.

The English summary is being prepared. Showing the original description.

javimosch/supercli56 stars(GitHub 56 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md1.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

ast-grep Plugin

AST-based code structural search, lint, and rewriting.

Commands

Search

  • ast-grep search run — Search using AST pattern

Rewrite

  • ast-grep rewrite run — Rewrite code using pattern and replacement

Lint

  • ast-grep lint run — Run linting rules
  • ast-grep scan run — Scan directory with rules

Usage Examples

  • "Find all usages of $A && $A() pattern in TypeScript"
  • "Replace null coalescing patterns"
  • "Lint the codebase for specific patterns"
  • "Scan src directory for violations"

Installation

npm install --global @ast-grep/cli
# or
cargo install ast-grep
# or
brew install ast-grep

Examples

# Search for AST pattern
ast-grep --pattern 'const $X = $Y' --lang ts

# Rewrite code
ast-grep --pattern '$A && $A()' --lang ts --rewrite '$A?.()'

# Run lint
ast-grep lint

# Scan directory
ast-grep scan src/

Key Features

  • Pattern looks like real code
  • Supports JS, TS, Python, Rust, Go, Java, etc.
  • Use $VAR as wildcard for AST nodes
  • YAML-based lint rules -批量 code rewriting

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill when the user wants to use 100-exercises-to-learn-rust.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

2to3

Free

Use this skill when the user wants to use 2to3, cli tool: 2to3.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

Use this skill when the user wants to use 2to3-2.7, cli tool: 2to3-2.7.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

Use this skill when the user wants to use 2to3-3.11, cli tool: 2to3-3.11.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

Use this skill when the user wants to use 411toppm, cli tool: 411toppm.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

Use this skill when the user wants to use 53AIHub.

The English summary is being prepared. Showing the original description.

javimosch/supercli56Updated Oct 30, 2026

See all skills by javimosch

Report a problem with this skill