Skip to main content

Interface: Skill

Defined in: packages/core/src/skill.ts:33

A loadable, triggerable capability: instructions + the tools they use.

Pass an array of Skills to BaleybotConfig.skills. Construct them with the skill helper, or as plain object literals.

Properties​

description​

description: string

Defined in: packages/core/src/skill.ts:43

Third-person "what it does AND when to use it". This is the model-facing trigger signal and is always present in the prompt (tier-1, ~one line).


files?​

optional files?: Record<string, string | (() => string | Promise<string>)>

Defined in: packages/core/src/skill.ts:71

Reference files — the third tier of progressive disclosure: detail the body links to, read only when needed with the read_skill_file tool. Keyed by the relative path the body uses (e.g. references/schema.md); the value is the text or a function that loads it on demand.


instructions​

instructions: string | ((input) => string | Promise<string>)

Defined in: packages/core/src/skill.ts:54

The instruction body (tier-2), loaded only when the skill is triggered. A function receives the turn input for dynamic instructions.


keywords?​

optional keywords?: string[]

Defined in: packages/core/src/skill.ts:49

Deterministic triggers — words or phrases. When any appears in the turn input (case-insensitive, on word/phrase boundaries) the skill's full instructions are spliced into the system prompt automatically.


name​

name: string

Defined in: packages/core/src/skill.ts:38

Unique handle (kebab-case recommended). Used as the load_skill enum value, the keyword-index key, and the toolGroup suffix (skill:<name>).


tools?​

optional tools?: Record<string, ZodToolDefinition<any, any>> | ZodToolDefinition<any, any>[]

Defined in: packages/core/src/skill.ts:64

Tools this skill needs. Hoisted into the bot's tool map up front and auto-tagged toolGroup: 'skill:<name>' (unless the tool sets its own group). Accept an array (keyed by tool.name) or a name→tool record.

Typed with any schema generics so tools built by tool() (which carry a narrowed input schema) assign without a cast — the same variance escape the SDK uses elsewhere (e.g. ModelProvider<any, any>).