{"record":{"id":"bdccc0c4cc2a9ae1","repo":"tobi/qmd","slug":"skill-not-found-name","errorCode":null,"errorMessage":"Skill not found: ${name}","messagePattern":"Skill not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/qmd.ts","lineNumber":3413,"sourceCode":"      if (skills.length === 0) {\n        console.log(\"No skills found\");\n        return;\n      }\n      const maxName = Math.max(...skills.map((skill) => skill.name.length));\n      for (const skill of skills) {\n        console.log(`  ${skill.name.padEnd(maxName)}  ${skill.description}`);\n      }\n      return;\n    }\n\n    case \"get\": {\n      const full = fullOption || args.includes(\"--full\");\n      const getAll = allOption || args.includes(\"--all\");\n      const names = args.slice(1).filter((arg) => arg !== \"--full\" && arg !== \"--all\");\n      const targets = getAll ? runtimeSkills() : names.map((name) => {\n        const skill = findSkill(name, true);\n        if (!skill) {\n          throw new Error(`Skill not found: ${name}`);\n        }\n        return skill;\n      });\n\n      if (targets.length === 0) {\n        throw new Error(\"No skill name provided. Usage: qmd skills get <name>\");\n      }\n\n      if (jsonMode) {\n        outputSkillsJson({\n          success: true,\n          data: targets.map((skill) => ({\n            name: skill.name,\n            content: readSkillContent(skill),\n            ...(full ? { files: collectSkillFiles(skill).map((file) => ({ path: file.relativePath, content: file.content })) } : {}),\n          })),\n        });\n        return;","sourceCodeStart":3395,"sourceCodeEnd":3431,"githubUrl":"https://github.com/tobi/qmd/blob/dbfd0b4736aeaf761d1a16ca8e424f071df8feb9/src/cli/qmd.ts#L3395-L3431","documentation":"Thrown by `qmd skills get <name>` when findSkill(name, true) returns null — no skill with that name exists in any searched skill directory. The second argument enables runtime (installed) skill lookup.","triggerScenarios":"Running `qmd skills get myskill` where 'myskill' is not installed in any skill search path; also reached via `qmd skills get name1 name2` when any listed name is unknown.","commonSituations":"Typos in the skill name; querying a skill that was never installed or was removed; assuming built-in skills exist when only installed ones are searched.","solutions":["List available skills with `qmd skills list` and correct the name","Install the skill first if it comes from an external source","Check QMD_SKILLS_DIR if the skill lives in a custom location"],"exampleFix":"# before\nqmd skills get qmd-skill\n# after\nqmd skills list\nqmd skills get qmd","handlingStrategy":"validation","validationCode":"import { readdirSync, existsSync } from \"node:fs\";\nfunction skillExists(name: string, dirs: string[]): boolean {\n  return dirs.some((d) => existsSync(`${d}/${name}/SKILL.md`));\n}","typeGuard":"function isKnownSkill(name: string, known: string[]): name is string {\n  return known.includes(name);\n}","tryCatchPattern":"try { getSkill(name); } catch (e) { if ((e as Error).message.startsWith(\"Skill not found:\")) { listSkills(); } else throw e; }","preventionTips":["Run `qmd skills list` and use exact names in scripts","Check skill existence before referencing it in automation"],"tags":["skills","cli","lookup"],"backgroundTag":"resource-not-found","analyzedSha":"dbfd0b4736aeaf761d1a16ca8e424f071df8feb9","analyzedAt":"2026-08-28T18:07:46.628Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}