{"record":{"id":"bf9b10d3c76928e3","repo":"upstash/context7","slug":"no-skills-installed","errorCode":null,"errorMessage":"No skills installed","messagePattern":"No skills installed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/cli/src/commands/skill.ts","lineNumber":736,"sourceCode":"      }\n    }\n  }\n\n  if (options.json) {\n    const skills = results.flatMap((result) =>\n      result.skills.map((name) => ({\n        name,\n        path: join(result.dir, name),\n        source: result.source,\n      }))\n    );\n\n    console.log(JSON.stringify({ skills }, null, 2));\n    return;\n  }\n\n  if (results.length === 0) {\n    log.warn(\"No skills installed\");\n    return;\n  }\n\n  log.blank();\n\n  for (const { label, displayPath, skills } of results) {\n    log.plain(`${pc.bold(label)} ${pc.dim(displayPath)}`);\n    for (const skill of skills) {\n      log.plain(`  ${pc.green(skill)}`);\n    }\n    log.blank();\n  }\n}\n\nasync function removeCommand(name: string, options: RemoveOptions): Promise<void> {\n  trackEvent(\"command\", { name: \"remove\" });\n  const target = await promptForSingleTarget(options);\n  if (!target) {","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/upstash/context7/blob/4416fb855b8f752be735e34f943b5d0762701aad/packages/cli/src/commands/skill.ts#L718-L754","documentation":"The `ctx7 skill list` command scans the target IDE/scope directories for installed skills and prints them. When the scan completes but the results array is empty, it emits this warning via log.warn instead of failing. It signals that no skills have been installed into any of the checked target directories, not an internal fault.","triggerScenarios":"Running `ctx7 skill list` (listCommand, invoked via registerSkillCommands) when every scanned target directory contains zero skills — e.g. no skills have ever been installed, or the configured IDE/scope points at an empty directory.","commonSituations":"Fresh machine or new project before any `ctx7 skill add`; user configured the wrong --ide or --scope so list looks at a directory other than the one skills were installed into; a previous install failed silently.","solutions":["Install a skill first with `ctx7 skill add <source>` or `ctx7 skill search <keyword>`","Verify the target IDE/scope flags match where skills were previously installed (try `ctx7 skill list` with different --ide/--scope)","If skills were expected, check the skills directory (e.g. ~/.claude/skills or project .ctx7 dir) exists and is populated"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync, readdirSync } from 'fs';\nconst skillsDir = join(homedir(), '.claude', 'skills');\nconst hasSkills = existsSync(skillsDir) && readdirSync(skillsDir).length > 0;\nif (!hasSkills) console.log('No skills installed yet — run: ctx7 skill add <source>');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install at least one skill before scripting around `skill list`","In scripts, parse the JSON output and treat empty arrays as a normal state","Always pass the same --ide/--scope flags used at install time"],"tags":["cli","skills","empty-state"],"backgroundTag":"empty-result-set","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"}