jackwener/OpenCLI · error · CommandExecutionError

Skill "${name}" not found.

Error message

Skill "${name}" not found.

What it means

Thrown as a CommandExecutionError when the requested skill folder does not exist under ~/.trae/skills/. The secondary detail message ('Tried: <path>') shows the exact path checked, making it easy to diagnose path/typo issues.

Source

Thrown at clis/trae-solo/skill-fs.js:107

// -------- skill-fs-show --------
cli({
    site: 'trae-solo',
    name: 'skill-fs-show',
    access: 'read',
    description: 'Print a skill\'s SKILL.md content + on-disk path.',
    domain: 'localhost',
    browser: false,
    strategy: Strategy.LOCAL,
    args: [
        { name: 'name', positional: true, required: true, help: 'Skill name (folder under ~/.trae/skills/)' },
    ],
    columns: ['Field', 'Value'],
    func: async (args) => {
        const name = String(args.name || '').trim();
        if (!name) throw new ArgumentError('name required');
        const dir = path.join(TRAE_SKILLS_DIR, name);
        if (!fs.existsSync(dir)) {
            throw new CommandExecutionError(`Skill "${name}" not found.`, `Tried: ${dir}`);
        }
        const meta = parseSkillMd(dir);
        const skillMd = path.join(dir, 'SKILL.md');
        const content = fs.existsSync(skillMd) ? fs.readFileSync(skillMd, 'utf-8') : '(no SKILL.md)';
        return [
            { Field: 'Name', Value: meta.name },
            { Field: 'Path', Value: dir },
            { Field: 'Description', Value: (meta.description || '').slice(0, 200) },
            { Field: 'Tags', Value: (meta.tags || []).join(', ') },
            { Field: 'Author', Value: meta.author },
            { Field: 'Version', Value: meta.version },
            { Field: 'Files', Value: fs.readdirSync(dir).join(', ').slice(0, 200) },
            { Field: 'SKILL.md (head)', Value: content.slice(0, 1200) },
        ];
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. List available skills (skill-fs-list) and copy the exact folder name.
  2. Check the 'Tried:' path in the error detail and verify it exists with ls.
  3. Fix casing to match the folder exactly on case-sensitive filesystems.
  4. Install the skill if it genuinely is missing from ~/.trae/skills/.

Example fix

// before
show('My-Skill')   // folder is 'my-skill'
// after
show('my-skill')
Defensive patterns

Strategy: try-catch

Validate before calling

const fs = require('fs'), path = require('path'), os = require('os');
function skillExists(name) {
  const dir = path.join(os.homedir(), '.trae', 'skills', name);
  return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
}

Type guard

function isKnownSkill(name, knownNames) {
  return typeof name === 'string' && knownNames.includes(name);
}

Try / catch

try {
  await skillFsShow(name);
} catch (e) {
  if (e instanceof CommandExecutionError && /not found/.test(e.message)) {
    console.error(e.detail); // 'Tried: <path>' — verify path and name casing
  } else throw e;
}

Prevention

When it happens

Trigger: Running the skill detail/show command with a name whose folder path.join(TRAE_SKILLS_DIR, name) fails fs.existsSync — typo in the name, skill never installed, or name includes wrong casing/extension.

Common situations: Typos in the skill name; case-sensitive filesystems (Linux) vs camelCase folder names; running in a container where HOME differs so ~/.trae/skills is elsewhere; skill was uninstalled but still referenced in scripts.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/20277458cb5a5587. Report an issue: GitHub.