Install Global Skill From ClawHub
Install or update one ClawHub skill with the official CLI, then promote the staged copy into the global skill directory.
Rules
- Treat
/skills/ as the final destination. - Treat
/workspaces//skills/ as a temporary staging location used by the CLI. - Resolve
from --openclaw-home, then OPENCLAW_HOME, else $HOME/.openclaw. - Resolve
from --agent, then OPENCLAW_AGENT, else lan. - Derive the workspace as
/workspaces/. - Prefer
scripts/install-global-skill.js over manual file operations. - Try
openclaw skills update first; if the skill is not tracked, use openclaw skills install --force. - Backup an existing global skill before replacement unless the user explicitly says otherwise.
- Promote through a temporary directory, then rename into place.
- Remove the staged copy after promotion unless the user wants to keep it.
- For destructive actions such as deleting an existing global skill or staging copy, ask for confirmation unless the user already asked for replacement or upgrade.
- Do not modify or create Agents. This skill only manages skill files.
- Keep the workflow focused on one slug at a time unless the user explicitly asks for a batch.
Workflow
- Confirm the target skill slug.
- Prefer running
node scripts/install-global-skill.js --slug . - Verify the staged origin file at
/workspaces//skills//.clawhub/origin.json. - Backup the current global directory when it exists.
- Promote the staged copy into
/skills/. - Verify the global origin file and installed version after promotion.
- Report the result.
Verification
/skills//SKILL.md exists/skills//.clawhub/origin.json existsinstalledVersion in the global copy matches the staged copy
Delivery
- target slug
- final global path
- installed version
- whether update or install was used
- backup path if one was created
- whether the staging copy was removed
- any blocker, such as CLI failure or missing ClawHub package