How Agent Reach Installs Skills for OpenClaw, Claude Code, and Generic Agents
Agent Reach automatically installs its skill bundle to ~/.openclaw/skills/, ~/.claude/skills/, or ~/.agents/skills/ by detecting existing agent directories and copying the appropriate SKILL.md file along with reference documentation.
Agent Reach distributes a reusable skill package designed to integrate with multiple AI agent runtimes. Understanding the skill installation process for OpenClaw and Claude Code ensures seamless integration across different AI ecosystems without manual configuration.
How the Skill Installation Works
The core installation logic resides in agent_reach/cli.py within the private helper function _install_skill(). This function orchestrates the detection of agent runtimes and manages the file copy operations.
Runtime Detection Logic
The installer builds a prioritized search list of potential skill directories. According to lines 27-33 of the source, the function first inspects os.path.expanduser("~/.openclaw/skills") for OpenClaw installations. If the environment variable OPENCLAW_HOME is set, its corresponding .openclaw/skills path is inserted at the front of the search list, allowing custom installations to take precedence.
Next, the function checks for Claude Code via os.path.expanduser("~/.claude/skills"). If neither specialized directory exists, the installer falls back to the generic .agents location at ~/.agents/skills/agent-reach (lines 53-61).
The Installation Routine
For each detected directory, the function creates a target folder <skill_dir>/agent-reach and invokes _copy_skill_dir to populate it. The copy routine (lines 84-122) performs two critical operations:
- Locale detection: If the environment indicates an English locale (
EN*orenglish*), the installer selectsSKILL_en.md; otherwise it uses the defaultSKILL.md(lines 61-74) - Reference copying: All markdown files from
skill/references/are copied into the targetreferences/subfolder
If no existing skill directories are found, the function automatically creates the generic ~/.agents/skills/agent-reach path and performs the same copy operation.
Skill Installation Paths for Different Agents
Agent Reach supports three distinct runtime environments with specific default locations:
| Runtime | Default Skill Location | Detection Method |
|---|---|---|
| OpenClaw | ~/.openclaw/skills/agent-reach |
Primary check; respects OPENCLAW_HOME environment variable |
| Claude Code | ~/.claude/skills/agent-reach |
Secondary check after OpenClaw detection |
| Generic Agents | ~/.agents/skills/agent-reach |
Fallback when no specialized directories exist |
This hierarchy ensures that users running multiple agent ecosystems receive the skill in the appropriate location for each runtime.
Locale-Aware Skill Selection
The installer implements intelligent locale handling to serve the correct language version. When the system environment indicates an English locale, the routine prefers SKILL_en.md over the default SKILL.md (which contains Chinese content). This selection occurs during the copy operation at lines 61-74, ensuring OpenClaw and Claude Code users receive documentation in their preferred language without manual intervention.
Uninstalling the Skill
The companion helper _uninstall_skill() (lines 66-99) removes the installed skill folder from all three possible locations simultaneously. This ensures complete cleanup across OpenClaw, Claude Code, and generic agent installations when users run the uninstall command.
CLI Usage Examples
Install the skill automatically with runtime detection:
agent-reach install --env=auto
Force a fresh copy even if a skill already exists:
agent-reach install --env=auto --force
Manually install the skill for Claude Code when auto-detection fails:
mkdir -p ~/.claude/skills/agent-reach
cp -r $(python -c 'import importlib.resources, pathlib, sys; \
p = importlib.resources.files("agent_reach").joinpath("skill"); \
sys.stdout.write(str(p))')/* ~/.claude/skills/agent-reach/
Remove the skill from all runtimes:
agent-reach uninstall
Summary
- Agent Reach installs skills to
~/.openclaw/skills/,~/.claude/skills/, or~/.agents/skills/based on detected runtimes - The
_install_skill()function inagent_reach/cli.pyhandles detection, directory creation, and file copying (lines 27-122) - OpenClaw takes precedence in detection and supports custom paths via the
OPENCLAW_HOMEenvironment variable - Locale awareness automatically selects
SKILL_en.mdfor English environments versus the defaultSKILL.md - The
_uninstall_skill()helper removes skills from all three locations simultaneously (lines 66-99)
Frequently Asked Questions
How does Agent Reach decide where to install the skill?
Agent Reach checks for existing agent directories in a specific order: first OpenClaw (~/.openclaw/skills/), then Claude Code (~/.claude/skills/), and finally falls back to the generic path (~/.agents/skills/). The function uses os.path.expanduser() to resolve home directory paths and checks for the OPENCLAW_HOME environment variable to support custom OpenClaw installations.
Can I force the skill to install for a specific agent runtime?
Yes. While the default agent-reach install --env=auto automatically detects the appropriate runtime, you can manually copy the skill files to any location. Use the Python one-liner provided in the manual installation example to locate the skill package resources, then copy them to your desired agent's skills directory (e.g., ~/.claude/skills/agent-reach/).
What happens if I have both OpenClaw and Claude Code installed?
The installer detects both directories and installs the skill to each location independently. The _install_skill() function iterates through all existing skill directories in its search list, ensuring the skill is available to both OpenClaw and Claude Code simultaneously without requiring separate commands.
How do I remove the skill completely from my system?
Run agent-reach uninstall to invoke the _uninstall_skill() function, which removes the agent-reach skill folder from all three possible locations (~/.openclaw/skills/, ~/.claude/skills/, and ~/.agents/skills/). This ensures complete removal regardless of which agent runtimes were originally detected during installation.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →