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
AstBuilder<SkillNode<THandle>>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
THandle | unknown | Runtime handle type of the active isolation scope. |
Methods
description()
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
| Parameter | Type | Description |
|---|---|---|
text | string | Concise catalog description explaining when to pull the skill. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
instructions()
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
| Parameter | Type | Description |
|---|---|---|
instructionsSource | MaybeSource<string> | Inline instruction string or SourceASTNode<string>. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
lease()
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
| Parameter | Type | Description |
|---|---|---|
mode | "until-completed-or-fork-exit" | Lease lifecycle mode. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
toAST()
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
Deeply frozen passive AST node.
Inherited from
unlocksServices()
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
| Parameter | Type | Description |
|---|---|---|
...services | readonly ( | MaybeBuilder<ServiceASTNode<THandle>> | readonly MaybeBuilder<ServiceASTNode<THandle>>[])[] | Service AST nodes or builders. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
unlocksTools()
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
| Parameter | Type | Description |
|---|---|---|
...tools | readonly ( | MaybeBuilder<BuiltInToolASTNode<THandle>> | readonly MaybeBuilder<BuiltInToolASTNode<THandle>>[])[] | Tool AST nodes, builders, or tool bundles. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
when()
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
| Parameter | Type | Description |
|---|---|---|
predicate | ScopePredicateInput | Partition list and optional effect matcher. |
Returns
SkillBuilder<THandle>
New immutable skill builder.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | Unique identifier of the skill. | builders/skill-builder.ts:20 |