{"record":{"id":"3f2b7d1c46cfa20f","repo":"google-gemini/gemini-cli","slug":"the-skill-name-must-be-provided","errorCode":null,"errorMessage":"The skill name must be provided.","messagePattern":"The skill name must be provided\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/skills/uninstall.ts","lineNumber":60,"sourceCode":"export const uninstallCommand: CommandModule = {\n  command: 'uninstall <name> [--scope]',\n  describe: 'Uninstalls an agent skill by name.',\n  builder: (yargs) =>\n    yargs\n      .positional('name', {\n        describe: 'The name of the skill to uninstall.',\n        type: 'string',\n        demandOption: true,\n      })\n      .option('scope', {\n        describe:\n          'The scope to uninstall the skill from. Defaults to \"user\" (global).',\n        choices: ['user', 'workspace'],\n        default: 'user',\n      })\n      .check((argv) => {\n        if (!argv.name) {\n          throw new Error('The skill name must be provided.');\n        }\n        return true;\n      }),\n  handler: async (argv) => {\n    await handleUninstall({\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion\n      name: argv['name'] as string,\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion\n      scope: argv['scope'] as 'user' | 'workspace',\n    });\n    await exitCli();\n  },\n};\n","sourceCodeStart":42,"sourceCodeEnd":74,"githubUrl":"https://github.com/google-gemini/gemini-cli/blob/5024443c7217464a66e98f80d73172a26440bd8f/packages/cli/src/commands/skills/uninstall.ts#L42-L74","documentation":"Thrown by the yargs `.check()` validator on the `gemini skills uninstall <name>` command when the positional `name` argument is missing or falsy. The check enforces `demandOption: true` on the positional; uninstall needs a concrete skill identifier to look up and remove.","triggerScenarios":"Running `gemini skills uninstall` with no positional, an empty string, or programmatically invoking `uninstallCommand` without a name.","commonSituations":"Forgetting the skill name; copying an uninstall command but dropping the argument; referencing an unset shell variable; assuming a default such as the most recently installed skill.","solutions":["List installed skills first (`gemini skills list`) then uninstall by exact name: `gemini skills uninstall my-skill`.","Confirm the name is spelled exactly as installed (case-sensitive).","Pass a non-empty string when invoking the handler programmatically."],"exampleFix":"// before\ngemini skills uninstall\n// after\ngemini skills uninstall my-skill","handlingStrategy":"validation","validationCode":"const name = typeof argv.name === 'string' ? argv.name.trim() : '';\nif (!name) {\n  console.error('Usage: gemini skills uninstall <name>');\n  process.exit(2);\n}","typeGuard":"function hasSkillName(argv: unknown): argv is { name: string } {\n  return (\n    typeof argv === 'object' && argv !== null &&\n    typeof (argv as { name?: unknown }).name === 'string' &&\n    (argv as { name: string }).name.trim().length > 0\n  );\n}","tryCatchPattern":null,"preventionTips":["Run `gemini skills list` first to confirm exact names.","Pass the exact stored name (case-sensitive).","Build the uninstall command from the list output rather than typing from memory."],"tags":["cli","yargs","skills","validation","argument"],"backgroundTag":null,"analyzedSha":"5024443c7217464a66e98f80d73172a26440bd8f","analyzedAt":"2026-08-12T06:01:53.711Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}