{"record":{"id":"26b6c7f8816d9aa5","repo":"upstash/context7","slug":"cancelled","errorCode":null,"errorMessage":"Cancelled","messagePattern":"Cancelled","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/cli/src/commands/skill.ts","lineNumber":755,"sourceCode":"    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) {\n    log.warn(\"Cancelled\");\n    return;\n  }\n\n  const skillsDir = getTargetDirFromSelection(target.ide, target.scope);\n  let skillPath: string;\n  try {\n    skillPath = assertSkillNameInRoot(skillsDir, name);\n  } catch {\n    log.error(`Invalid skill name: ${name}`);\n    return;\n  }\n\n  try {\n    await rm(skillPath, { recursive: true });\n    log.success(`Removed skill: ${name}`);\n  } catch (err) {\n    const error = err as NodeJS.ErrnoException;\n    if (error.code === \"ENOENT\") {","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/upstash/context7/blob/5284672feb575908efead6fcf1b5e542f8d607bb/packages/cli/src/commands/skill.ts#L737-L773","documentation":"Logged by `ctx7 skills remove <name>` when promptForSingleTarget() returned null — the user cancelled the interactive prompt asking which IDE/scope to remove the skill from. Graceful warn + return; no files are deleted and the skill remains installed.","triggerScenarios":"Run `ctx7 skills remove my-skill` without IDE flags and press Ctrl+C/ESC at the 'Remove from where?' prompt, or answer negatively to its confirm; also when prompts fail in a non-TTY environment.","commonSituations":"Hesitating at the removal confirmation because the wrong IDE was highlighted; running remove inside a script/CI where the prompt cannot render; terminal interrupt habit.","solutions":["Re-run the command and pick a target at the prompt","Skip the prompt with explicit flags: `ctx7 skills remove <name> --claude` (or --cursor / --universal / --antigravity) and `--global` if it was installed globally","In automation, always pass IDE + scope flags so promptForSingleTarget short-circuits without a TTY"],"exampleFix":"# before\n$ ctx7 skills remove my-skill   # cancel at target prompt -> Cancelled\n\n# after\n$ ctx7 skills remove my-skill --universal --global","handlingStrategy":"validation","validationCode":"// Script a removal without any interactive prompt\nimport { execFile } from \"node:child_process\";\nexecFile(\"ctx7\", [\"skills\", \"remove\", \"my-skill\", \"--universal\", \"--global\"], (err, stdout) => {\n  if (err) throw err;\n  if (stdout.includes(\"Cancelled\")) throw new Error(\"Removal aborted: missing explicit target flags\");\n});","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair remove with an IDE flag (--claude/--cursor/--universal/--antigravity) and scope flag in automation","Check promptForSingleTarget() for null before computing skill paths — a null target means 'do nothing'","Confirm the skill exists at the target before removal to avoid confusing follow-up errors"],"tags":["cli","interactive-prompt","user-cancellation","remove","skills"],"backgroundTag":"user-cancelled-prompt","analyzedSha":"5284672feb575908efead6fcf1b5e542f8d607bb","analyzedAt":"2026-08-18T18:00:18.510Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}