com um clique
hyphae-query
Execute a Hyphae DSL selector against the project's index.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Execute a Hyphae DSL selector against the project's index.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Build, reload, and maintain the Mycelium symbol index — the prerequisite for every other Skill.
One-shot architecture tracing — get entry points, call graph neighborhood, and source snippets for any natural-language question about how code works.
Look up symbols, kinds, ancestors, descendants, siblings — the foundation tools any agent reaches for first.
Navigate the call graph — callers, callees, call trees, entry points, dead and isolated symbols.
Navigate the import graph — direct imports, import trees, importers (who pulls this in).
Rank symbols by importance — PageRank, betweenness, fan-in/out, hub detection, top-file diagnostics.
| name | hyphae-query |
| description | Execute a Hyphae DSL selector against the project's index. |
| allowed-tools | ["mcp__mycelium__query"] |
| category | navigation |
| icon | 🌿 |
| marketplace_examples | [{"query":"Find all functions in src/auth/ that are not named main","tool":"mcp__mycelium__query"},{"query":"Find every class that has a method named render","tool":"mcp__mycelium__query"},{"query":"Find all Rust structs that implement the Repository trait","tool":"mcp__mycelium__query"}] |
hyphae-query — query the Mycelium symbol graph with one DSL expressionThis Skill is the umbrella for one capability (query) because Hyphae is itself a query language — every selector the user might want to write is the same MCP tool with different arguments. Bundling more capabilities here would be misleading.
This is the canonical example of a single-capability Skill under the Three-Surface Rule (RFC-0090). It exists to prove the rule and to teach the agent the marquee Mycelium feature.
Use when:
.mycelium/index.rmp exists) or just ran mycelium index.Do NOT use when:
mycelium_search_symbol (basic-queries Skill) which is more focused.mycelium_get_callers from the call-graph Skill.mycelium index <root> (will be wrapped in indexing Skill).| Developer question | Tool |
|---|---|
| "Find all functions in src/auth/ that are not named main" | mcp__mycelium__query |
| "Find every class that has a method named render" | mcp__mycelium__query |
| "Find all Rust structs that implement the Repository trait" | mcp__mycelium__query |
query — execute a Hyphae selectorWhen: structural multi-match questions like "all functions in src/auth/", "every class with a render method", "callers of get_user that aren't in tests".
MCP invocation:
mcp__mycelium__query({
"expr": "#login" // name selector — matches symbols named `login`
})
mcp__mycelium__query({
"expr": ".function" // kind selector — matches all function symbols
})
mcp__mycelium__query({
"expr": ".class>.method" // direct-child combinator — methods of classes
})
Equivalent CLI (for human reading or shell scripting):
mycelium query "#login"
mycelium query ".function" --format=json
mycelium query ".class>.method" --root /path/to/project
Result shape:
{ "matches": ["src/a.rs>login", "src/b.rs>login"], "count": 2 }
The CLI text format prints one match per line. The CLI --format=json is a JSON array of strings — equivalent to the MCP matches field, asserted byte-for-byte by tests/parity.test.json.
Result on parse error:
{ "error": "hyphae parse error: …" }
The agent should retry with a corrected selector. The error field always contains the literal substring hyphae for easy detection.
Typical follow-ups:
:in(path-pattern) or kind selectors.mycelium_get_callers (call-graph Skill).mycelium_get_symbol_info (basic-queries Skill).| Syntax | Meaning |
|---|---|
#name | Symbol named name (any kind, any depth). |
.kind | All symbols of a given kind: .function, .class, .method, .module, .struct, .enum, .interface/.trait, .constant/.const, .type, .variable. |
* | Universal — every indexed symbol. |
| Syntax | Meaning |
|---|---|
(space) | Descendant combinator — any descendant. |
> | Direct child combinator. |
~ | Sibling combinator (same parent). |
, | Selector list — union. |
| Syntax | Meaning |
|---|---|
:calls(X) | Outgoing Calls edge to a node matching X. |
:callers(X) | Incoming Calls edge from a node matching X. |
:imports(X) | Outgoing Imports edge. |
:extends(X) | Outgoing Extends edge. |
:implements(X) | Outgoing Implements edge (RFC-0091). |
| Syntax | Meaning |
|---|---|
:not(X) | Set-difference — candidates NOT matching X. |
:has(X) | Candidates that contain at least one descendant matching X. |
:in(path-prefix) | Candidates whose path starts with the given prefix. |
:first-child / :last-child / :only-child | Positional filters within siblings. |
:nth-child(N) | 1-indexed sibling position. |
| Syntax | Meaning |
|---|---|
[language=rust] | Filter by source language (rust, python, typescript, javascript, go, java, c, cpp, csharp, ruby). |
[kind=function] | Filter by NodeKind wire string. |
[file=src/lib.rs] | Filter by file path. |
.function:not(#main):in(src/auth/)
.class:has(.method:calls(#log))[language=python]
.struct[file=src/lib.rs]:implements(#Repository)
.method:first-child:in(src/handlers/)
*:nth-child(3)
Full grammar: RFC-0003 + RFC-0091.
This Skill, the CLI mycelium query, and the MCP tool mycelium_query are 1:1 per RFC-0090. The parity test tests/parity.test.json asserts:
matches array (byte-for-byte, sorted).hyphae in error.basic-queries (when you want one specific symbol by name).call-graph (when you've found symbols and want to traverse their relationships).crates/mycelium-cli/src/query.rs, crates/mycelium-mcp/src/lib.rs (search for mycelium_query).