Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/skills / spec
spec
Bundled snapshot loader for the SKILL.md packaging-format specification.
The framework ships an offline copy of the upstream specification so the loader can decide which frontmatter fields are recognised, which graphorin-* extensions deprecate (or co-exist with) an upstream field, and whether a skill author's graphorin-anthropic-spec hint refers to a snapshot newer or older than the bundled one. The snapshot is checked-in to the repository and refreshed via the pnpm run check-anthropic-spec CI cron.
The loader does not fetch the upstream specification; the only network call lives inside the CI helper script. The snapshot lookup is deterministic and side-effect free at runtime.
Interfaces
| Interface | Description |
|---|---|
| GraphorinMappingEntry | Single entry of the graphorin-* mapping map. |
| KnownFieldEntry | Single entry of the upstream-known fields map. |
| SpecSnapshot | Top-level shape of the bundled snapshot. |
Type Aliases
| Type Alias | Description |
|---|---|
| FieldStability | Stability classification of a known upstream field. |
| GraphorinFieldPolicy | Migration policy applied to a graphorin-* field that maps to an upstream field. |
Functions
| Function | Description |
|---|---|
| _setSpecSnapshotForTesting | Override the bundled snapshot. Used by tests that exercise the "newer / older spec snapshot" branches of the validator. |
| compareAuthorSpecHint | Compare an author's graphorin-anthropic-spec value against the bundled snapshot date. Returns: |
| getGraphorinMapping | Resolve the mapping entry for a graphorin-* field. Returns undefined if the field is not known to the snapshot. |
| getKnownField | Resolve a known-field entry by name. Returns undefined if the field is not part of the upstream specification. |
| getSpecSnapshot | Return the currently active snapshot. Loads the bundled JSON file on first call, then caches the parsed object. |