Skip to content

Function: createSkillBuilder() ​

ts
function createSkillBuilder<THandle>(idOrSource, options?): SkillBuilder<THandle>;

Defined in: builders/create-skill-builder.ts:26

Creates a fluent SkillBuilder for P.skill(idOrSource).

Supports both inline skill definitions (requiring .description() and .instructions()) and frontmatter-sourced skill definitions with optional tool and service unlocks.

Type Parameters ​

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

Parameters ​

ParameterTypeDescription
idOrSource| string | MaybeBuilder<SourceASTNode<SkillNode<THandle>>>Skill identifier string or frontmatter skill source.
options?CreateSkillBuilderState<THandle>Optional internal copy-on-write state.

Returns ​

SkillBuilder<THandle>

Frozen SkillBuilder instance.

Released under the MIT License.