/agentic-awesome-skills:ast-grep-codemodsfrom agentic-awesome-skills
Searches and refactors code structurally using ast-grep (Tree-sitter AST rules). Replaces multi-line call sites without corrupting comments or strings, previews diffs, and verifies YAML rules.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
ast-grep rules with pattern, fix, not, or inside constraints.Verify ast-grep (sg or ast-grep) is installed and check its version (ast-grep --version), target languages, and git working-tree cleanliness. Keep edits in a clean git branch so codemod diffs can be reviewed and reverted cleanly.
$VAR matches a single AST node (an identifier, expression, or literal), $$$ARGS matches zero or more sibling nodes (such as variadic argument lists), and $_ matches an anonymous node without capturing.rule.yml), quote any pattern or fix value that contains : or braces (for example fix: "apiClient.request({ url: $URL, options: $OPTS })"). Unquoted colons inside object literals cause YAML parse errors.inside, has, not) and constraints so only genuine call sites match (for example excluding the helper's own definition or test mocks).ast-grep run --debug-query=ast -l <lang> -p '<snippet>' when a pattern fails to match the expected AST node kind.ast-grep scan --rule rule.yml <paths> (or --json=compact to audit match counts) and inspect the proposed diff before modifying source files.--update-all, or -i for interactive review on risky refactors).ast-grep rewrites syntax structurally; it does not resolve cross-file types or imports automatically unless your rule explicitly handles them.Migrate multi-line
legacyFetch(url, opts)calls in TypeScript toapiClient.request({ url, options })without altering comments or string literals that mentionlegacyFetch.
Run the worked TypeScript structural rewrite to verify the quoted YAML rule, dry-run diff output, and --update-all result.
ast-grep matches syntax trees per file, not semantic symbol tables or resolved TypeScript/Rust types; a different function with the same local name can match unless constrained by context or import checks.rustfmt).Always start with a clean git working tree and run ast-grep scan without --update-all first. Limit target paths to authorized source directories so generated bundles, vendored dependencies, or fixtures are not rewritten unintentionally.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ast-grep, tree-sitter, codemod, refactoring, static-analysis
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills2 plugins in one repository ship this exact skill · first indexed Dec 1, 2026
3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.Other plugins' skills for the same job