ast-grep is agent-read markdown (skill) from fmind/dot: Find and safely rewrite Python syntax with ast-grep patterns and rules..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# ast-grep
Structural code search and rewrite: a pattern is real code with meta-variables, matched against the syntax tree, so it ignores formatting and never matches inside strings or comments. Use it where `rg` gives false positives and where a refactor must touch every call site exactly once; plain text search stays with `rg`.
## Commands
```bash
ast-grep run -p 'print($$$ARGS)' -l python # search; run is the default subcommand
ast-grep run -p 'print($$$ARGS)' -r 'logger.info($$$ARGS)' -l python # dry run: prints the diff, changes nothing
ast-grep run -p 'print($$$ARGS)' -r 'logger.info($$$ARGS)' -l python --update-all # apply after reviewing the dry run (-i to confirm per hunk)
ast-grep run -p 'os.getenv($KEY)' -l python --json=compact # structured output; --json=stream gives one object per line
ast-grep scan # every rule in sgconfig.yml
ast-grep scan -r rules/no-print.yml --format github # one rule file; GitHub annotations in CI
```
## Workflow
…
Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
A 17 of 17 checks passed. Deterministic, no model, same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (3690 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
fmind/dot · 9 stars · license MIT · pushed 2026-09-24 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_g6ll6mplj6rtnmp6
GET https://markdownregistry.com/api/v1/resolve?ref=fmind/dot/ast-grep
GET https://markdownregistry.com/api/v1/blob/62138cb71c091a04e528fe5dc50a7adcafc10e75b078d4fb5bdc7cd8e48af5d5
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
fmind/dot · .agents/skills/dot-verify/SKILL.md · Qualify the fmind/dot working tree before a release: review changes, sync docs, run every gate, and smoke-test the dot…
code-yeongyu/oh-my-openagent · packages/shared-skills/skills/ast-grep/SKILL.md · Searches and rewrites code by AST shape across 25 languages. Use when the target is a syntax pattern (every…
ast-grep/agent-skill · ast-grep/skills/ast-grep/SKILL.md · Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search…
outlinedriven/outline-driven-development · .devin/skills/ast-grep/SKILL.md · Use when asked to run AST-based structural search, lint, or rewrite of code when regex is too fragile. Not for remote…
moeru-ai/auv · .agents/skills/ast-grep/SKILL.md · Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search…
outlinedriven/odin-claude-plugin · plugins/odin-code/skills/ast-grep/SKILL.md · Use when asked to run AST-based structural search, lint, or rewrite of code when regex is too fragile. Not for remote…
everruns/yolop · src/bundled/system-skills/ast-grep/SKILL.md · Write effective ast-grep patterns for the built-in `ast_grep` structural-search tool and `ast_edit` rewrites. Use when…