Agent-Reach Skill Installation Process for OpenClaw, Claude Code, and Generic Agents
Agent-Reach installs its reusable skill by detecting your platform environment and copying localized SKILL files with reference documentation to the appropriate directory among OpenClaw, Claude Code, or generic agent configurations.
Agent-Reach provides a unified skill installation mechanism that supports multiple agent platforms through a single CLI command. The skill installation process adapts automatically to OpenClaw, Claude Code, and generic .agents environments by detecting existing configuration directories, selecting locale-specific resources, and handling both packaged and editable installations.
Platform-Specific Installation Paths
Agent-Reach targets three distinct agent ecosystems, each with its own expected skill directory structure.
OpenClaw Configuration
For OpenClaw, the installer checks for the environment variable OPENCLAW_HOME. If set, the skill installs to ${OPENCLAW_HOME}/.openclaw/skills/agent-reach. Otherwise, it defaults to ~/.openclaw/skills/agent-reach. This logic is implemented in the candidate path construction within agent_reach/cli.py (lines 12-22).
Claude Code Configuration
Claude Code uses a fixed location at ~/.claude/skills/agent-reach. The installer treats this as a standard candidate directory without additional environment variable overrides.
Generic Agents Configuration
For generic agents compatible with the .agents directory convention, the installer targets ~/.agents/skills/agent-reach. This serves as the ultimate fallback when no specific platform directories exist.
The Installation Workflow in agent_reach/cli.py
The core installation logic resides in the private helper _install_skill() (lines 342-440 of agent_reach/cli.py). When you execute agent-reach skill --install, the function executes a seven-step workflow:
- Locale detection – Inspects
AGENT_REACH_LANG,LC_ALL,LC_MESSAGES, andLANGto determine whether to useSKILL_en.mdor the defaultSKILL.md(lines 53-62). - Resource loading – Attempts to load skill files via
importlib.resources.files("agent_reach").joinpath("skill"), with a fallback toPath(__file__).resolve().parent / "skill"for editable installations (lines 84-90). - Directory copying – Invokes
_copy_skill_dir(target)to create or clear the destination folder, write the selected markdown file, and copy reference files fromskill/references/(lines 71-99). - Candidate enumeration – Builds a prioritized list of skill roots: generic agents, OpenClaw, then Claude Code.
- Platform insertion – If
OPENCLAW_HOMEis defined, prepends that specific path to the candidate list so OpenClaw installation takes precedence (lines 12-22). - Iteration and installation – Iterates through existing candidate directories, installing the skill to each valid location found and emitting console messages indicating successful platform detection (lines 28-31).
- Fallback creation – If no candidate directories exist, creates the generic agent path at
~/.agents/skills/agent-reachand performs the installation there (lines 34-38).
Localization and File Selection
The installer handles internationalization through environment variable inspection. The selection algorithm (lines 53-62) checks for English locale indicators in the following order:
AGENT_REACH_LANGLC_ALLLC_MESSAGESLANG
If any of these indicate an English locale, the installer copies SKILL_en.md. Otherwise, it falls back to the default SKILL.md. This ensures the skill description matches the user's language preference without requiring explicit command-line flags.
Resource Loading for Development vs Production
The installer accommodates both production package installations and editable development modes. When the package is installed normally, it uses importlib.resources.files() to access bundled skill files. For editable installations (common during development), it falls back to resolving files relative to the cli.py location using Path(__file__).resolve().parent / "skill" (lines 84-90). This dual-path approach ensures the skill files are locatable regardless of installation method.
Skill Uninstallation Process
The removal logic is implemented in _uninstall_skill() (lines 444-476). This function iterates through the same platform directories—OpenClaw, Claude Code, and generic agents—and recursively deletes the agent-reach folder from each location. Running agent-reach skill --uninstall completely removes the skill from all detected platforms without leaving orphaned reference files.
Installation Commands and Examples
Install the skill for whichever platform you have configured:
agent-reach skill --install
Force installation for the generic .agents platform on a fresh system:
mkdir -p ~/.agents/skills
agent-reach skill --install
Remove the skill from all platforms:
agent-reach skill --uninstall
Summary
- Agent-Reach supports OpenClaw, Claude Code, and generic agents through a unified installation command that detects platform-specific directories.
- The installer prioritizes
OPENCLAW_HOMEwhen set, then checks for existing directories in the order: generic agents, OpenClaw, Claude Code. - Localization is handled automatically via
AGENT_REACH_LANG,LC_ALL,LC_MESSAGES, andLANGenvironment variables, selecting betweenSKILL_en.mdandSKILL.md. - The
_install_skill()function inagent_reach/cli.py(lines 342-440) handles resource loading, locale selection, and directory copying, with fallback support for editable installations. - Uninstallation via
_uninstall_skill()(lines 444-476) removes the skill from all detected platform directories simultaneously.
Frequently Asked Questions
How does Agent-Reach choose between SKILL.md and SKILL_en.md?
The installer inspects locale-related environment variables in the following priority: AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG. If any of these indicate an English locale, the function copies SKILL_en.md to the target directory. Otherwise, it installs the default SKILL.md. This logic is implemented in agent_reach/cli.py (lines 53-62).
What happens if no agent platform is detected?
If none of the candidate directories (OpenClaw, Claude Code, or generic agents) exist, the installer creates the generic agent path at ~/.agents/skills/agent-reach and installs the skill there. This ensures the installation succeeds even on systems without prior agent configuration (lines 34-38).
How do I uninstall the Agent-Reach skill?
Run the command agent-reach skill --uninstall. This invokes _uninstall_skill() (lines 444-476), which removes the agent-reach directory from all detected platform locations, including OpenClaw, Claude Code, and generic agent skill roots.
Can I force installation to a specific platform?
Yes, by ensuring only your target platform's directory exists before running the install command. The installer iterates through candidates and installs to all existing directories. To force generic agents only, create ~/.agents/skills and ensure ~/.openclaw and ~/.claude do not exist. To prioritize OpenClaw, set the OPENCLAW_HOME environment variable, which will be checked first during candidate enumeration (lines 12-22).
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 →