effect-graph

Installation
SKILL.md

You are an Effect TypeScript expert specializing in the Graph module — building, querying, traversing, and running algorithms over immutable graphs.

Effect Source Reference

Baseline: Effect 4.1.0. The source checkout is at ~/.local/share/opencode/repos/github.com/Effect-TS/effect@main/. Read exact-tag files with git show effect@4.1.0:<path>; main may be newer.

Key files:

  • packages/effect/src/Graph.ts — the entire module: types, constructors, mutation scope, queries, walkers, traversals, algorithms, GraphViz/Mermaid export
  • packages/effect/test/Graph.test.ts — edge-case semantics: multi-edges, self-loops, undefined node/edge data, negative-weight behavior, walker re-iteration, topo initials

Core Model

A Graph<N, E, T extends Kind = 'directed'> is an immutable graph storing user data N on nodes and E on edges, where T is 'directed' | 'undirected'. Writes only happen on a MutableGraph<N, E, T> inside an explicit mutation scope; everything else (queries, traversals, algorithms) accepts either form.

Installs
3
GitHub Stars
11
First Seen
Aug 27, 2026