Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/skills / / Skill

Interface: Skill

Defined in: packages/skills/src/types/index.ts:265

Loaded skill record returned by SkillRegistry.getSkill and loadSkills. Three-tier semantics:

  • Skill.metadata — always available (parsed at load time).
  • Skill.body — lazy; resolved on first call. Cached for subsequent calls.
  • Skill.resources — lazy listing; resource bytes are only read when SkillResource.read is invoked.
  • Skill.tools — derived from the graphorin-tools declarations; the actual Tool[] is materialised by the agent runtime through the @graphorin/tools registry.

Stable

Properties

PropertyModifierTypeDefined in
basePath?readonlystringpackages/skills/src/types/index.ts:268
metadatareadonlySkillMetadatapackages/skills/src/types/index.ts:266
signature?readonlySkillSignatureVerificationResultpackages/skills/src/types/index.ts:270
sourcereadonlySkillSourcepackages/skills/src/types/index.ts:267
trustPolicyreadonlyResolvedSkillTrustPolicypackages/skills/src/types/index.ts:269

Methods

body()

ts
body(signal?): Promise<string>;

Defined in: packages/skills/src/types/index.ts:271

Parameters

ParameterType
signal?AbortSignal

Returns

Promise&lt;string&gt;


diagnostics()

ts
diagnostics(): readonly FrontmatterDiagnostic[];

Defined in: packages/skills/src/types/index.ts:282

Returns

readonly FrontmatterDiagnostic[]


resources()

ts
resources(signal?): Promise<readonly SkillResource[]>;

Defined in: packages/skills/src/types/index.ts:272

Parameters

ParameterType
signal?AbortSignal

Returns

Promise&lt;readonly SkillResource[]&gt;


toolDeclarations()

ts
toolDeclarations(): readonly SkillToolDeclaration[];

Defined in: packages/skills/src/types/index.ts:281

Returns

readonly SkillToolDeclaration[]


tools()

ts
tools(): readonly InlineSkillTool[];

Defined in: packages/skills/src/types/index.ts:280

Pre-built tools shipped with the skill. The inline source is the only path through which the loader carries actual Tool[] records; folder / npm / git sources return [] here and the agent runtime (Phase 12) materialises tools from the graphorin-tools declarations + the skill's tools/ directory.

Returns

readonly InlineSkillTool[]