{"record":{"id":"20f4bd3a0826ea09","repo":"ReactiveX/rxjs","slug":"cannot-locate-the-canonical-skill-shipped-by-rxjs","errorCode":null,"errorMessage":"Cannot locate the canonical Skill shipped by @rxjs/migrate.","messagePattern":"Cannot locate the canonical Skill shipped by @rxjs/migrate\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/migrate/src/skill-cli.ts","lineNumber":67,"sourceCode":"      status: 'error',\n      error: { code: refused ? 'refused' : 'operational-failure', message },\n    });\n    return refused ? skillCliExitCodes.refused : skillCliExitCodes.operationalFailure;\n  }\n}\n\nexport async function resolveCanonicalSkillRoot(modulePath = process.argv[1]): Promise<string> {\n  if (!modulePath) throw new Error('Cannot locate the @rxjs/migrate package entry point.');\n  const moduleDirectory = dirname(resolve(modulePath));\n  for (const localPath of ['../skill', '../../skill']) {\n    const candidate = resolve(moduleDirectory, localPath);\n    try {\n      if ((await stat(join(candidate, 'SKILL.md'))).isFile()) return candidate;\n    } catch {\n      // Try the source-tree or built-package alternative.\n    }\n  }\n  throw new Error('Cannot locate the canonical Skill shipped by @rxjs/migrate.');\n}\n\nfunction parseSkillArguments(argv: readonly string[]): ParsedSkillCliOptions {\n  const action = argv[0];\n  if (action !== 'check' && action !== 'install' && action !== 'update' && action !== 'remove') {\n    throw new Error(\n      'Usage: rxjs-migrate-skill <check|install|update|remove> --harness <codex|claude|cursor> [--project-root <dir>] [--force]'\n    );\n  }\n  let harness: SkillHarness | undefined;\n  let projectRoot = process.cwd();\n  let force = false;\n  for (let index = 1; index < argv.length; index++) {\n    const argument = argv[index];\n    if (argument === '--harness') {\n      const value = argv[++index];\n      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');\n      harness = value as SkillHarness;","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/skill-cli.ts#L49-L85","documentation":"Thrown by resolveCanonicalSkillRoot when neither ../skill nor ../../skill relative to the CLI's module directory contains a SKILL.md file. The canonical Skill payload that the CLI installs is missing from the package layout — typically a broken or partial install of @rxjs/migrate.","triggerScenarios":"Running rxjs-migrate-skill check/install when the package's skill directory was pruned, the publish excluded skill files, or the CLI was moved out of its package tree.","commonSituations":"Aggressive packagers (pnpm strict layout, bundlers) omitting the skill folder; installing from a fork that didn't include skill assets; moving the built CLI file elsewhere.","solutions":["Reinstall @rxjs/migrate cleanly (rm -rf node_modules and lockfile entry, then reinstall)","Verify packages/migrate/skill/SKILL.md (or dist-adjacent skill folder) exists in the installed package","If running from a fork/monorepo, ensure the skill assets are built/copied next to the CLI entry"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import { stat } from 'node:fs/promises';\nconst ok = await stat(require.resolve('@rxjs/migrate/package.json')).then(() => true).catch(() => false);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reinstall the package when its assets are missing","Verify skill/ directory exists in the installed tarball"],"tags":["cli","installation","packaging"],"backgroundTag":"missing-package-assets","analyzedSha":"54796b38a57e6309f9861e174737479bb3f63f61","analyzedAt":"2026-08-28T10:21:27.410Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}