extended-graph-stat-calculator

Installation
SKILL.md

Stat Calculator

Create a new node or link stat calculator that integrates with the existing factory pattern in src/statsCalculators/.

Critical

  • All internal imports MUST use "../../internal" — never import from specific files within src/. The project uses a barrel export at src/internal.ts.
  • Every new calculator class, type literal, and label MUST be added to all four registration points (calculator file, factory, type union + label maps, src/internal.ts export). Missing any one will cause a build failure or silent omission from the UI.
  • Run npm run build to verify — there is no test framework. A clean build with tsc --noEmit + esbuild is the only validation.

Instructions

Step 1: Create the calculator file

For a node calculator — create a new file in src/statsCalculators/nodes/ (e.g., src/statsCalculators/nodes/wordCountCalculator.ts following the pattern from src/statsCalculators/nodes/filenameLengthCalculator.ts):

import { GraphologyGraph, GraphStatsDirection, NodeStat, NodeStatCalculator } from "../../internal";

export class WordCountCalculator extends NodeStatCalculator {
Related skills
Installs
1
GitHub Stars
1
First Seen
Apr 16, 2026