ast-grep agent-skill
COMMUNITYLABSCO SUMMARY
The named skill, ast-grep, teaches an agent to write ast-grep rules -- metavariables, relational queries, composite AND/OR/NOT logic -- so it can search a codebase by code structure instead of plain text: functions missing error handling, a call made with too many arguments, a hook used inside another hook, that kind of pattern. It needs the ast-grep binary itself already on the machine, installed through Homebrew, npm, or cargo, since the skill is a guide to a command-line tool rather than a self-contained capability.
This is for someone doing a large or unfamiliar-codebase refactor or audit who wants AST-aware search instead of grep, and specifically someone using Claude Code, since the package ships as a Claude Code plugin marketplace rather than a plain skill folder; the README is explicit that Claude will not reach for this skill on its own and has to be told to use ast-grep by name.
READ THE FULL ANALYSIS
A second skill lives in the repository with no README mention at all. ast-grep-outline gives an agent a cheap structural map of a codebase's files, directories, imports, exports, and top-level members before it reads full source -- a distinct job from the rule-writing skill above -- but nothing in the README's installation steps, usage notes, or file listing names it; we found it only by reading the skill files directly.
Both skills share the same one dependency. Neither needs an account or a network call; both assume only that the ast-grep CLI is already installed and on PATH, so the entire package's cost to start is that one command-line tool.
ALSO IN THIS PACKAGE
ast-grep
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search.
WHAT'S INSIDE
2 showing · 2 totalast-grep
Searching code by its shape rather than its text — you describe the structure you are after, not the exact characters, and get back every place in the codebase that matches.
ast-grep-outline
Prints the skeleton of a file or a folder — what it defines, what it pulls in, what it hands out, each with a line number — so you can open just the part that matters.
HOW TO GET IT
npx skills add ast-grep/agent-skillnpx skills add ast-grep/agent-skill --skill <name> --full-depthPick the skill name from the Skills tab — each entry there installs independently.
/plugin marketplace add ast-grep/agent-skill/plugin install ast-grep@ast-grep-marketplaceTyped inside the agent's own prompt, not in a terminal. The marketplace is called ast-grep-marketplace, which is the part after the @.