{"record":{"id":"5d97c3fdc47634fa","repo":"jackwener/OpenCLI","slug":"no-skills-found-under-trae-skills","errorCode":null,"errorMessage":"No skills found under ~/.trae/skills/.","messagePattern":"No skills found under ~/\\.trae/skills/\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/trae-solo/skill-fs.js","lineNumber":51,"sourceCode":"    access: 'read',\n    description: 'List all Trae SOLO skills present on disk under ~/.trae/skills/. Reads SKILL.md front-matter for descriptions. Works while Trae is closed.',\n    domain: 'localhost',\n    browser: false,\n    strategy: Strategy.LOCAL,\n    args: [\n        { name: 'limit', type: 'int', required: false, default: 200, help: 'Max rows' },\n    ],\n    columns: ['Index', 'Name', 'Description', 'Source'],\n    func: async (args) => {\n        assertReadable(TRAE_SKILLS_DIR, '~/.trae/skills');\n        const dirs = fs.readdirSync(TRAE_SKILLS_DIR).filter((n) => {\n            const full = path.join(TRAE_SKILLS_DIR, n);\n            return fs.statSync(full).isDirectory() && !n.startsWith('_');\n        });\n        const rows = dirs.map((d) => parseSkillMd(path.join(TRAE_SKILLS_DIR, d)));\n        const limit = Number.isInteger(args.limit) && args.limit > 0 ? args.limit : 200;\n        if (!rows.length) {\n            throw new EmptyResultError('trae-solo skill-fs-list', 'No skills found under ~/.trae/skills/.');\n        }\n        return rows.slice(0, limit).map((r, i) => ({\n            Index: i + 1,\n            Name: r.name,\n            Description: (r.description || '').slice(0, 120),\n            Source: '',\n        }));\n    },\n});\n\n// -------- skill-fs-installed --------\ncli({\n    site: 'trae-solo',\n    name: 'skill-fs-installed',\n    access: 'read',\n    description: 'List INSTALLED Trae SOLO skills (managedSkills entry in ~/.trae/skill-config.json).',\n    domain: 'localhost',\n    browser: false,","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/trae-solo/skill-fs.js#L33-L69","documentation":"Thrown as an EmptyResultError when the ~/.trae/skills/ directory contains no qualifying skill folders. The lister only counts directories that do not start with '_' and each must yield a parseable SKILL.md row; zero directories means nothing to display.","triggerScenarios":"Running trae-solo skill-fs-list when ~/.trae/skills/ does not exist, is empty, contains only files (not directories), or only underscore-prefixed dirs like _template.","commonSituations":"Fresh trae install with no skills installed; TRAE_SKILLS_DIR pointing at the wrong home directory (e.g. under a different USER profile or container); user renamed skills folders with a leading underscore.","solutions":["Install at least one skill so a folder with SKILL.md exists under ~/.trae/skills/.","Verify ~/.trae/skills/ exists: ls ~/.trae/skills/ — create it and install skills if missing.","Check that skill folders are directories (not zips/files) and are not prefixed with '_'.","If running in a container/CI, confirm HOME resolves to the profile that actually has the skills."],"exampleFix":"# before\nls ~/.trae/skills/  # empty\n# after\nmkdir -p ~/.trae/skills/my-skill && echo '---\\nname: my-skill\\ndescription: demo\\n---' > ~/.trae/skills/my-skill/SKILL.md","handlingStrategy":"validation","validationCode":"const fs = require('fs'), path = require('path'), os = require('os');\nfunction skillsDirHasSkills() {\n  const dir = path.join(os.homedir(), '.trae', 'skills');\n  if (!fs.existsSync(dir)) return false;\n  return fs.readdirSync(dir).some(n => n[0] !== '_' && fs.statSync(path.join(dir, n)).isDirectory());\n}","typeGuard":"function hasSkillDirs(entries) {\n  return Array.isArray(entries) && entries.some(n => typeof n === 'string' && !n.startsWith('_'));\n}","tryCatchPattern":"try {\n  const rows = await skillFsList();\n} catch (e) {\n  if (e instanceof EmptyResultError && /No skills found/.test(e.message)) {\n    // install a skill or point the user at the install flow\n  } else throw e;\n}","preventionTips":["Verify ~/.trae/skills/ exists and contains at least one skill folder with SKILL.md.","Avoid underscore-prefixed names for real skills.","Confirm HOME resolves correctly in containers/CI.","Install skills through the CLI so the directory is populated."],"tags":["empty-result","filesystem","skills"],"backgroundTag":"empty-directory-result","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}