How Agent-Reach Skill Installation Works for OpenClaw, Claude Code, and .agents

Agent-Reach installs its capabilities by detecting your AI agent platform and copying a localized SKILL.md file to the appropriate directory, supporting OpenClaw, Claude Code, and generic .agents frameworks in a single command.

Agent-Reach is an open-source tool that bridges AI agents with external capabilities through a standardized skill format. When you run the installation command, the CLI automatically detects whether you are running OpenClaw, Claude Code, or a generic .agents compatible framework, then deploys the correct localization of its routing instructions to the platform-specific skill directory.

Platform Detection and Locale Resolution

The installation process begins by determining two critical variables: which AI agent platforms are present on the system, and which language localization to deploy.

Target Directory Priority

Inside agent_reach/cli.py (lines 13-17), the CLI builds an ordered list of potential skill directories. The priority order is:

  1. $OPENCLAW_HOME/.openclaw/skills (if the OPENCLAW_HOME environment variable is set)
  2. ~/.openclaw/skills (OpenClaw default)
  3. ~/.claude/skills (Claude Code)
  4. ~/.agents/skills (generic .agents framework)

The installer iterates through this list and installs to the first directory that already exists on the filesystem. If none exist, it falls back to creating ~/.agents/skills/agent-reach.

Locale-Aware Skill Selection

Before copying any files, the _skill_resource_name() function (lines 53-62) checks environment variables AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG. If any value starts with "en" or "english", the CLI selects SKILL_en.md from the package resources; otherwise, it defaults to SKILL.md (Chinese).

The Installation Workflow

Once the target platform and locale are identified, the _copy_skill_dir() function (lines 71-108) handles the actual file operations.

Reading Package Resources

The _read_skill_markdown() function (lines 64-70) loads the selected markdown file from within the agent_reach/skill/ package directory using Python's importlib resources, ensuring the data is accessible regardless of how the package is installed.

Handling Existing Installations

The installer performs safe cleanup before writing new files:

  • If an existing agent-reach entry is a symlink, it is unlinked
  • If it is a regular directory, it is removed via shutil.rmtree
  • The directory is then recreated fresh

This prevents conflicts and ensures a clean installation state.

Copying Reference Documentation

After writing the main SKILL.md file, the function iterates over the references/ package subdirectory (lines 99-105) and copies all helper markdown files into the new skill folder. These reference files contain platform-specific routing tables and usage examples that the AI agent consumes at runtime.

Platform-Specific Behavior

Each supported AI agent framework expects skills in a specific location, and Agent-Reach adapts its deployment accordingly.

OpenClaw Installation

For OpenClaw, the skill is installed to ~/.openclaw/skills/agent-reach (or $OPENCLAW_HOME/.openclaw/skills/agent-reach if the environment variable is set). OpenClaw loads any SKILL.md found under ~/.openclaw/skills/*/ and uses the routing table within to dispatch user intents to Agent-Reach's backend.

Claude Code Installation

Claude Code expects skills in ~/.claude/skills/. By installing the SKILL.md and references there, Claude Code can discover and invoke agent-reach as a backend tool for internet research tasks.

Generic .agents Fallback

The lightweight .agents framework reads skills from ~/.agents/skills/. Installing here makes the capability available to any agent following the standard "skill" contract (implementing the run_skill hook), serving as the default fallback when no other platform directories are detected.

CLI Usage Examples

Installing the Skill

To install into the first available skill directory:

agent-reach skill --install

Typical output on a system with OpenClaw:


Skill installed for OpenClaw: /home/user/.openclaw/skills/agent-reach

Resulting directory structure:


~/.openclaw/
└─ skills/
   └─ agent-reach/
      ├─ SKILL.md
      └─ references/
          ├─ search.md
          └─ social.md

Forcing English Localization

Override the default locale detection to install the English skill version:

export AGENT_REACH_LANG=en_US
agent-reach skill --install

The CLI copies SKILL_en.md as SKILL.md in the target directory.

Uninstalling the Skill

Remove the skill from all detected platform directories:

agent-reach skill --uninstall

The _uninstall_skill() function (lines 44-78) checks all known locations—OpenClaw, Claude Code, and .agents—and removes the agent-reach folder or symlink from each.

Summary

  • Multi-platform detection: The CLI checks for OpenClaw, Claude Code, and .agents directories in priority order, defaulting to .agents if none exist.
  • Locale awareness: Environment variables AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG determine whether SKILL_en.md or the default SKILL.md is deployed.
  • Safe installation: The _copy_skill_dir() function handles existing symlinks and directories by unlinking or recursively removing them before writing fresh files.
  • Reference bundling: The references/ subdirectory is copied alongside the main skill file to provide AI agents with complete routing documentation.
  • Pure Python: All operations use standard library file manipulation (shutil, pathlib) without invoking external processes.

Frequently Asked Questions

What file does Agent-Reach actually install?

Agent-Reach installs a SKILL.md markdown file containing routing instructions and triggers, plus a references/ directory with helper documentation. The specific content comes from either SKILL.md (default Chinese) or SKILL_en.md (English) stored in the package's agent_reach/skill/ directory.

Can I install the skill for multiple agents at once?

Yes. The installation loop in agent_reach/cli.py (lines 24-32) iterates through all existing platform directories and installs the skill to each one. If you have both OpenClaw and Claude Code directories present, running agent-reach skill --install will deploy to both locations simultaneously.

How do I switch between English and Chinese skill versions?

Set the AGENT_REACH_LANG environment variable to an English locale code (e.g., en, en_US) before running the install command, or ensure LC_ALL or LANG starts with "en". The _skill_resource_name() function detects this and selects SKILL_en.md instead of the default file.

What happens if I run the install command multiple times?

The installer is idempotent. The _copy_skill_dir() function removes any existing agent-reach directory or symlink before creating a fresh copy, ensuring the latest skill version is deployed without leaving orphaned files or conflicting symlinks behind.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →