{"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/5284672feb575908efead6fcf1b5e542f8d607bb/packages/cli/src/commands/generate.ts#L115-L151","documentation":"In `context7 skill generate`, the interactive prompt asks 'Describe the expertise:'. If the submitted string is empty after trim(), generation stops immediately with this warning — the motivation text is required because it drives the library search and later generation steps. Nothing has been created or sent yet.","triggerScenarios":"Pressing Enter on an empty prompt; submitting whitespace-only input; automation piping empty stdin into the interactive prompt.","commonSituations":"Users exploring the command without a topic prepared; scripts invoking the interactive wizard with no input ready.","solutions":["Re-run and describe the expertise in one specific sentence, e.g. 'OAuth authentication patterns and pitfalls with NextAuth.js' (the CLI shows this exact example)","Avoid task-style phrases like 'Build OAuth' — name the patterns, technology, and scope instead","If scripting, pre-validate that the description is non-empty before launching the command"],"exampleFix":"# before — prompt input\n\"Build OAuth\"          # too vague, or empty Enter\n\n# after\n\"OAuth authentication patterns and pitfalls with NextAuth.js\"","handlingStrategy":"validation","validationCode":"const answer = await input({ message: \"Describe the expertise:\" });\nif (!answer || !answer.trim()) {\n  console.error(\"Describe the expertise in one sentence, e.g. 'OAuth patterns and pitfalls with NextAuth.js'\");\n  process.exitCode = 1;\n}","typeGuard":"const isNonEmpty = (s: string | undefined): s is string => !!s && s.trim().length > 0;","tryCatchPattern":null,"preventionTips":["Prepare a specific, pattern-oriented sentence before starting the wizard","Name technologies explicitly in the description","In automation, check for non-empty input before launching the interactive command"],"tags":["cli","interactive","validation","input","generate"],"backgroundTag":"required-field-missing","analyzedSha":"5284672feb575908efead6fcf1b5e542f8d607bb","analyzedAt":"2026-08-18T18:00:18.510Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}