Skip to content
Agentmart
Submit a tool

ast-grep-cli

Find code by AST shape or relationships with ast-grep.

Skill by BumpyClock

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/bumpyclock-ast-grep-cli

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Find code by AST shape or relationships with ast-grep. Use for structural searches that text matching cannot express.

Use cases: backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ast-grep-cli

What's inside

Skill name
ast-grep-cli
Description
Find code by AST shape or relationships with ast-grep. Use for structural searches that text matching cannot express.
License
MIT
Instructions
21 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • openai.yaml · agents/
  • rule_reference.md · references/

SKILL.md (first lines)

# ast-grep code search

Use `run` for a single-node pattern:

```bash
ast-grep run --pattern 'console.log($$$ARGS)' --lang javascript src
```

Use `scan --inline-rules` for relational or combined conditions. Check uncertain rules against a positive and a negative example with `--stdin`.

Relational `stopBy` changes the search boundary:

- `neighbor` (default) checks immediate relations.
- `end` traverses to the root for `inside` or to the leaves for `has`, including nested scopes.
- A rule-valued `stopBy` stops at a matching syntax node. That node can also match the relational rule.

For function-local queries, bound traversal so nested function bodies cannot satisfy an outer function's rule.

Single-quote shell patterns containing `$` metavariables. Use `--debug-query` with `cst`, `ast`, or `pattern` when parsing is unclear. See the [rule and CLI reference](references/rule_reference.md) for syntax and examples.

From BumpyClock/agent-templates, MIT.

More from BumpyClock/agent-templates

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Sep 27, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from BumpyClock

Cite this page

ast-grep-cli skill. Agent Mart. https://agentmart.dev/skills/bumpyclock-ast-grep-cli (last updated 2026-10-24)