ast-grep SKILL.md skillA
ast-grep from everruns/yolop is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add everruns/yolop/ast-grep@git:20260816.37187baPins git:20260816.37187ba in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- everruns/yolop
- Path
src/bundled/system-skills/ast-grep/SKILL.md- Versions recorded
- 3
- Latest version
- git:20260816.37187ba, committed Aug 16, 2026
- First version recorded
- Jul 4, 2026
- Size
- 6,437 bytes
- Repository stars
- 18
- License
- MIT
Write effective ast-grep patterns for the built-in `ast_grep` structural-search tool and `ast_edit` rewrites. Use when searching or refactoring code by shape rather than text, call expressions, function/struct declarations, wrappers, imports, or when a pattern returns nothing or the wrong nodes.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# ast-grep structural search and rewrite Yolop ships built-in `ast_grep` (read-only search, default harness) and `ast_edit` (pattern/replacement rewrites, opt-in via `[[capabilities]] ref = "ast_edit"` in `settings.toml`) backed by the `ast-grep` engine compiled into the binary. This is **not** the `sg` command-line tool, there is no `sg run`/`sg scan`, no rule YAML files, and no `--rewrite` CLI. Drive the tools directly with their arguments. ## When to reach for it Use `ast_grep` for code **shapes**, after `repo_map`/`grep_files` have narrowed the area: - Call sites of a function regardless of receiver or arguments. - Declarations: functions, structs, classes, impls, interfaces. - Wrappers and idioms: `unwrap()`, `try/except`, specific decorators/attributes. - Anywhere lexical search drowns in comments, strings, or false matches. Use `ast_edit` when the same ast-grep pattern should be **rewritten** everywhere it matches, rename a call shape, swap an import path, delete a wrapper, modernize an idiom. Always confirm the pattern with `ast_grep` first, then preview with `ast_edit` before applying. Prefer `grep_files` for exact text, identifiers, log strings, or non-code files. …
Read the whole file at its exact version.
How to install
mdr add everruns/yolop/ast-grep@sha256:2ba87dcf02e30338The line at the top of this page pins the label git:20260816.37187ba, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_yvksz6th7mj4gxc3)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 3 versions of this file, between Jul 4, 2026 and Aug 16, 2026, about one every 22 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260816.37187ba latest | 2026-08-16 | 37187ba | 6,437 B | A | view · diff |
| git:20260711.e1c78db | 2026-07-11 | e1c78db | 6,464 B | A | view · diff |
| git:20260704.986b6be | 2026-07-04 | 986b6be | 5,120 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (6437 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
everruns/yolop · 18 stars · license MIT · pushed 2026-11-04 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_yvksz6th7mj4gxc3 GET https://markdownregistry.com/api/v1/resolve?ref=everruns/yolop/ast-grep GET https://markdownregistry.com/api/v1/blob/2ba87dcf02e3033838745e0ac9a526407b9479247d9b4862c8d74ac0052a6c45
Your AI assistant 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.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.