ast-grep

A skill in NousResearch/hermes-agent · 264,703 stars on GitHub

AST-aware structural code search and rewrite via ast-grep.

Security grade of this SKILL.md: SAFE · how we grade

How to install ast-grep

npx skills add NousResearch/hermes-agent --skill ast-grep -a claude-code

The skills CLI copies this one skill into Claude Code (use -a for another agent). Or read its SKILL.md on GitHub.

What the SKILL.md says

ast-grep (binary also named sg) is an AST-aware search and rewrite tool across 25 languages. It treats your pattern as code, parses it the same way it parses your project, and matches structurally. It is the right tool whenever your question depends on code shape rather than text bytes. This skill ships a Python wrapper at scripts/ast_grep_helper.py and platform install scripts at install.sh (POSIX) and install.ps1 (Windows). The helper adds offline pattern validation, the two-pass write trick, and binary auto-resolution. Use it as your default entry point. Upstream source: vendored from code-yeongyu/ast-grep-skill (MIT), as shipped in oh-my-openagent's shared-skills bundle. Use it whenever the question is about code structure, not bytes: "Find every function that takes a Request parameter.". "Rewrite every console.log(x) to logger.info(x).". "Strip every as any cast.".

Other skills in NousResearch/hermes-agent

  • 1password Set up op CLI, sign in, and read or inject secrets.
  • 3-statement-model Build integrated IS/BS/CF financial workbooks in Excel.
  • accelerate Run PyTorch training across GPUs with minimal changes.
  • actual-setup Set up Actual Computer (actual.inc) inference in Hermes.
  • adversarial-ux-test Roleplay a hostile user to find and triage UX pain points.
  • agent-merge-conflict-arbiter Neutral arbiter for merge conflicts between two agents.
  • agentmail Use when an agent needs AgentMail CLI email inboxes.
  • ai-presenter-video Make a verified AI presenter video from script + image.
  • airtable Airtable REST API via curl. Records CRUD, filters, upserts.
  • anatomy Explain an idea as an interactive isometric machine figure.
  • antigravity-cli Operate the Antigravity CLI (agy): plugins, auth, sandbox.
  • apple-notes Manage Apple Notes via memo CLI: create, search, edit.
  • apple-reminders Apple Reminders via remindctl: add, list, complete.
  • archify Validated interactive HTML diagrams, upstream-maintained.
  • architecture-diagram Dark-themed SVG architecture/cloud/infra diagrams as HTML.
  • arxiv Search arXiv papers by keyword, author, category, or ID.
  • ascii-art ASCII art: pyfiglet, cowsay, boxes, image-to-ascii.
  • ascii-video ASCII video: convert video/audio to colored ASCII MP4/GIF.
  • auteur Design and build cinematic, award-level web pages.
  • axolotl Axolotl: YAML LLM fine-tuning (LoRA, DPO, GRPO).