How Agent Reach Installs Skills for OpenClaw, Claude Code, and Generic AI Agents
Agent Reach installs its reusable skill by detecting your agent platform and copying localized skill files to platform-specific directories, supporting OpenClaw, Claude Code, and generic .agents environments through the agent-reach skill --install command.
The open-source Panniantong/Agent-Reach repository provides a unified skill installation mechanism that adapts to multiple AI agent platforms. Understanding how this cross-platform installation works reveals how the tool manages locale-aware file selection, editable-install fallbacks, and prioritized directory resolution.
Platform-Specific Skill Directories
Agent Reach maintains distinct installation targets for each supported agent ecosystem. The _install_skill() function in agent_reach/cli.py (lines 342-440) checks these locations in order of priority:
- Generic agents (
.agents):~/.agents/skills/agent-reach - OpenClaw:
~/.openclaw/skills/agent-reach(or${OPENCLAW_HOME}/.openclaw/skills/agent-reachif the environment variable is set) - Claude Code:
~/.claude/skills/agent-reach
If OPENCLAW_HOME is defined, its path is inserted at the front of the candidate list, ensuring the OpenClaw installation takes precedence over the default location (lines 12-22).
The Installation Pipeline
The core installation logic follows a deterministic pipeline that handles localization, resource extraction, and directory copying.
Step 1: Locale-Aware File Selection
Before copying any files, the installer inspects environment variables to determine which skill description to deploy. It checks AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG (lines 53-62). If any indicate an English locale, the function selects SKILL_en.md; otherwise it falls back to SKILL.md.
Step 2: Resource Loading with Editable Fallback
The function attempts to load skill resources using importlib.resources.files("agent_reach").joinpath("skill"). For development environments where the package is installed in editable mode, it falls back to Path(__file__).resolve().parent / "skill" (lines 84-90). This ensures the installer works whether you installed from PyPI or cloned the repository directly.
Step 3: Target Directory Resolution
The installer builds a prioritized list of candidate skill roots and iterates over them. For each existing directory, it invokes _copy_skill_dir(target) (lines 28-31), which creates or clears the destination folder, writes the selected SKILL.md, and copies all reference files from skill/references/.
Step 4: Fallback Creation
If none of the known skill roots exist, the function creates the generic-agent path at ~/.agents/skills/agent-reach and attempts the copy there (lines 34-38). This ensures the skill is always installed somewhere, even on fresh systems.
Installing and Uninstalling Skills
Use the CLI commands to manage skill installation across all detected platforms:
# Install the skill for whichever platform you have configured:
agent-reach skill --install
# Output indicates which platform received the skill files.
# Force installation for the generic .agents platform on a fresh system:
mkdir -p ~/.agents/skills
agent-reach skill --install
# Creates ~/.agents/skills/agent-reach/SKILL.md and copies all reference files.
# Remove the skill from all platforms:
agent-reach skill --uninstall
The uninstallation logic lives in _uninstall_skill() (lines 444-476) and removes the entire agent-reach folder from each known skill root.
Summary
- Agent Reach supports three agent platforms through a single installation command, deploying to
~/.agents,~/.openclaw, or~/.claudedirectories. - The
_install_skill()function inagent_reach/cli.pyhandles locale detection (prioritizingSKILL_en.mdfor English environments) and resource loading with editable-install fallbacks. - Installation prioritizes existing platform directories but falls back to creating the generic
.agentspath if no recognized environments exist. - The
_copy_skill_dir()helper manages atomic directory creation and copies both the skill markdown and reference files fromskill/references/. - Uninstallation removes the skill from all detected platform directories simultaneously.
Frequently Asked Questions
What file paths does Agent Reach use for skill installation?
Agent Reach installs to ~/.agents/skills/agent-reach for generic agents, ~/.openclaw/skills/agent-reach (or ${OPENCLAW_HOME}/.openclaw/skills/agent-reach) for OpenClaw, and ~/.claude/skills/agent-reach for Claude Code. These paths are defined in agent_reach/cli.py and checked in order of priority during installation.
How does Agent Reach handle different languages during installation?
The installer checks environment variables AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG to detect English locales. If English is detected, it deploys SKILL_en.md; otherwise it uses SKILL.md. This logic appears in lines 53-62 of agent_reach/cli.py.
Can I force installation to a specific agent platform?
Yes. By creating the target directory before running the install command, you can force installation to a specific platform. For example, running mkdir -p ~/.agents/skills before agent-reach skill --install ensures the skill deploys to the generic agents directory even if OpenClaw or Claude Code directories exist.
How do I completely remove the Agent Reach skill?
Run agent-reach skill --uninstall to remove the skill from all detected platforms. The _uninstall_skill() function (lines 444-476) deletes the agent-reach directory from every known skill root, including generic agents, OpenClaw, and Claude Code locations.
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 →