Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/vinhnx/vtcode/ast-grepnpx skills add vinhnx/VTCode --skill ast-grepgit clone --depth 1 https://github.com/vinhnx/VTCodeWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.23734 |
| Opus 5 | $0.00012 | $0.11867 |
| Sonnet 5 | $0.00005 | $0.04747 |
| Haiku 4.5 | $0.00002 | $0.02373 |
Grade A, and why
ast-grep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,412 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ast-Grep
Use this skill for ast-grep project setup, rule authoring, rule debugging, and CLI workflows that go beyond a single structural query.
Routing
- Use
exec_commandfor ast-grep queries, project scans, rule tests, debug output, and rewrite previews. - Use
ast-grep scanfor project rules andast-grep testfor rule tests. - Use
ast-grep run --pattern=... --rewrite=... --json=compact --color=neverfor dry-run rewrite previews. Review every replacement before applying changes. - Use
ast-grep run --debug-querywhen a query matches an unexpected syntax node. - Use
--kindto match node kinds. Ast-grep supports ESQuery-style compound selectors and pseudo-selectors in supported releases. - Keep this skill read-only unless the user explicitly authorises applying a rewrite.
Quick Start
- In VT Code, prefer
vtcode dependencies install ast-grepbefore suggesting system package managers. - External install routes such as Homebrew, Cargo, npm, pip, MacPorts, or Nix are fallback options when the user explicitly wants a system-managed install.
- After installation, validate availability with
ast-grep --help. - On Linux, prefer the full
ast-grepbinary name oversgbecausesgmay already refer tosetgroups. - When running CLI patterns with shell metavariables like
$PROP, use single quotes so the shell does not expand them before ast-grep sees the pattern. - A good first rewrite example is optional chaining, for example rewriting
$PROP && $PROP()to$PROP?.().
Command Overview
ast-grep run: ad-hoc query execution and one-off rewrites.ast-grep scan: project rule scanning.ast-grep new: scaffold and rule generation.ast-grep test: rule-test execution.ast-grep lsp: editor integration via language server.
Built-In Languages
- ast-grep ships many built-in languages. Common aliases include
bash,c,cc/cpp,cs,css,ex,go/golang,html,java,js/javascript/jsx,json,kt,lua,md/markdown,php,py/python,rb,rs/rust,swift,ts/typescript,tsx, andyml. --lang <alias>and YAMLlanguage: <alias>use those built-in aliases. File-system scans infer language from built-in extensions unless the project overrides them.- Pass
--lang <alias>to the CLI when extension inference is insufficient. - Use
languageGlobswhen the repository needs a different extension mapping than ast-grep’s built-in defaults.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 1,412 lines · 24 tokens per session scan A 8771519d9649
ast-grep is a skill published in the GitHub repository vinhnx/VTCode (825 stars, last pushed 2d ago), licensed Apache-2.0. It adds 24 tokens to every session and 23,734 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
unifly
This skill should be used when the user asks to "manage UniFi devices", "configure UniFi networks", "create a VLAN", "provision an SSID", "create firewall rules", "reorder firewall policies", "create a NAT rule", "set up port forwarding", "configure masquerade NAT", "add DNS records", "manage traffic matching lists"…
verify
Drive an engine app headlessly in a pty, record a video of the whole verification, and open a summary page (video + timeline + checks) with pixel open.
claude-api
Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks for…
create-skill
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
harbor
Run Terminal-Bench or any Harbor dataset with Ante as the agent, using the Harbor adapter in the ante repo's ante-harbor/ directory. Use when the user wants to benchmark Ante on Harbor or reproduce Ante's published eval results.
gui-integration-test
GUI desktop app only. Writes, runs, and debugs Warp integration tests using the custom Builder/TestStep framework in crates/integration. Use when adding a new integration test, fixing a failing integration test, wiring a test into the manual runner or nextest suite, or verifying end-to-end UI and terminal behavior in…