Agent skill

Ast Grep Rule Crafter

by aiskillstore in aiskillstore/marketplace

Write AST-based code search and rewrite rules using ast-grep YAML.

No licenceAuto-check passedDevelopment

Install Ast Grep Rule Crafter

skills CLI
$ npx skills add aiskillstore/marketplace --skill ast-grep-rule-crafter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aiskillstore/marketplace ast-grep-rule-crafter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aiskillstore/marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hylarucoder/ast-grep-rule-crafter .claude/skills/ast-grep-rule-crafter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ast-grep-rule-crafter
GitHub stars
433
Token cost
~873 tokens
SKILL.md length
216 words
Files
4 (incl. references)
Skills in repo
1,044
Repo updated
First seen
Licence
None found

At a glance

Write AST-based code search and rewrite rules using ast-grep YAML.

  • The user mentions ast-grep
  • SKILL.md covers Quick Start, Project Configuration, Rule Workflow and Essential Syntax, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tree-sitter patterns

What it does

Ast Grep Rule Crafter is an agent skill from aiskillstore/marketplace. Write AST-based code search and rewrite rules using ast-grep YAML. Create linting rules, code modernizations, and API migrations with auto-fix. Use when the user mentions ast-grep, tree-sitter patterns, code search rules, lint rules with YAML, AST matching, or code refactoring patterns.

Its SKILL.md is about 870 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/common-patterns.md`, `references/rule-syntax.md` and `skill-report.json`).

It sits in Development, covering Linting and formatting, Codebase onboarding and Legacy modernization. The repository describes itself as: Security-audited skills for Claude, Codex & Claude Code. One-click install, quality verified.

When your agent uses it

  • The user mentions ast-grep
  • Tree-sitter patterns
  • Code search rules
  • Lint rules with YAML

Example prompts

  • “/ast-grep-rule-crafter”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 44923f3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are yaml and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ast Grep Rule Crafter loads about 873 tokens when it runs, and up to ~2.4k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 216 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~873
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 216 words (~873 tokens).

“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.”

— opening of SKILL.md by aiskillstore
name
ast-grep-rule-crafter

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in skills/hylarucoder/ast-grep-rule-crafter of aiskillstore/marketplace.

  • SKILL.md
  • references/common-patterns.md
  • references/rule-syntax.md
  • skill-report.json

Open the folder on GitHubat commit 44923f3

Compare with similar skills

Ast Grep Rule Crafter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ast Grep Rule Crafter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ast Grep Rule Crafter this skillaiskillstore/marketplace433—~873Automated safety check: PassNone
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Code Refactoring Workflowluongnv89/claude-howto42k—~3.1kAutomated safety check: PassMIT
File Good First BugBrowserWorks/waterfox-android3792 repos~2kAutomated safety check: PassCustom licence
Unslop CodeJCarterJohnson/vibecoded-design-tells513—~2.5kAutomated safety check: PassCustom licence
Code Quality Gatefengshao1227/ccg-workflow5.9k—~593Automated safety check: NotesMIT

Similar skills

  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Code Refactoring Workflow

    luongnv89/claude-howto

    Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.

    42k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed
  • File Good First Bug

    BrowserWorks/waterfox-android

    A skill your agent uses when the user wants to file good-first-bugs in Bugzilla for Firefox.

    379 GitHub starsUsed in 2 repos~2k tokens
    DevelopmentAuto-check passed
  • Unslop Code

    JCarterJohnson/vibecoded-design-tells

    Strips the tells that make source code read as AI-generated and forces code that fits the project instead of the model's default average.

    513 GitHub stars~2.5k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • Code Quality Gate

    fengshao1227/ccg-workflow

    Scans code for complexity, long functions, duplicated blocks, naming problems and code smells with a Node script, then reports and suggests refactors.

    5.9k GitHub stars~593 tokensUpdated 26 days ago
    DevelopmentAuto-check: notes
  • Ast Grep

    BiFangKNT/mtga

    Write and debug ast-grep rules for structural code search and rewrite.

    1.2k GitHub stars~802 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed

More from aiskillstore/marketplace

All 1,040 skills in this repo
  • Code Stats

    aiskillstore/marketplace

    Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs).

    433 GitHub starsUsed in 1 repo~697 tokens
    Auto-check: notes
  • Data Processing

    aiskillstore/marketplace

    Process JSON with jq and YAML/TOML with yq. An agent skill from aiskillstore/marketplace.

    433 GitHub starsUsed in 1 repo~720 tokens
    Auto-check: notes
  • Doc Scanner

    aiskillstore/marketplace

    Scans for project documentation files (AGENTS.md, CLAUDE.md, GEMINI.md, COPILOT.md, CURSOR.md, WARP.md, and 15+ other formats) and synthesizes guidance.

    433 GitHub starsUsed in 1 repo~644 tokens
    Auto-check: notes
  • File Search

    aiskillstore/marketplace

    Modern file and content search using fd, ripgrep (rg), and fzf.

    433 GitHub starsUsed in 1 repo~598 tokens
    Auto-check: notes
  • Find Replace

    aiskillstore/marketplace

    Modern find-and-replace using sd (simpler than sed) and batch replacement patterns.

    433 GitHub starsUsed in 1 repo~527 tokens
    Auto-check: notes
  • Project Planner

    aiskillstore/marketplace

    Detects stale project plans and suggests session commands. An agent skill from aiskillstore/marketplace.

    433 GitHub starsUsed in 1 repo~504 tokens
    Auto-check passed

Categories

Questions about Ast Grep Rule Crafter

What does Ast Grep Rule Crafter do?

Write AST-based code search and rewrite rules using ast-grep YAML. Ast Grep Rule Crafter is an agent skill from aiskillstore/marketplace. Write AST-based code search and rewrite rules using ast-grep YAML.

When should I use Ast Grep Rule Crafter?

Ast Grep Rule Crafter fits situations like: the user mentions ast-grep; tree-sitter patterns; code search rules; lint rules with YAML.

How do I install Ast Grep Rule Crafter in Claude Code?

Run `npx skills add aiskillstore/marketplace --skill ast-grep-rule-crafter -a claude-code`. Or copy the skill folder (skills/hylarucoder/ast-grep-rule-crafter in aiskillstore/marketplace) into .claude/skills/ast-grep-rule-crafter in your project. Claude Code loads it when a task matches its description.

How do I install Ast Grep Rule Crafter in Codex?

Run `npx skills add aiskillstore/marketplace --skill ast-grep-rule-crafter -a codex`. Or copy the skill folder (skills/hylarucoder/ast-grep-rule-crafter in aiskillstore/marketplace) into .agents/skills/ast-grep-rule-crafter in your project. Codex loads it when a task matches its description.

Can I use Ast Grep Rule Crafter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aiskillstore/marketplace --skill ast-grep-rule-crafter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ast-grep-rule-crafter, .gemini/skills/ast-grep-rule-crafter, .github/skills/ast-grep-rule-crafter and .opencode/skills/ast-grep-rule-crafter in your project.

What does Ast Grep Rule Crafter need to run?

SKILL.md names no scripts, command-line tools or credentials: Ast Grep Rule Crafter is instructions for the agent only. Our summary lists: Python 3.

Does Ast Grep Rule Crafter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ast Grep Rule Crafter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ast Grep Rule Crafter use?

No licence was found for Ast Grep Rule Crafter or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Ast Grep Rule Crafter use?

About 873 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Ast Grep Rule Crafter?

Skills that share tags, products or a category with Ast Grep Rule Crafter: Rust Best Practices (farm-fe/farm, 5.6k stars), Code Refactoring Workflow (luongnv89/claude-howto, 42k stars), File Good First Bug (BrowserWorks/waterfox-android, 379 stars) and Unslop Code (JCarterJohnson/vibecoded-design-tells, 513 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ast Grep Rule Crafter?

aiskillstore (a GitHub organization) maintains it in aiskillstore/marketplace, which has 433 GitHub stars. The repository holds 1,044 skills in this directory. The repository was last updated on October 10, 2026.

Source: aiskillstore/marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.