skills

skills.onResult

onResult(handler: (result: SkillResult) => void): Unsubscribe

Subscribe to skill results. The handler is called after every successful processFile or execute call, receiving the SkillResult.

Handler errors are caught per-handler and logged to console.error; a failing handler never prevents subsequent handlers from running.

handler(result: SkillResult) => voidCallback invoked with each result.

Returns: Unsubscribe

Example

const unsub = api.skills.onResult((r) => console.log("got", r.nodes.length, "nodes"));
// later:
unsub();