structural-search
Skill9 starsChanged 8 days agoMITView on GitHub
Opt-in ast-grep patterns for structural code search (function defs, call sites, class usage). Read-only; falls back to rg when ast-grep is unavailable.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mikulgohil/claude-skillstheir own version, first seen Oct 13, 2026
- wjgoarxiv/litopencodetheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- wjgoarxiv/litopencode★ 2same name
- mikulgohil/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-debugSkill
- comprehension-workflowSkill
- dev-cleanupSkill
- angular-patternsSkill
- dotnet-conventionsSkill
- python-conventionsSkill
- github-actions-cicdSkill
- npm-debugSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the explorer needs structural matches that plain rg cannot express well (e.g.
- Very specific: line 22
Always scope with --globs to the relevant file set (e.g.
- Very specific: line 26
Read-only: never use ast-grep to rewrite files (--rewrite is forbidden in this workflow).
- Very specific: line 27
If sg is missing or errors, fall back silently to rg + targeted reads.
- Very specific: line 32
If structural search yields nothing useful within 2 attempts, revert to the standard rg → targeted-read ladder and note it in Not checked: …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Structural Search (ast-grep, opt-in)
Use this skill when the explorer needs structural matches that plain rg cannot express well (e.g. "find all call sites of X", "find all async functions", "find classes implementing Y").
When to use
- The question is about code structure, not plain text.
- The
sg(ast-grep) binary is available on PATH (sg --versionorast-grep --version). - CRG is absent or did not narrow the search enough.
Core patterns
- Function definition:
sg run -p 'function $NAME($$$ARGS) { $$$ }'(adjust per language). - Call site:
sg run -p '$OBJ.$METHOD($$$ARGS)'. - Class usage:
sg run -p 'new $CLASS($$$ARGS)'.
Always scope with --globs to the relevant file set (e.g. --globs 'src/**/*.ts') to keep output small.
Safety
- Read-only: never use ast-grep to rewrite files (
--rewriteis forbidden in this workflow). - If
sgis missing or errors, fall back silently torg+ targeted reads. - Respect the explorer's bounded-read and output-contract rules.
Fallback
If structural search yields nothing useful within 2 attempts, revert to the standard rg → targeted-read ladder and note it in Not checked: if relevant.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

