Unique-Divine/jiyuu / ai-skills/mori-graph
mori-graph
VerifiedCode graph for cross-repo context. Use Mori, a local code graph and code memory served as MCP server mori-graph (Tree-sitter parsing, LSP-style call resolution), for structural and cross-repo questions; install it from Mori releases with mise, index repos, and link GraphQL clients to gqlgen resolvers across repos. Triggers on who calls this, what does X call, trace a call chain, impact analysis, which client uses this API field or resolver, unused or deprecated API fields, cross-repo links, dead code, graph query syntax, Cypher examples, index a repo, .cbmignore, reindex, cross-repo intelligence, installing or upgrading Mori, and working on the Mori source in jiyuu/mori.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.5 KB |
| references/graphql.md | markdown | 3.5 KB |
| references/setup.md | markdown | 3.8 KB |
| references/tool-source.md | markdown | 2.2 KB |
references/graphql.md
View on GitHub# GraphQL Across Repos
Requires Mori ([setup.md](setup.md)). An upstream Codebase Memory build names
client routes by operation only and has no server side, so it can't link a
client query to a resolver.
## How the Link Works
Both sides are keyed by **field path**, which comes from GraphQL itself:
```text
server: schema files (.graphql, .graphqls) client: operation text
type Query { perp: Perp! } query OpenTrades {
type Perp { trades(...): [PerpTrade!]! } perp { trades(...) { id } } }
| |
Route __graphql__Query.perp <--- GRAPHQL_CALLS (field_path "perp")
Route __graphql__Query.perp.trades <--- GRAPHQL_CALLS (field_path "perp.trades")
^ HANDLES CROSS_GRAPHQL_CALLS after linking
perpResolver.Trades (gqlgen) or the schema Field
```
- **Server routes** come from schema files: each root field
(`Query`, `Mutation`, `Subscription`) and one level below it. Route props
hold the declared type and `deprecated` with its reason.
- **Handlers:** for gqlgen servers, the resolver method answering the field
(type `Perp`, field `trades` → `perpResolver.Trades`), with ownership read
from `gqlgen.yml`. Fields bound to struct members, and non-gqlgen servers,
fall back to the schema `Field`.
- **Client edges** come from operation text: string literals, template
literals, Python triple-quoted strings, codegen `graphql()` documents,
module constants, and `{ query }` objects passed to any function.
- **Not linkable:** queries assembled at runtime from field lists, and SDK
calls that hold no GraphQL text (for example `client.user(args, fields)`).
- **Full indexes only for route changes:** editing a schema, resolver, or
`gqlgen.yml` triggers a full rebuild on reindex, which the incremental path
handles automatically.
## Questions to Ask
Run linking from each client with the server as target first ([setup.md](setup.md)).
**Impact of changing a field**: which client code reaches `Query.perp.trades`?
```cypher
MATCH (c)-[r:GRAPHQL_CALLS]->(rt:Route {qualified_name: "__graphql__Query.perp.trades"})
RETURN c.name, c.file_path, r.operation LIMIT 100
```
Run it in each client project. In the server project, `CROSS_GRAPHQL_CALLS`
edges show the same callers from the server's side.
**Who uses a resolver**: from the handler to its Route, then to callers:
```cypher
MATCH (h)-[:HANDLES]->(rt:Route)<-[x:CROSS_GRAPHQL_CALLS]-(c)
WHERE h.name = "Trades" RETURN rt.name, c.name, c.file_path LIMIT 100
```
**Unused API surface**: server field Routes with no incoming cross-repo edge:
```cypher
MATCH (rt:Route) WHERE rt.qualified_name STARTS WITH "__graphql__"
RETURN count(rt)
MATCH ()-[:CROSS_GRAPHQL_CALLS]->(rt) RETURN count(DISTINCT rt)
```
Run both in the server project; the difference is the field Routes no linked
client reaches.
A field with no static caller may still be used by runtime-built queries or
other clients you haven't indexed; treat the list as candidates.
**Deprecated fields still in use**: list the deprecated Routes in the server
project, then look for callers of those names:
```cypher
MATCH (rt:Route) WHERE rt.deprecated = true
RETURN rt.qualified_name, rt.deprecation_reason LIMIT 100
MATCH (c)-[:CROSS_GRAPHQL_CALLS]->(rt:Route) WHERE rt.deprecated = true
RETURN rt.name, c.name LIMIT 200
```
Route props (`deprecated`, `deprecation_reason`, `schema_type`, `source`) are
queryable fields. Check `get_graph_schema` if a query returns nothing, and
page through results.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |