davila7/claude-code-templates · warning
Warning: Error loading skills from ${skillsDir}:
Error message
Warning: Error loading skills from ${skillsDir}: What it means
This is the outer catch of loadSkillsFromDirectory: the whole scan of a skills directory failed before per-skill iteration could complete — typically the directory itself is missing, unreadable, or the initial readdir threw. It returns the (usually empty) skills array so the dashboard renders an empty skills list rather than crashing.
Source
Thrown at cli-tool/src/skill-dashboard.js:99
if (await fs.pathExists(skillMdPath)) {
console.log(chalk.gray(` ✓ Found SKILL.md in ${skillDir}`));
const skillData = await this.parseSkill(skillMdPath, skillPath, skillDir, source);
if (skillData) {
skills.push(skillData);
console.log(chalk.green(` ✅ Loaded skill: ${skillData.name}`));
}
} else {
console.log(chalk.gray(` ⊘ No SKILL.md in ${skillDir}`));
}
} catch (error) {
console.warn(chalk.yellow(` ⚠ Error loading skill ${skillDir}:`), error.message);
}
}
return skills;
} catch (error) {
console.warn(chalk.yellow(`Warning: Error loading skills from ${skillsDir}:`), error.message);
return skills;
}
}
async loadPluginSkills() {
const skills = [];
const pluginsDir = path.join(this.claudeDir, 'plugins', 'marketplaces');
try {
if (!(await fs.pathExists(pluginsDir))) {
console.log(chalk.gray(` ℹ Plugins directory does not exist: ${pluginsDir}`));
return skills;
}
const marketplaces = await fs.readdir(pluginsDir);
console.log(chalk.gray(` 📁 Found ${marketplaces.length} marketplace(s)`));
for (const marketplace of marketplaces) {View on GitHub (pinned to a0851ed10c)
Solutions
- Confirm the directory exists and is readable: `ls -la <skillsDir>`; create it if absent (`mkdir -p`
- Check the configured skills path (env var / settings) points at the intended directory
- Fix permissions: `chmod -R u+rx <skillsDir>`
- If an inner subdirectory is the culprit (some setups surface that here), find it with `find <skillsDir> ! -readable`
Example fix
// before
const skills = await loadSkillsFromDirectory('/wrong/path/skills');
// after
await fs.ensureDir(skillsDir);
const skills = await loadSkillsFromDirectory(skillsDir); Defensive patterns
Strategy: fallback
Validate before calling
if (!(await fs.pathExists(skillsDir)) || !(await fs.stat(skillsDir)).isDirectory()) {
return []; // no skills installed — not an error
} Try / catch
catch (error) {
console.warn(`Skills directory ${skillsDir} unreadable: ${error.message}`);
return skills; // empty/partial list keeps the dashboard alive
} Prevention
- Create the skills directory at app startup (fs.ensureDir)
- Guard against missing dirs before scanning instead of catching after
- Check mount health before scanning network-backed skill directories
When it happens
Trigger: Calling loadSkillsFromDirectory where the skills path does not exist, is a file instead of a directory, or lacks read/execute permission for the process; also when readdir throws on special filesystem conditions (permission-denied on a subdirectory).
Common situations: Running the skill dashboard before any skills are installed and the directory was never created; skills path misconfigured (wrong env var / custom path typo); skills directory on a network mount that is down; restrictive permissions after restoring from archive.
Related errors
- ⚠ Error loading skill ${skillDir}:
- Warning: Error parsing skill ${skillDirName}
- No files were copied from Cloudflare component directory
- Claude Code projects directory not found at ${this.projectsD
- Failed to load skill
AI-assisted analysis of davila7/claude-code-templates@a0851ed10c (2026-08-28).
Data as JSON: /api/errors/6fb8e50d89b7e49e.
Report an issue: GitHub.