Skip to content

Graphorin API reference v0.7.0


Graphorin API reference / @graphorin/skills / / Skill

Interface: Skill

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

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:279
metadatareadonlySkillMetadatapackages/skills/src/types/index.ts:277
signature?readonlySkillSignatureVerificationResultpackages/skills/src/types/index.ts:281
sourcereadonlySkillSourcepackages/skills/src/types/index.ts:278
trustPolicyreadonlyResolvedSkillTrustPolicypackages/skills/src/types/index.ts:280

Methods

body()

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

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

Parameters

ParameterType
signal?AbortSignal

Returns

Promise&lt;string&gt;


diagnostics()

ts
diagnostics(): readonly FrontmatterDiagnostic[];

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

Returns

readonly FrontmatterDiagnostic[]


resources()

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

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

Parameters

ParameterType
signal?AbortSignal

Returns

Promise&lt;readonly SkillResource[]&gt;


toolDeclarations()

ts
toolDeclarations(): readonly SkillToolDeclaration[];

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

Returns

readonly SkillToolDeclaration[]


tools()

ts
tools(): readonly InlineSkillTool[];

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

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[]