{"record":{"id":"800238c20cd48981","repo":"vercel/ai","slug":"cline-did-not-create-its-native-skills-tool","errorCode":null,"errorMessage":"Cline did not create its native skills tool.","messagePattern":"Cline did not create its native skills tool\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/harness-cline/src/cline-skills.ts","lineNumber":76,"sourceCode":"    name: skill.name,\n    description: skill.description,\n    disabled: false,\n  }));\n\n  const tool = createDefaultTools({\n    executors: { skills: executor },\n    enableReadFiles: false,\n    enableSearch: false,\n    enableBash: false,\n    enableWebFetch: false,\n    enableApplyPatch: false,\n    enableEditor: false,\n    enableSkills: true,\n    enableAskQuestion: false,\n    enableSubmitAndExit: false,\n  }).find(tool => tool.name === 'skills');\n  if (tool == null) {\n    throw new Error('Cline did not create its native skills tool.');\n  }\n\n  return { signature, tool };\n}\n\nfunction projectClineSkills({\n  skills,\n}: {\n  skills: ReadonlyArray<HarnessV1Skill>;\n}): ReadonlyArray<ProjectedClineSkill> {\n  const names = new Set<string>();\n  const ids = new Set<string>();\n  return skills\n    .map(skill => {\n      if (\n        !CLINE_SKILL_NAME_PATTERN.test(skill.name) ||\n        skill.name === '.' ||\n        skill.name === '..'","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness-cline/src/cline-skills.ts#L58-L94","documentation":"createClineSkillsRuntime builds a tool set from Cline's createNativeTools (with enableSkills: true) and expects a tool literally named 'skills'. If the native tool factory returns no such tool — e.g. the Cline version bundled lacks the skills tool or the factory behavior changed — this plain Error is thrown as an internal invariant failure. It indicates an incompatibility between the harness package and the Cline runtime, not bad user input.","triggerScenarios":"Starting a Cline turn with skills supplied (turnOpts.skills non-empty), where createNativeTools({ enableSkills: true, ... }) returns a tool list without an entry named 'skills'.","commonSituations":"Version mismatch: the Cline runtime/extension was updated or downgraded and its native tool names changed; a patched or custom Cline build that omits the skills tool; passing skills on a runtime where skills support was removed.","solutions":["Align the @ai-sdk/harness-cline package version with the installed Cline runtime/extension version (upgrade or pin both).","Remove or empty the skills option on turn calls to avoid creating the skills runtime until versions are compatible.","Inspect the tool list returned by Cline's createNativeTools in your installed version to confirm the 'skills' tool name; if it was renamed, report/patch the harness mapping."],"exampleFix":"// before\nawait session.prompt({ text, skills: [mySkill] }); // runtime without native skills tool\n// after\nawait session.prompt({ text }); // omit skills, or upgrade the Cline runtime that provides the 'skills' native tool","handlingStrategy":"try-catch","validationCode":"// Precheck your Cline runtime exposes the skills tool\nimport { createNativeTools } from '<cline-runtime>';\nconst hasSkillsTool = createNativeTools({ enableEditor: false, enableSkills: true, enableAskQuestion: false, enableSubmitAndExit: false })\n  .some(t => t.name === 'skills');\nif (!hasSkillsTool) skills = undefined; // omit skills option for this turn","typeGuard":null,"tryCatchPattern":"try {\n  await session.prompt({ text, skills });\n} catch (e) {\n  if (e instanceof Error && e.message === 'Cline did not create its native skills tool.') {\n    await session.prompt({ text }); // retry without skills; also flag runtime/version mismatch\n  } else throw e;\n}","preventionTips":["Pin matching versions of @ai-sdk/harness-cline and the Cline runtime; check the changelog for native tool renames.","Smoke-test skills support (probe createNativeTools for the 'skills' entry) at startup before advertising the feature.","Make the skills option opt-in per environment where the Cline build is known to include skills support."],"tags":["internal-invariant","version-mismatch","skills","cline"],"backgroundTag":"runtime-version-mismatch","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}