tobi/qmd · error · Error

Skill not found: ${name}

Error message

Skill not found: ${name}

What it means

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.

Source

Thrown at src/cli/qmd.ts:3413

      if (skills.length === 0) {
        console.log("No skills found");
        return;
      }
      const maxName = Math.max(...skills.map((skill) => skill.name.length));
      for (const skill of skills) {
        console.log(`  ${skill.name.padEnd(maxName)}  ${skill.description}`);
      }
      return;
    }

    case "get": {
      const full = fullOption || args.includes("--full");
      const getAll = allOption || args.includes("--all");
      const names = args.slice(1).filter((arg) => arg !== "--full" && arg !== "--all");
      const targets = getAll ? runtimeSkills() : names.map((name) => {
        const skill = findSkill(name, true);
        if (!skill) {
          throw new Error(`Skill not found: ${name}`);
        }
        return skill;
      });

      if (targets.length === 0) {
        throw new Error("No skill name provided. Usage: qmd skills get <name>");
      }

      if (jsonMode) {
        outputSkillsJson({
          success: true,
          data: targets.map((skill) => ({
            name: skill.name,
            content: readSkillContent(skill),
            ...(full ? { files: collectSkillFiles(skill).map((file) => ({ path: file.relativePath, content: file.content })) } : {}),
          })),
        });
        return;

View on GitHub (pinned to dbfd0b4736)

Solutions

  1. List available skills with `qmd skills list` and correct the name
  2. Install the skill first if it comes from an external source
  3. Check QMD_SKILLS_DIR if the skill lives in a custom location

Example fix

# before
qmd skills get qmd-skill
# after
qmd skills list
qmd skills get qmd
Defensive patterns

Strategy: validation

Validate before calling

import { readdirSync, existsSync } from "node:fs";
function skillExists(name: string, dirs: string[]): boolean {
  return dirs.some((d) => existsSync(`${d}/${name}/SKILL.md`));
}

Type guard

function isKnownSkill(name: string, known: string[]): name is string {
  return known.includes(name);
}

Try / catch

try { getSkill(name); } catch (e) { if ((e as Error).message.startsWith("Skill not found:")) { listSkills(); } else throw e; }

Prevention

When it happens

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

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

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of tobi/qmd@dbfd0b4736 (2026-08-28). Data as JSON: /api/errors/bdccc0c4cc2a9ae1. Report an issue: GitHub.