MCPcopy Create free account
hub / github.com/codeaashu/claude-code / onDynamicSkillsLoaded

Function onDynamicSkillsLoaded

src/skills/loadSkillsDir.ts:839–851  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

837 * Returns an unsubscribe function.
838 */
839export function onDynamicSkillsLoaded(callback: () => void): () => void {
840 // Wrap at subscribe time so a throwing listener is logged and skipped
841 // rather than aborting skillsLoaded.emit() and breaking skill loading.
842 // Same callSafe pattern as growthbook.ts — createSignal.emit() has no
843 // per-listener try/catch.
844 return skillsLoaded.subscribe(() => {
845 try {
846 callback()
847 } catch (error) {
848 logError(error)
849 }
850 })
851}
852
853/**
854 * Discovers skill directories by walking up from file paths to cwd.

Callers 1

initializeFunction · 0.85

Calls 1

logErrorFunction · 0.50

Tested by

no test coverage detected