Skip to content

Interface: SkillBuilder<THandle> ​

Defined in: builders/skill-builder.ts:18

Fluent builder for pull-based procedural skills (P.skill(idOrSource)).

Configures catalog descriptions, procedural instructions, dynamically unlocked tools and background daemon services, and lease lifecycle modes.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
THandleunknownRuntime handle type of the active isolation scope.

Methods ​

description() ​

ts
description(text): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:42

Sets the short catalog description displayed in the Turn-0 [ROLE_AND_SCOPE_CONTEXT] frame.

Required for inline skills so the model knows when to pull the skill via activateSkill.

Parameters ​

ParameterTypeDescription
textstringConcise catalog description explaining when to pull the skill.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.


instructions() ​

ts
instructions(instructionsSource): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:53

Sets the detailed procedural instructions returned when activateSkill({ skillId }) is called.

Accepts an inline string or a SourceASTNode<string> resolved at activation time.

Parameters ​

ParameterTypeDescription
instructionsSourceMaybeSource<string>Inline instruction string or SourceASTNode<string>.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.


lease() ​

ts
lease(mode): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:94

Sets the lease lifecycle mode for tools and services unlocked by this skill.

Defaults to 'until-completed-or-fork-exit' so unlocked tools remain available until step completion.

Parameters ​

ParameterTypeDescription
mode"until-completed-or-fork-exit"Lease lifecycle mode.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.


toAST() ​

ts
toAST(): SkillNode;

Defined in: ast/ast-builder.ts:20

Compiles the current builder configuration into a deeply frozen passive AST node.

Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.

Returns ​

SkillNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST


unlocksServices() ​

ts
unlocksServices(...services): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:79

Registers background daemon services started and mounted while this skill is active.

Services are started when the skill is activated and stopped when the skill lease expires.

Parameters ​

ParameterTypeDescription
...servicesreadonly ( | MaybeBuilder<ServiceASTNode<THandle>> | readonly MaybeBuilder<ServiceASTNode<THandle>>[])[]Service AST nodes or builders.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.


unlocksTools() ​

ts
unlocksTools(...tools): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:64

Registers tools unlocked while this skill is active.

Unlocked tools become callable by the agent on subsequent turns after activateSkill succeeds.

Parameters ​

ParameterTypeDescription
...toolsreadonly ( | MaybeBuilder<BuiltInToolASTNode<THandle>> | readonly MaybeBuilder<BuiltInToolASTNode<THandle>>[])[]Tool AST nodes, builders, or tool bundles.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.


when() ​

ts
when(predicate): SkillBuilder<THandle>;

Defined in: builders/skill-builder.ts:31

Configures optional partition and/or reactive effect predicates that highlight this skill in context.

Highlighted skills remain pull-based via activateSkill({ skillId }) until explicitly unlocked.

Parameters ​

ParameterTypeDescription
predicateScopePredicateInputPartition list and optional effect matcher.

Returns ​

SkillBuilder<THandle>

New immutable skill builder.

Properties ​

PropertyModifierTypeDescriptionDefined in
idreadonlystringUnique identifier of the skill.builders/skill-builder.ts:20

Released under the MIT License.