{"record":{"id":"b468495c32aaea5b","repo":"upstash/context7","slug":"expertise-description-is-required","errorCode":null,"errorMessage":"Expertise description is required","messagePattern":"Expertise description is required","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/generate.ts","lineNumber":133,"sourceCode":"    console.log(pc.red('  ✕ \"Deploy a Next.js app to Vercel\"'));\n    console.log(pc.green('  ✓ \"Best practices and constraints for deploying Next.js apps to Vercel\"'));\n    log.blank();\n    console.log(pc.red('  ✕ \"Use Tailwind for responsive design\"'));\n    console.log(pc.green('  ✓ \"Responsive layout decision-making with Tailwind CSS\"'));\n    log.blank();\n    console.log(pc.red('  ✕ \"Build OAuth with NextAuth\"'));\n    console.log(pc.green('  ✓ \"OAuth authentication patterns and pitfalls with NextAuth.js\"'));\n  }\n  log.blank();\n\n  let motivation: string;\n  try {\n    motivation = await input({\n      message: \"Describe the expertise:\",\n    });\n\n    if (!motivation.trim()) {\n      log.warn(\"Expertise description is required\");\n      return;\n    }\n    motivation = motivation.trim();\n  } catch {\n    log.warn(\"Generation cancelled\");\n    return;\n  }\n\n  log.blank();\n  console.log(\n    pc.dim(\n      \"To generate this skill, we will read relevant documentation and examples\\nfrom Context7.\\n\"\n    )\n  );\n  console.log(\n    pc.dim(\n      \"These sources are used to:\\n• extract best practices and constraints\\n• compare patterns across official docs and examples\\n• avoid outdated or incorrect guidance\\n\"\n    )","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/generate.ts#L115-L151","documentation":"In generateCommand's expertise-description prompt (clack/prompts input), an empty or whitespace-only answer triggers log.warn('Expertise description is required') and the command returns without generating. The CLI requires a non-empty motivation string to search sources and build the expertise.","triggerScenarios":"Pressing Enter at the 'Describe the expertise:' prompt without typing anything (motivation.trim() is empty).","commonSituations":"Accidentally accepting the default empty prompt; expecting an interactive picker instead of free text; piping input that yields empty stdin.","solutions":["Re-run the command and type a meaningful description of the expertise you want generated","Provide at least one non-whitespace character; the input is trimmed before use","Cancel with Ctrl+C if you do not wish to proceed (clean exit instead of warn)"],"exampleFix":"// before\n? Describe the expertise: (empty, Enter)\n// after\n? Describe the expertise: Setting up typed HTTP clients with retries in TypeScript","handlingStrategy":"validation","validationCode":"const answer = await input({ message: 'Describe the expertise:' });\nif (!answer.trim()) { throw new Error('Expertise description is required'); }","typeGuard":"function hasMeaningfulText(s: string): boolean { return s.trim().length > 0; }","tryCatchPattern":null,"preventionTips":["Always type a descriptive sentence at the expertise prompt before pressing Enter","Prepare the description text beforehand and paste it in","Avoid piping empty stdin into interactive commands"],"tags":["cli","prompt","validation","empty-input"],"backgroundTag":"empty-required-field","analyzedSha":"4416fb855b8f752be735e34f943b5d0762701aad","analyzedAt":"2026-09-16T20:28:07.148Z","contentChangedAt":"2026-09-16T20:28:07.148Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}