Skip to content

fix(openclaw): align paths with upstream openclaw/openclaw conventions#117

Merged
rohitg00 merged 2 commits intomainfrom
fix/openclaw-upstream-paths
Apr 21, 2026
Merged

fix(openclaw): align paths with upstream openclaw/openclaw conventions#117
rohitg00 merged 2 commits intomainfrom
fix/openclaw-upstream-paths

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented Apr 21, 2026

Summary

While reviewing #114 (Hermes support), noticed OpenClaw config drifts from real openclaw/openclaw upstream layout. This PR aligns it.

Upstream (openclaw/openclaw)

  • Project skills: .openclaw/skills/<name>/SKILL.md
  • Global skills: ~/.openclaw/workspace/skills/<name>/SKILL.md
  • Instructions: AGENTS.md (+ SOUL.md, TOOLS.md)
  • Config: openclaw.json

Current vs upstream

Field Main Upstream Fixed
skillsDir skills .openclaw/skills yes
configFile CLAUDE.md AGENTS.md yes
globalSkillsDir ~/.openclaw/skills ~/.openclaw/workspace/skills yes
altSkillsDirs ['~/.openclaw/skills'] kept skills back-compat + added workspace
isDetected ~/.openclaw + openclaw.json should also check project .openclaw/ + workspace yes
MCP AGENT_DIR_MAP ['skills'] ['.openclaw/skills'] yes

Changes

  • packages/core/src/agent-config.ts: skillsDir, configFile, globalSkillsDir, altSkillsDirs
  • packages/agents/src/openclaw.ts: isDetected adds .openclaw/ and workspace/
  • packages/mcp/src/tools.ts: AGENT_DIR_MAP runtime discovery for .openclaw/skills
  • packages/agents/README.md: table reflects real paths

Validation

  • @skillkit/core build ok
  • @skillkit/agents build ok
  • @skillkit/core typecheck ok
  • @skillkit/agents typecheck ok
  • @skillkit/agents test 189/189 pass

Back-compat

altSkillsDirs: ['skills', '~/.openclaw/workspace/skills'] keeps old bare skills/ dir detectable so projects installed before this fix keep working.

Follow-up

After #114 lands, Hermes has 17 touchpoints. OpenClaw now has matching path coverage. Both match upstream conventions.


Open in Devin Review

Summary by CodeRabbit

  • Documentation

    • Updated OpenClaw docs to reflect new skill paths and config filename.
  • Chores

    • Project-local skills moved to .openclaw/skills/.
    • Added workspace-level skills at ~/.openclaw/workspace/skills/.
    • Configuration filename changed to AGENTS.md.
  • Bug Fixes / Improvements

    • Improved OpenClaw detection to recognize the new local and workspace locations.

- skillsDir: 'skills' -> '.openclaw/skills' (match project-scoped convention)
- configFile: 'CLAUDE.md' -> 'AGENTS.md' (upstream uses AGENTS.md/SOUL.md)
- globalSkillsDir: '~/.openclaw/skills' -> '~/.openclaw/workspace/skills'
- altSkillsDirs: keep 'skills' for back-compat, add workspace variant
- isDetected: also check project .openclaw/ and global workspace/
- MCP AGENT_DIR_MAP: .openclaw/skills for runtime discovery
- README: reflect real paths

Refs NousResearch upstream layout; pairs with #114 Hermes support.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
skillkit Ignored Ignored Preview Apr 21, 2026 9:15am
skillkit-docs Ignored Ignored Preview Apr 21, 2026 9:15am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

📝 Walkthrough

Walkthrough

Project-local OpenClaw skills moved to .openclaw/skills/ and global skills moved to ~/.openclaw/workspace/skills/. Detection, config, and skill-discovery logic were updated to recognize the new paths and an alternative config filename.

Changes

Cohort / File(s) Summary
Agent detection
packages/agents/src/openclaw.ts
OpenClawAdapter.isDetected() now checks for .openclaw under process.cwd() and ~/.openclaw/workspace in addition to previous checks. Review detection path resolution and expanded existence checks.
Agent configuration
packages/core/src/agent-config.ts
Added altConfigFiles?: string[] to AgentDirectoryConfig. Updated AGENT_CONFIG['openclaw']: skillsDir.openclaw/skills, configFileAGENTS.md, added altConfigFiles: ['openclaw.json'], updated altSkillsDirs and globalSkillsDir to include ~/.openclaw/workspace/skills. Verify config defaults and typing.
Search path resolution
packages/core/src/config.ts
getSearchDirs() now respects per-agent globalSkillsDir (resolving ~) when present instead of always deriving from adapter.skillsDir. Check home-directory resolution and resulting search ordering.
Context sync / discovery
packages/core/src/context/sync.ts
ContextSync.detectAgents() now considers altConfigFiles during detection (checks for any alt config under project path). Confirm detection precedence and path resolution.
Skill discovery
packages/core/src/skills.ts
Added .openclaw/skills to SKILL_DISCOVERY_PATHS so discoverers check that location.
Directory mapping
packages/mcp/src/tools.ts
Updated AGENT_DIR_MAP['openclaw'] to include '.openclaw/skills' and '.openclaw/workspace/skills' alongside skills.
Documentation
packages/agents/README.md
Updated OpenClaw README table entry to reflect new project-local and global skills directories. Confirm docs match code changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped through code and found a new nest,
.openclaw/skills now hosts the best,
Workspace roots in ~/.openclaw/workspace too,
A tidy burrow for skills — hip-hop-hooray! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: aligning OpenClaw paths with upstream conventions, which is the primary objective across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/openclaw-upstream-paths

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread packages/core/src/agent-config.ts
Comment on lines +19 to +23
const globalWorkspace = join(homedir(), '.openclaw', 'workspace');
const openclawConfig = join(process.cwd(), 'openclaw.json');

return existsSync(globalOpenClaw) || existsSync(openclawConfig);
return existsSync(projectOpenClaw) || existsSync(globalOpenClaw) ||
existsSync(globalWorkspace) || existsSync(openclawConfig);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Redundant existsSync(globalWorkspace) check — always shadowed by parent directory check

globalWorkspace is join(homedir(), '.openclaw', 'workspace') (i.e. ~/.openclaw/workspace), while globalOpenClaw is join(homedir(), '.openclaw') (i.e. ~/.openclaw). Since ~/.openclaw/workspace is a subdirectory of ~/.openclaw, it's impossible for existsSync(globalWorkspace) to be true when existsSync(globalOpenClaw) is false — the parent directory must exist for the child to exist. The globalWorkspace variable and its check on line 22-23 are dead code. If the intent was to detect specifically the workspace subdirectory (not just any .openclaw presence), the globalOpenClaw check should be removed or reordered.

Suggested change
const globalWorkspace = join(homedir(), '.openclaw', 'workspace');
const openclawConfig = join(process.cwd(), 'openclaw.json');
return existsSync(globalOpenClaw) || existsSync(openclawConfig);
return existsSync(projectOpenClaw) || existsSync(globalOpenClaw) ||
existsSync(globalWorkspace) || existsSync(openclawConfig);
const globalWorkspace = join(homedir(), '.openclaw', 'workspace');
const openclawConfig = join(process.cwd(), 'openclaw.json');
return existsSync(projectOpenClaw) || existsSync(globalWorkspace) ||
existsSync(openclawConfig);
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/core/src/agent-config.ts`:
- Line 127: getSearchDirs() is still deriving the home path from
adapter.skillsDir so setting globalSkillsDir alone doesn't change the actual
search locations; update getSearchDirs() (and any code that reads
adapter.skillsDir) to include or prefer the new globalSkillsDir value when
constructing search paths (e.g., treat globalSkillsDir as the canonical
home/workspace path for global skills), and ensure adapter.skillsDir falls back
to or is composed from globalSkillsDir so that "~/.openclaw/workspace/skills" is
used instead of "~/.openclaw/skills".
- Line 125: ContextSync's detection currently only uses config.configFile and
changing it to 'AGENTS.md' hides projects that only have 'openclaw.json' even
though OpenClawAdapter.isDetected() still checks it; update ContextSync's
detection logic (where it reads config.configFile) to also consult a new
config.altConfigFiles array (or similar) so it checks both config.configFile and
each entry in config.altConfigFiles when determining detection; ensure
OpenClawAdapter.isDetected() remains compatible and add/rename the config
property references (config.configFile and config.altConfigFiles) used by the
detection code to cover both markers.

In `@packages/mcp/src/tools.ts`:
- Line 188: AGENT_DIR_MAP currently lists '.openclaw/skills' for the 'openclaw'
agent but omits the global workspace path, causing discovery to miss
'~/.openclaw/workspace/skills'; update AGENT_DIR_MAP['openclaw'] to include
'~/.openclaw/workspace/skills' (and mirror the same addition where AGENT_DIR_MAP
is defined around the similar block referenced) and ensure SKILL_DISCOVERY_PATHS
(or the discovery routine that checks agent-specific paths under home) will
expand and check tilde/home paths for agent entries so that both project-root
'.openclaw/skills' and the global '~/.openclaw/workspace/skills' are discovered
by skillkit_catalog/load flows.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 254b9a3d-2592-4f91-9e87-c65d80b71448

📥 Commits

Reviewing files that changed from the base of the PR and between 17e9720 and 5098a6c.

📒 Files selected for processing (4)
  • packages/agents/README.md
  • packages/agents/src/openclaw.ts
  • packages/core/src/agent-config.ts
  • packages/mcp/src/tools.ts

altSkillsDirs: ['~/.openclaw/skills'],
globalSkillsDir: '~/.openclaw/skills',
skillsDir: '.openclaw/skills',
configFile: 'AGENTS.md',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Keep openclaw.json as a core detection marker.

ContextSync checks only config.configFile, so changing this to AGENTS.md makes projects with only upstream openclaw.json invisible to core agent detection, even though OpenClawAdapter.isDetected() still checks it.

🐛 Proposed direction
 export interface AgentDirectoryConfig {
   /** Config file that references skills */
   configFile: string;
+  /** Additional config files that identify the agent */
+  altConfigFiles?: string[];
   openclaw: {
     skillsDir: '.openclaw/skills',
     configFile: 'AGENTS.md',
+    altConfigFiles: ['openclaw.json'],
     altSkillsDirs: ['skills', '~/.openclaw/workspace/skills'],

Then update core detection to check config.configFile plus config.altConfigFiles.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/agent-config.ts` at line 125, ContextSync's detection
currently only uses config.configFile and changing it to 'AGENTS.md' hides
projects that only have 'openclaw.json' even though OpenClawAdapter.isDetected()
still checks it; update ContextSync's detection logic (where it reads
config.configFile) to also consult a new config.altConfigFiles array (or
similar) so it checks both config.configFile and each entry in
config.altConfigFiles when determining detection; ensure
OpenClawAdapter.isDetected() remains compatible and add/rename the config
property references (config.configFile and config.altConfigFiles) used by the
detection code to cover both markers.

skillsDir: '.openclaw/skills',
configFile: 'AGENTS.md',
altSkillsDirs: ['skills', '~/.openclaw/workspace/skills'],
globalSkillsDir: '~/.openclaw/workspace/skills',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Wire globalSkillsDir into skill search paths.

The new value is not enough by itself: getSearchDirs() currently derives the home path from adapter.skillsDir, which points OpenClaw at ~/.openclaw/skills instead of ~/.openclaw/workspace/skills.

🐛 Proposed direction
 export function getSearchDirs(adapter: AgentAdapterInfo): string[] {
   const dirs: string[] = [];

   dirs.push(join(process.cwd(), adapter.skillsDir));
   dirs.push(join(process.cwd(), '.agent', 'skills'));
-  dirs.push(join(homedir(), adapter.skillsDir));
+  if (adapter.globalSkillsDir) {
+    dirs.push(adapter.globalSkillsDir.replace(/^~(?=\/)/, homedir()));
+  } else {
+    dirs.push(join(homedir(), adapter.skillsDir));
+  }
   dirs.push(join(homedir(), '.agent', 'skills'));

   return dirs;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/agent-config.ts` at line 127, getSearchDirs() is still
deriving the home path from adapter.skillsDir so setting globalSkillsDir alone
doesn't change the actual search locations; update getSearchDirs() (and any code
that reads adapter.skillsDir) to include or prefer the new globalSkillsDir value
when constructing search paths (e.g., treat globalSkillsDir as the canonical
home/workspace path for global skills), and ensure adapter.skillsDir falls back
to or is composed from globalSkillsDir so that "~/.openclaw/workspace/skills" is
used instead of "~/.openclaw/skills".

Comment thread packages/mcp/src/tools.ts Outdated
- skills.ts: add '.openclaw/skills' to SKILL_DISCOVERY_PATHS (alphabetical)
- config.ts: getSearchDirs prefers globalSkillsDir for home path
  (was deriving from skillsDir, producing ~/.openclaw/skills instead
  of ~/.openclaw/workspace/skills)
- agent-config.ts: add altConfigFiles to AgentDirectoryConfig schema,
  set openclaw altConfigFiles: ['openclaw.json']
- context/sync.ts: detectAgents also iterates altConfigFiles so
  projects with only openclaw.json still detected
- mcp/tools.ts: AGENT_DIR_MAP includes '.openclaw/workspace/skills'
  for home-rooted global discovery
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 getInstallDir global path inconsistent with getSearchDirs for openclaw

The PR updated getSearchDirs (line 104-112) to resolve the global skills directory from AGENT_CONFIG[adapter.type]?.globalSkillsDir, which for openclaw resolves to ~/.openclaw/workspace/skills. However, the companion function getInstallDir (packages/core/src/config.ts:118-124) was not updated and still uses join(homedir(), adapter.skillsDir), which for openclaw yields ~/.openclaw/skills. This means skills installed globally via skillkit install --global go to ~/.openclaw/skills, but getSearchDirs looks in ~/.openclaw/workspace/skills — so globally installed skills won't be found during search or sync. The same function is called by packages/cli/src/helpers.ts:36 and packages/tui/src/utils/helpers.ts:48 and used in install/quick commands.

(Refers to lines 119-120)

Prompt for agents
The getInstallDir function at packages/core/src/config.ts:118-124 uses join(homedir(), adapter.skillsDir) for the global install path. This was fine before because getSearchDirs also used the same expression. However, getSearchDirs was updated (lines 104-112) to resolve the actual globalSkillsDir from AGENT_CONFIG, which for openclaw is ~/.openclaw/workspace/skills (not ~/.openclaw/skills which adapter.skillsDir would produce).

The fix should make getInstallDir also use AGENT_CONFIG[adapter.type]?.globalSkillsDir when available, with the same tilde-resolution logic. Something like:

  if (global) {
    const globalDir = AGENT_CONFIG[adapter.type]?.globalSkillsDir;
    if (globalDir) {
      return globalDir.startsWith('~/')
        ? join(homedir(), globalDir.slice(2))
        : globalDir;
    }
    return join(homedir(), adapter.skillsDir);
  }

This ensures getInstallDir and getSearchDirs agree on the global directory location. The AGENT_CONFIG import is already present in this file (line 7).
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/config.ts (1)

98-121: ⚠️ Potential issue | 🟠 Major

Keep OpenClaw search, alternate paths, and global install paths in sync.

getSearchDirs() now searches OpenClaw globals in ~/.openclaw/workspace/skills, but getInstallDir(adapter, true) still installs to ~/.openclaw/skills. Also, altSkillsDirs such as the back-compat skills path are not added here, so older OpenClaw project layouts can still be missed by core search flows.

🐛 Proposed fix
+function resolveConfiguredDir(dir: string, root: string): string {
+  if (dir.startsWith('~/')) {
+    return join(homedir(), dir.slice(2));
+  }
+  return join(root, dir);
+}
+
+function getGlobalSkillsDir(adapter: AgentAdapterInfo): string {
+  const globalDir = AGENT_CONFIG[adapter.type]?.globalSkillsDir;
+  return globalDir
+    ? resolveConfiguredDir(globalDir, homedir())
+    : join(homedir(), adapter.skillsDir);
+}
+
+function pushUnique(dirs: string[], dir: string): void {
+  if (!dirs.includes(dir)) {
+    dirs.push(dir);
+  }
+}
+
 export function getSearchDirs(adapter: AgentAdapterInfo): string[] {
   const dirs: string[] = [];
 
-  dirs.push(join(process.cwd(), adapter.skillsDir));
-  dirs.push(join(process.cwd(), '.agent', 'skills'));
+  pushUnique(dirs, join(process.cwd(), adapter.skillsDir));
+  pushUnique(dirs, join(process.cwd(), '.agent', 'skills'));
 
-  const globalDir = AGENT_CONFIG[adapter.type]?.globalSkillsDir;
-  if (globalDir) {
-    const resolved = globalDir.startsWith('~/')
-      ? join(homedir(), globalDir.slice(2))
-      : globalDir;
-    dirs.push(resolved);
-  } else {
-    dirs.push(join(homedir(), adapter.skillsDir));
+  for (const altDir of AGENT_CONFIG[adapter.type]?.altSkillsDirs ?? []) {
+    pushUnique(dirs, resolveConfiguredDir(altDir, process.cwd()));
   }
-  dirs.push(join(homedir(), '.agent', 'skills'));
+
+  pushUnique(dirs, getGlobalSkillsDir(adapter));
+  pushUnique(dirs, join(homedir(), '.agent', 'skills'));
 
   return dirs;
 }
 
 export function getInstallDir(adapter: AgentAdapterInfo, global = false): string {
   if (global) {
-    return join(homedir(), adapter.skillsDir);
+    return getGlobalSkillsDir(adapter);
   }
 
   return join(process.cwd(), adapter.skillsDir);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/config.ts` around lines 98 - 121, getSearchDirs and
getInstallDir are out of sync for OpenClaw globals and alternate/back-compat
paths; update getInstallDir(adapter, true) to mirror getSearchDirs' logic:
resolve AGENT_CONFIG[adapter.type]?.globalSkillsDir (handling '~/'), fall back
to the same homedir workspace path used in getSearchDirs (e.g.,
'~/.openclaw/workspace/skills' instead of '~/.openclaw/skills'), and ensure any
alternate/back-compat directories (the same altSkillsDirs/legacy 'skills' paths
you add to getSearchDirs) are included or considered when returning the global
install target so installs and searches use the same set of global locations.
♻️ Duplicate comments (1)
packages/mcp/src/tools.ts (1)

188-236: ⚠️ Potential issue | 🟠 Major

Make the OpenClaw workspace path discoverable without an agent filter.

Line 188 adds .openclaw/workspace/skills only through AGENT_DIR_MAP, but the extra-dir pass at Lines 224-233 runs only when agentFilter is set. skillkit_load, skillkit_resource, and unfiltered catalog calls still miss ~/.openclaw/workspace/skills.

🐛 Proposed fix
-  if (agentFilter) {
-    const agentDirs = AGENT_DIR_MAP[agentFilter] ?? [];
-    for (const rel of agentDirs) {
+  const extraAgentDirs = agentFilter
+    ? (AGENT_DIR_MAP[agentFilter] ?? [])
+    : [...new Set(Object.values(AGENT_DIR_MAP).flat())];
+
+  for (const rel of extraAgentDirs) {
       if (!SKILL_DISCOVERY_PATHS.includes(rel)) {
         const full = join(home, rel);
         if (existsSync(full) && !dirs.includes(full)) {
           dirs.push(full);
         }
       }
-    }
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mcp/src/tools.ts` around lines 188 - 236, The getLocalSkillDirs
function only includes '.openclaw/workspace/skills' via AGENT_DIR_MAP and adds
AGENT_DIR_MAP-only paths to the discovered dirs only when agentFilter is
provided, so unfiltered calls miss that workspace; update getLocalSkillDirs to
treat AGENT_DIR_MAP entries that are not in SKILL_DISCOVERY_PATHS as additional
discovery paths for all runs (not only when agentFilter is set) — e.g., merge
unique extra agentDirs like '.openclaw/workspace/skills' into the
SKILL_DISCOVERY_PATHS loop or add a precomputed set of additionalRoots used in
the first roots loop; ensure you reference AGENT_DIR_MAP, SKILL_DISCOVERY_PATHS
and getLocalSkillDirs when changing the logic so the home-based
'.openclaw/workspace/skills' gets checked even without an agentFilter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/core/src/config.ts`:
- Around line 98-121: getSearchDirs and getInstallDir are out of sync for
OpenClaw globals and alternate/back-compat paths; update getInstallDir(adapter,
true) to mirror getSearchDirs' logic: resolve
AGENT_CONFIG[adapter.type]?.globalSkillsDir (handling '~/'), fall back to the
same homedir workspace path used in getSearchDirs (e.g.,
'~/.openclaw/workspace/skills' instead of '~/.openclaw/skills'), and ensure any
alternate/back-compat directories (the same altSkillsDirs/legacy 'skills' paths
you add to getSearchDirs) are included or considered when returning the global
install target so installs and searches use the same set of global locations.

---

Duplicate comments:
In `@packages/mcp/src/tools.ts`:
- Around line 188-236: The getLocalSkillDirs function only includes
'.openclaw/workspace/skills' via AGENT_DIR_MAP and adds AGENT_DIR_MAP-only paths
to the discovered dirs only when agentFilter is provided, so unfiltered calls
miss that workspace; update getLocalSkillDirs to treat AGENT_DIR_MAP entries
that are not in SKILL_DISCOVERY_PATHS as additional discovery paths for all runs
(not only when agentFilter is set) — e.g., merge unique extra agentDirs like
'.openclaw/workspace/skills' into the SKILL_DISCOVERY_PATHS loop or add a
precomputed set of additionalRoots used in the first roots loop; ensure you
reference AGENT_DIR_MAP, SKILL_DISCOVERY_PATHS and getLocalSkillDirs when
changing the logic so the home-based '.openclaw/workspace/skills' gets checked
even without an agentFilter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6cdb9d4-3497-4f30-8e67-fb21118e1aae

📥 Commits

Reviewing files that changed from the base of the PR and between 5098a6c and 7487a65.

📒 Files selected for processing (5)
  • packages/core/src/agent-config.ts
  • packages/core/src/config.ts
  • packages/core/src/context/sync.ts
  • packages/core/src/skills.ts
  • packages/mcp/src/tools.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/core/src/skills.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/src/agent-config.ts

@rohitg00 rohitg00 merged commit 1e7cad1 into main Apr 21, 2026
10 checks passed
@rohitg00 rohitg00 deleted the fix/openclaw-upstream-paths branch April 21, 2026 09:20
pull Bot pushed a commit to Stars1233/skillkit that referenced this pull request Apr 21, 2026
Includes:
- v1.24.0 across all publishable packages
- Add packages/mcp + packages/api to bump-version.sh (were drifting)
- Regenerate assets/tags/v1.24.0.svg, remove stale v1.23.0.svg
- Bump agent count references from 45 to 46 (adds Hermes)
- Update gen-tags.mjs (version + agent count)
- Sync onboarding logo test expectation

Release covers rohitg00#114 (Hermes native support) + rohitg00#117 (OpenClaw upstream paths).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant