From 7e66abe63607eb725a3bb1b85621b27c61c01ec1 Mon Sep 17 00:00:00 2001 From: tobrainto <71546831+tobrainto@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:32:50 +0800 Subject: [PATCH] feat: Support OPENCLAW_HOME environment variable! (#194) Author: tobrainto --- agent_reach/cli.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/agent_reach/cli.py b/agent_reach/cli.py index 45d15d3..efe2975 100644 --- a/agent_reach/cli.py +++ b/agent_reach/cli.py @@ -271,12 +271,21 @@ def _install_skill(): import importlib.resources # Determine skill install path + # Priority 1: OPENCLAW_HOME environment variable (if set) + # Priority 2: ~/.openclaw/skills (default) + # Priority 3: ~/.claude/skills (Claude Code) + # Priority 4: ~/.agents/skills (Generic agents) skill_dirs = [ os.path.expanduser("~/.openclaw/skills"), # OpenClaw os.path.expanduser("~/.claude/skills"), # Claude Code (if exists) os.path.expanduser("~/.agents/skills"), # Generic agents ] + # Insert OPENCLAW_HOME path at the beginning if environment variable is set + openclaw_home = os.environ.get("OPENCLAW_HOME") + if openclaw_home: + skill_dirs.insert(0, os.path.join(openclaw_home, ".openclaw", "skills")) + installed = False for skill_dir in skill_dirs: if os.path.isdir(skill_dir):