upstash/context7 · info

Cancelled

Error message

Cancelled

What it means

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.

Source

Thrown at packages/cli/src/commands/skill.ts:755

    return;
  }

  log.blank();

  for (const { label, displayPath, skills } of results) {
    log.plain(`${pc.bold(label)} ${pc.dim(displayPath)}`);
    for (const skill of skills) {
      log.plain(`  ${pc.green(skill)}`);
    }
    log.blank();
  }
}

async function removeCommand(name: string, options: RemoveOptions): Promise<void> {
  trackEvent("command", { name: "remove" });
  const target = await promptForSingleTarget(options);
  if (!target) {
    log.warn("Cancelled");
    return;
  }

  const skillsDir = getTargetDirFromSelection(target.ide, target.scope);
  let skillPath: string;
  try {
    skillPath = assertSkillNameInRoot(skillsDir, name);
  } catch {
    log.error(`Invalid skill name: ${name}`);
    return;
  }

  try {
    await rm(skillPath, { recursive: true });
    log.success(`Removed skill: ${name}`);
  } catch (err) {
    const error = err as NodeJS.ErrnoException;
    if (error.code === "ENOENT") {

View on GitHub (pinned to 5284672feb)

Solutions

  1. Re-run the command and pick a target at the prompt
  2. Skip the prompt with explicit flags: `ctx7 skills remove <name> --claude` (or --cursor / --universal / --antigravity) and `--global` if it was installed globally
  3. In automation, always pass IDE + scope flags so promptForSingleTarget short-circuits without a TTY

Example fix

# before
$ ctx7 skills remove my-skill   # cancel at target prompt -> Cancelled

# after
$ ctx7 skills remove my-skill --universal --global
Defensive patterns

Strategy: validation

Validate before calling

// Script a removal without any interactive prompt
import { execFile } from "node:child_process";
execFile("ctx7", ["skills", "remove", "my-skill", "--universal", "--global"], (err, stdout) => {
  if (err) throw err;
  if (stdout.includes("Cancelled")) throw new Error("Removal aborted: missing explicit target flags");
});

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of upstash/context7@5284672feb (2026-08-18). Data as JSON: /api/errors/26b6c7f8816d9aa5. Report an issue: GitHub.