Home / fmind / dot · skills/ast-grep/SKILL.md · GitHub

ast-grep skillA

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
…

Read the whole file at its exact version.

How to install

Latest version
mdr add fmind/dot/ast-grep@git:20260916.50d6810
Exact content
mdr add fmind/dot/ast-grep@sha256:62138cb71c091a04

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.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_g6ll6mplj6rtnmp6.svg)](https://markdownregistry.com/a/art_g6ll6mplj6rtnmp6)

1 badge views in 30 days

Versions

versioncommittedcommitsizeaudit
git:20260916.50d6810 latest2026-09-16 50d6810 3,690 BA view · diff
git:20260912.0ce18c02026-09-12 0ce18c0 3,740 BA view · diff
git:20260906.ede73252026-09-06 ede7325 3,594 BA view · diff
git:20260906.a4e0ec82026-09-06 a4e0ec8 4,179 BA view · diff
git:20260903.fa1d8bb2026-09-03 fa1d8bb 4,169 BA view

Audit of the latest version

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.

More from fmind/dot

chezmoi skill
fmind/dot · .agents/skills/chezmoi/SKILL.md · Manage chezmoi source names, templates, secrets, diffs, and deployment in fmind/dot.
git:20260920.d5fedf5 · audit A · 9 stars
dot-development skill
fmind/dot · .agents/skills/dot-development/SKILL.md · Develop fmind/dot CLI commands, session parsers, storage, configuration, and installation.
git:20260920.d5fedf5 · audit A · 9 stars
dot-release skill
fmind/dot · .agents/skills/dot-release/SKILL.md · Prepare, publish, recover, and verify fmind/dot releases through the repository task.
git:20260920.d5fedf5 · audit A · 9 stars
dot-skills skill
fmind/dot · .agents/skills/dot-skills/SKILL.md · Maintain fmind/dot skill packages, catalog budgets, routing contracts, and installed links.
git:20260920.d5fedf5 · audit A · 9 stars
dot-verify skill
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…
git:20260924.4be3d0c · audit A · 9 stars
AGENTS.md agents
fmind/dot · AGENTS.md
git:20260920.d5fedf5 · audit A · 9 stars
CLAUDE.md claude
fmind/dot · CLAUDE.md
git:20260903.fa1d8bb · audit B · 9 stars
AGENTS.md@dot_agents agents
fmind/dot · dot_agents/AGENTS.md
git:20260920.d5fedf5 · audit A · 9 stars
acli skill
fmind/dot · skills/acli/SKILL.md · Search, plan, and update Atlassian Jira and Confluence with acli.
git:20260920.d5fedf5 · audit A · 9 stars
agent-evaluation skill
fmind/dot · skills/agent-evaluation/SKILL.md · Evaluate prompt, model, retrieval, and agent changes through repeated trials and outcome grading.
git:20260916.50d6810 · audit A · 9 stars
agent-frameworks skill
fmind/dot · skills/agent-frameworks/SKILL.md · Build Python agents with Google ADK, LangChain, LangGraph, and agents-cli: tools, state, and retrieval.
git:20260916.50d6810 · audit A · 9 stars
agent-harnesses skill
fmind/dot · skills/agent-harnesses/SKILL.md · Operate and configure Claude Code, Codex, Copilot, Grok, and OpenCode.
git:20260919.afe8ee0 · audit A · 9 stars

Every file in fmind/dot

Other files named ast-grep

ast-grep skill
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…
git:20260914.52f863d · audit A · 69,349 stars
ast-grep skill
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…
git:20260909.affe2b9 · audit A · 878 stars
ast-grep skill
vinhnx/vtcode · crates/codegen/vtcode-skills/src/skills/assets/samples/ast-grep/SKILL.md · Use for ast-grep project setup, rule authoring, rule debugging, and structural search workflows.
git:20260717.d3b2d89 · audit B · 855 stars
ast-grep skill
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…
git:20260905.1f63894 · audit A · 54 stars
ast-grep skill
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…
git:20260725.0b88df9 · audit A · 51 stars
ast-grep skill
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…
git:20260904.2014e73 · audit A · 38 stars
ast-grep skill
codeatcode/oss-ai-skills · tool/ast-grep/SKILL.md · ast-grep - Fast structural code search, linting, and rewriting CLI tool
v1.0.0 · audit A · 17 stars
ast-grep skill
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…
git:20260816.37187ba · audit A · 15 stars

Browse by kind, by grade A, or by owner.