diff --git a/v3/@claude-flow/cli/src/init/executor.ts b/v3/@claude-flow/cli/src/init/executor.ts index bd5426cc94..2f53516ec1 100644 --- a/v3/@claude-flow/cli/src/init/executor.ts +++ b/v3/@claude-flow/cli/src/init/executor.ts @@ -541,10 +541,15 @@ neural/ /** * Find source directory for skills/commands/agents */ -function findSourceDir(type: 'skills' | 'commands' | 'agents'): string | null { +function findSourceDir(type: 'skills' | 'commands' | 'agents', sourceBaseDir?: string): string | null { // Build list of possible paths to check const possiblePaths: string[] = []; + // If explicit source base directory is provided, use it first + if (sourceBaseDir) { + possiblePaths.push(path.join(sourceBaseDir, '.claude', type)); + } + // From dist/src/init -> go up to project root // __dirname is typically /path/to/v3/@claude-flow/cli/dist/src/init const distPath = __dirname;