Skip to content

PromptScript API


Interface: SkillDefinition

Defined in: core/src/types/ast.ts:732

Typed representation of a skill in the

Skills

block.

Currently skills are stored as Record in ObjectContent. This interface provides typed access for skill-specific properties.

Properties

agent?

optional agent?: string

Defined in: core/src/types/ast.ts:750

Agent to use


allowedTools?

optional allowedTools?: string[]

Defined in: core/src/types/ast.ts:744

Allowed tools


composedFrom?

optional composedFrom?: ComposedPhase[]

Defined in: core/src/types/ast.ts:762

Metadata about composed phases (set by resolver, not by user)


content?

optional content?: string | TextContent

Defined in: core/src/types/ast.ts:736

Skill content/instructions


context?

optional context?: string

Defined in: core/src/types/ast.ts:748

Context mode


description

description: string

Defined in: core/src/types/ast.ts:734

Skill description (required)


disableModelInvocation?

optional disableModelInvocation?: boolean

Defined in: core/src/types/ast.ts:746

Disable model invocation


examples?

optional examples?: Record\<string, ExampleDefinition>

Defined in: core/src/types/ast.ts:758

Structured examples for few-shot prompting


inputs?

optional inputs?: Record\<string, SkillContractField>

Defined in: core/src/types/ast.ts:754

Runtime inputs the skill expects


outputs?

optional outputs?: Record\<string, SkillContractField>

Defined in: core/src/types/ast.ts:756

Outputs the skill produces


params?

optional params?: ParamDefinition[]

Defined in: core/src/types/ast.ts:738

Template parameters for parameterization


references?

optional references?: string[]

Defined in: core/src/types/ast.ts:760

Reference files attached to skill context (paths resolved by resolver)


requires?

optional requires?: string[]

Defined in: core/src/types/ast.ts:752

Skills that must exist for this skill to work


trigger?

optional trigger?: string

Defined in: core/src/types/ast.ts:740

Trigger phrases


userInvocable?

optional userInvocable?: boolean

Defined in: core/src/types/ast.ts:742

Whether user can invoke directly