Borrowing it
Nothing to install: this file belongs to bifrost5/foundry. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bifrost5/foundry/main/.claude/skills/ast-grep/SKILL.mdgit clone --depth 1 https://github.com/bifrost5/foundryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bifrost5/foundry/ast-grep)<a href="https://agentmods.dev/skills/bifrost5/foundry/ast-grep"><img src="https://agentmods.dev/badge/skills/bifrost5/foundry/ast-grep/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bifrost5/foundry/ast-grep"><img src="https://agentmods.dev/badge/skills/bifrost5/foundry/ast-grep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00028 | $0.00241 |
| Opus 5.5 | $0.00011 | $0.00096 |
| Sonnet 5.5 | $0.00006 | $0.00048 |
| Haiku 4.5 | $0.00003 | $0.00024 |
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 today.
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.
This is a copy
100% identical to ast-grep — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
What it actually says
ast-grep Code Query & Refactor
This skill enables Cursor to use ast-grep to analyze, query, and refactor code using structural patterns.
Cursor can call ast-grep to search for nodes, detect anti-patterns, or apply auto-fixes using SG rules.
Capabilities
- Search code structurally using AST patterns (
pattern,regex,meta). - Run full ast-grep rulesets (
.yamlrule files). - Preview matches with context.
- Apply safe transformations using
fixblocks. - Generate new SG rules automatically when helpful.
Cursor may use this skill when:
- The user asks for codebase-wide search/refactor.
- Structural patterns or syntax-aware searches are required.
- A transformation should be validated using AST rather than regex.
Commands
Search using a pattern
Use when the user wants to find all occurrences of a code pattern.
ast-grep -p "<pattern>" <path>
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.
- today First seen · 36 lines · 28 tokens per session scan A 437c68e5ca15
ast-grep is a skill published in the GitHub repository bifrost5/foundry (12 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 241 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to ast-grep, differing in 0 lines, and is treated as a copy.
ast-grep compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ast-grepbifrost5/foundry | Skill | 12 | 3mo ago | MIT | A | 28 | Claude Code |
| nightly-audit-engineer-getting-startedmakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 46 | Claude Code, Codex |
| nightly-audit-engineer-opsmakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 43 | Claude Code, Codex |
| nightly-audit-engineer-evidencemakecindy/cindy | Skill | 9.5k | today | Apache-2.0 | A | 37 | Claude Code, Codex |
| safe-refactoringageerle/ruoyi-ai | Skill | 5.8k | 17d ago | MIT | A | 52 | Claude Code, Codex |
| mindosGeminiLight/MindOS | Skill | 704 | 15d ago | MIT | A | 136 | Claude Code |
| superlintmgechev/skillgrade | Skill | 735 | 27d ago | MIT | A | 0 | Claude Code, Codex |