openclaw - ✅(Solved) Fix [Feature]: Support global skill installation target [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#74124Fetched 2026-04-30 06:28:12
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
cross-referenced ×3referenced ×3commented ×1

Add a way for openclaw skills install to install skills into the global skills directory, e.g. ~/.openclaw/skills / ~/.agents/skills, instead of only installing into an agent workspace such as ~/.openclaw/workspace-<agent>/skills.

Error Message

  • Manually moving the skill after install. This works but is error-prone and easy to forget.

Root Cause

When the install lands in a workspace-scoped directory, users may need to manually move the installed skill afterward. This is confusing because some skills are meant to be shared globally across agents, not scoped to the current/default agent workspace.

Fix Action

Fixed

PR fix notes

PR #74466: feat(cli): support installing skills to shared global directory via --global

Description (problem / solution / changelog)

Summary

  • Problem: openclaw skills install only targets workspace directories, requiring manual file movement for shared skills
  • Why it matters: Multi-agent setups need skills shared globally across agents
  • What changed: Added --global flag to install and update commands, targeting ~/.openclaw/skills
  • What did NOT change: Default behavior unchanged; workspace resolution logic untouched; ClawHub installer unchanged

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #74124
  • Related #56161
  • This PR fixes a bug or regression

Root Cause (if applicable)

N/A (feature request)

Regression Test Plan (if applicable)

  • Coverage level:
    • Unit test
  • Target test file: src/cli/skills-cli.commands.test.ts
  • Scenarios locked in:
    • --global installs to CONFIG_DIR
    • --global and --agent mutually exclusive
    • --global works for both install and update
  • 6 new unit tests added

User-visible / Behavior Changes

  • New --global flag for openclaw skills install and openclaw skills update
  • --global installs/updates skills in ~/.openclaw/skills instead of workspace

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: macOS 24.6.0
  • Runtime/container: Node.js v25.6.1
  • Model/provider: N/A
  • Integration/channel: CLI

Steps

  1. node openclaw.mjs skills install test-test --global
  2. Check ~/.openclaw/skills/test-test exists
  3. node openclaw.mjs skills update test-test --global
  4. Verify update checks the global directory

Expected

  • Skill installed/updated in shared directory ~/.openclaw/skills/

Actual

  • Works as expected

Evidence

  • Failing test/log before + passing after

Unit tests:

pnpm test src/cli/skills-cli.commands.test.ts
# 27 tests passed (6 new)

Manual E2E (install --global):

$ node openclaw.mjs skills install test-test --global
Downloading [email protected] from ClawHub…
Installing to /Users/hongweima/.openclaw/skills/test-test…
Installed [email protected] -> /Users/hongweima/.openclaw/skills/test-test

Manual E2E (update --global):

$ node openclaw.mjs skills update test-test --global
Downloading [email protected] from ClawHub…
Installing to /Users/hongweima/.openclaw/skills/test-test…
test-test already at 1.0.16

Human Verification (required)

  • Verified scenarios: Unit tests pass (27/27), manual E2E with real ClawHub install and update
  • Edge cases checked: --global + --agent conflict, parent --agent with child --global
  • What you did NOT verify: N/A (all scenarios verified)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Global installs may override workspace-specific versions
    • Mitigation: Workspace skills have higher precedence in skill loader (documented behavior)

Changed files

  • docs/cli/skills.md (modified, +13/-7)
  • docs/help/faq.md (modified, +7/-4)
  • docs/tools/clawhub.md (modified, +6/-2)
  • docs/tools/skills.md (modified, +14/-10)
  • src/cli/skills-cli.commands.test.ts (modified, +115/-0)
  • src/cli/skills-cli.ts (modified, +31/-10)

Code Example

openclaw skills install <skill-name>

---

~/.openclaw/workspace-<agent>/skills

---

~/.openclaw/skills

---

openclaw skills install <skill-name> --global

---

openclaw skills install <skill-name> --target global

---

openclaw skills install <skill-name>

---

~/.openclaw/workspace-<agent>/skills

---

~/.openclaw/skills
RAW_BUFFERClick to expand / collapse

Summary

Add a way for openclaw skills install to install skills into the global skills directory, e.g. ~/.openclaw/skills / ~/.agents/skills, instead of only installing into an agent workspace such as ~/.openclaw/workspace-<agent>/skills.

Problem to solve

Running:

openclaw skills install <skill-name>

can install the skill under an agent-scoped workspace path, for example:

~/.openclaw/workspace-<agent>/skills

But in multi-agent setups, some skills are intended to be shared globally from:

~/.openclaw/skills

When the install lands in a workspace-scoped directory, users may need to manually move the installed skill afterward. This is confusing because some skills are meant to be shared globally across agents, not scoped to the current/default agent workspace.

Related but not the same as:

  • #56161, which covers skills install installing into the default agent workspace while ignoring the current agent/workspace context.
  • #43735, which covers skill loading/surfacing from workspace skill paths.

The missing capability here is specifically: install a skill to the global/shared skill directory on purpose.

Proposed solution

Add an explicit global install target, for example:

openclaw skills install <skill-name> --global

or:

openclaw skills install <skill-name> --target global

Expected behavior:

  • --global installs into the configured global/shared skills directory.
  • Existing behavior remains unchanged when no flag is provided.
  • The CLI prints the resolved install path before/after install, so users can see whether the install was workspace-scoped or global.

It may also be useful to support a config default, for example a skills.install.defaultTarget setting, but an explicit CLI flag would already solve the immediate problem.

Alternatives considered

  • Manually moving the skill after install. This works but is error-prone and easy to forget.
  • Relying on the current workspace/default agent inference. That does not cover shared skills intended for all agents.
  • Reusing the behavior from #56161. That issue is adjacent, but it still concerns workspace selection. It does not provide an intentional global install path.

Impact

Affected users/systems:

  • Multi-agent OpenClaw installations.
  • Setups where skills are shared through a global skills directory.
  • Operators installing skills from one agent workspace but intending them to be available across agents.

Severity: medium. It does not crash the gateway, but it creates confusing install state and manual cleanup.

Frequency: every time a globally shared skill is installed through openclaw skills install.

Consequence: skills land in the wrong scope, then need manual file movement or symlink cleanup before other agents can use them reliably.

Evidence/examples

Example command:

openclaw skills install <skill-name>

Observed class of install location:

~/.openclaw/workspace-<agent>/skills

Desired global/shared location:

~/.openclaw/skills

Additional information

This request is intentionally backward-compatible: keep the current workspace-scoped default if desired, but expose an explicit global install option for shared skills.

extent analysis

TL;DR

To address the issue, add an explicit global install target to the openclaw skills install command, such as --global or --target global, to install skills into the global skills directory.

Guidance

  • Introduce a new flag, --global or --target global, to the openclaw skills install command to specify installation into the global skills directory.
  • Update the command's behavior to print the resolved install path before and after installation, ensuring users can verify whether the skill was installed globally or workspace-scoped.
  • Consider adding a configuration default, such as skills.install.defaultTarget, to simplify global installations, but prioritize the explicit CLI flag as the immediate solution.
  • Test the new flag with various skill installations to ensure it correctly targets the global skills directory and does not interfere with existing workspace-scoped installations.

Example

openclaw skills install <skill-name> --global

This command should install the specified skill into the global skills directory, such as ~/.openclaw/skills, rather than a workspace-scoped directory.

Notes

The proposed solution aims to provide an intentional global install path without altering the existing default behavior, ensuring backward compatibility. However, the implementation details and potential interactions with other OpenClaw features, such as those mentioned in related issues (#56161 and #43735), should be carefully considered to avoid unintended consequences.

Recommendation

Apply the workaround by introducing the --global flag to the openclaw skills install command, as it directly addresses the issue of installing skills into the global skills directory, providing a clear and explicit solution for users.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Feature]: Support global skill installation target [1 pull requests, 1 comments, 2 participants]