ast-grep SKILL.md skillA
ast-grep from sparq-org/sparq is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add sparq-org/sparq/ast-grep@git:20261005.afb6badPins git:20261005.afb6bad in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- sparq-org/sparq
- Path
.claude/skills/ast-grep/SKILL.md- Versions recorded
- 4
- Latest version
- git:20261005.afb6bad, committed Oct 5, 2026
- First version recorded
- Jun 21, 2026
- Size
- 24,022 bytes
- Repository stars
- 13
- License
- MIT
Understand code STRUCTURE without reading whole files — outline a large file to its signatures, structural-grep every impl of a trait, and find call sites — using ast-grep (tree-sitter structural matching) and the editor outline/LSP, and knowing WHEN to reach for ast-grep vs Grep vs LSP vs a full Read. Use on the 37-crate / ~568-file Rust workspace when a question is about code SHAPE (impls / call patterns / signatures / codemods) rather than an exact string. MANDATORY: install + verify…
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 + outline: read STRUCTURE, not whole files Internal agent skill. Design basis: `research/agent-effectiveness-program.md` §2.2 (the query-type → tool map) and the shared A/B protocol in `research/dogfooding-sparq-knowledge-graph.md` §5. The single load-bearing idea: a "where / how is X done" question over a big file or a 37-crate workspace usually does **not** need the file's bytes — it needs the file's **skeleton** (signatures) or a **structural** match (all impls of a trait, all call sites of a function). Reading the whole file to answer it spends tokens proportional to the *file*, not the *answer*. ast-grep gives you the answer-sized view: tree-sitter structural matching with `file:line` hits, zero runtime deps. > **This is a tool, not a verdict.** Whether ast-grep + outline actually beats the > `Grep` + `Read` baseline on agent tokens for this repo is decided by the §5 A/B > (see the bottom of this file), not by this skill. Use the recipes; do **not** > cite an unmeasured saving. > > **Honest scope — the verdict splits by the SHAPE of the task (two firm real-token > A/Bs settle it; §5).** Whether a structural view saves tokens depends on the > question class: …
Read the whole file at its exact version.
How to install
mdr add sparq-org/sparq/ast-grep@sha256:9ff37ae0266f8df0The line at the top of this page pins the label git:20261005.afb6bad, 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_r3mbuw755er3l2gi)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Jun 21, 2026 and Oct 5, 2026, about one every 35 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261005.afb6bad latest | 2026-10-05 | afb6bad | 24,022 B | A | view · diff |
| git:20260622.ac19bb8 | 2026-06-22 | ac19bb8 | 24,117 B | A | view · diff |
| git:20260621.9145181 | 2026-06-21 | 9145181 | 17,171 B | A | view · diff |
| git:20260621.a6faffe | 2026-06-21 | a6faffe | 16,357 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 (24022 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
sparq-org/sparq · 13 stars · license MIT · pushed 2026-10-29 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_r3mbuw755er3l2gi GET https://markdownregistry.com/api/v1/resolve?ref=sparq-org/sparq/ast-grep GET https://markdownregistry.com/api/v1/blob/9ff37ae0266f8df0543a6c38efa8651d395ffa48b405995686ef6dfa2b67bd39
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.