openclaw - ✅(Solved) Fix [Skills]: Excessive warnings when scanning flattened skills directory structure [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#44522Fetched 2026-04-08 00:45:47
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Participants
Timeline (top)
cross-referenced ×3labeled ×2referenced ×1

Running openclaw skills produces ~75+ warning messages "[skills] Skipping skill path that resolves outside its configured root" after organizing skills in a flat directory structure.

Root Cause

Running openclaw skills produces ~75+ warning messages "[skills] Skipping skill path that resolves outside its configured root" after organizing skills in a flat directory structure.

Fix Action

Fixed

PR fix notes

PR #44554: fix(skills): deduplicate warnings when scanning flattened skill directories

Description (problem / solution / changelog)

Fixes #44522

Problem: openclaw skills produces 75+ duplicate warnings

Solution: Add path deduplication, skip dirs without SKILL.md

Changed files

Code Example

[skills] Skipping skill path that resolves outside its configured root.
[skills] Skipping skill path that resolves outside its configured root.
...

---
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Running openclaw skills produces ~75+ warning messages "[skills] Skipping skill path that resolves outside its configured root" after organizing skills in a flat directory structure.

Steps to reproduce

  1. Organize skills in ~/.agents/skills with a flat directory structure (all skills at root level, no nested folders)
  2. Run command: openclaw skills
  3. Observe ~75+ warning messages cluttering the output

Expected behavior

The skills command should:

  1. Only scan directories that contain a SKILL.md file at the root level
  2. Skip nested subdirectories (like node_modules/, references/, scripts/, etc.) automatically
  3. Provide a clean output without excessive warnings
  4. Optionally support a .skillignore file or config option to specify custom skill roots

Actual behavior

The command outputs ~75+ warning lines:

[skills] Skipping skill path that resolves outside its configured root.
[skills] Skipping skill path that resolves outside its configured root.
...

These warnings make it difficult to read the actual skill list and clutter the terminal output.

OpenClaw version

2026.3.8

Operating system

Windows 11

Install method

npm global

Model

bailian/qwen3.5-plus

Provider / routing chain

openclaw -> bailian

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: All users who organize skills in custom directory structures Severity: Medium (clutters output, makes skills command difficult to use) Frequency: 100% reproducible Consequence: Users cannot easily read skill list; must filter output manually

Additional information

No response

extent analysis

Fix Plan

To resolve the issue of excessive warning messages when running openclaw skills, we need to modify the skill scanning logic to only consider directories with a SKILL.md file at the root level and ignore nested subdirectories. We can achieve this by introducing a .skillignore file or a config option to specify custom skill roots.

Step-by-Step Solution:

  1. Update openclaw to ignore nested subdirectories:

    • Modify the openclaw code to check for a SKILL.md file in each directory before scanning its contents.
    • Ignore directories without a SKILL.md file or those that are nested within other skill directories.
  2. Implement .skillignore file support:

    • Introduce a .skillignore file format that allows users to specify directories to ignore during the skill scan.
    • Update the openclaw code to read and respect the .skillignore file.
  3. Add config option for custom skill roots:

    • Introduce a config option (e.g., --skill-roots) that allows users to specify custom directories to scan for skills.
    • Update the openclaw code to use the specified custom skill roots.

Example Code Snippets:

// Check for SKILL.md file in each directory
const fs = require('fs');
const path = require('path');

function isSkillDirectory(dirPath) {
  return fs.existsSync(path.join(dirPath, 'SKILL.md'));
}

// Ignore nested subdirectories
function isNestedDirectory(dirPath, skillRoots) {
  for (const root of skillRoots) {
    if (dirPath.startsWith(root) && dirPath !== root) {
      return true;
    }
  }
  return false;
}

// Read and respect .skillignore file
function readSkillIgnoreFile(dirPath) {
  const ignoreFilePath = path.join(dirPath, '.skillignore');
  if (fs.existsSync(ignoreFilePath)) {
    const ignoreDirs = fs.readFileSync(ignoreFilePath, 'utf8').split('\n');
    return ignoreDirs;
  }
  return [];
}

// Update openclaw code to use custom skill roots and ignore nested subdirectories
function scanSkills(skillRoots) {
  const skills = [];
  for (const root of skillRoots) {
    const dirs = fs.readdirSync(root);
    for (const dir of dirs) {
      const dirPath = path.join(root, dir);
      if (fs.statSync(dirPath).isDirectory() && isSkillDirectory(dirPath) && !isNestedDirectory(dirPath, skillRoots)) {
        const ignoreDirs = readSkillIgnoreFile(dirPath);
        if (!ignoreDirs.includes(dir)) {
          skills.push(dirPath);
        }
      }
    }
  }
  return skills;
}

Verification

To verify that the fix worked, run

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The skills command should:

  1. Only scan directories that contain a SKILL.md file at the root level
  2. Skip nested subdirectories (like node_modules/, references/, scripts/, etc.) automatically
  3. Provide a clean output without excessive warnings
  4. Optionally support a .skillignore file or config option to specify custom skill roots

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING