How Agent Reach Handles Skill Installation for Different Agent Platforms

Agent Reach automatically installs its OpenAI-compatible skill into platform-specific directories—supporting OpenClaw, Claude Code, and generic .agents tools—by detecting the first existing skill root and copying locale-aware markdown files.

Agent Reach is an open-source framework that distributes an OpenAI-compatible skill (defined in SKILL.md) designed to integrate with multiple AI agent ecosystems. According to the Panniantong/Agent-Reach source code, the installation process is handled by the _install_skill() helper in [agent_reach/cli.py](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L55), which is invoked via the command agent-reach skill --install. This mechanism ensures seamless registration across different agent platforms without manual file manipulation.

The Installation Workflow

The skill installation process follows a deterministic six-step pipeline that prioritizes user locale and existing platform configurations.

Locale Detection and Skill Selection

Before copying files, Agent Reach determines which language variant of the skill to install. The internal _skill_resource_name function checks environment variables in the following order: AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG. If any indicate an English locale, the installer selects SKILL_en.md; otherwise, it defaults to the generic SKILL.md (which contains Chinese content).

Reading Skill Resources

Once the locale is determined, the _read_skill_markdown function uses importlib.resources to read the selected markdown file from the package’s internal agent_reach/skill/ directory. If the locale-specific file is missing, the function gracefully falls back to the default SKILL.md to ensure installation never fails due to missing translations.

Platform-Specific Directory Discovery

Agent Reach supports three distinct agent platforms by searching for their respective skill root directories in a specific priority order. The skill_dirs construction in [cli.py (lines 27-33)](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L27-L33) defines the following precedence:

  1. ~/.agents/skills – Generic agent platforms (e.g., runnable-agents or custom OpenAI-compatible implementations)
  2. ~/.openclaw/skills – OpenClaw agent framework
  3. ~/.claude/skills – Claude Code by Anthropic

If the environment variable OPENCLAW_HOME is defined, its .openclaw/skills subdirectory is prepended to this list, granting it the highest installation priority. This allows users with non-standard OpenClaw installations to override the default path.

Copying Files to Target Locations

The _copy_skill_dir function handles the actual file system operations. For the first existing directory in the skill_dirs list, it performs the following actions:

  • Creates a subdirectory named agent-reach
  • Copies the selected SKILL.md (locale-specific content) into the new directory
  • Recursively copies the entire references/ subdirectory containing auxiliary markdown files

The copy operation includes safety checks for symlinks (common in dotfile setups) by unlinking them before removal, and preserves existing SKILL.md files when force=False (though the default CLI behavior uses force=True).

Fallback Installation Strategy

If none of the three standard skill directories exist on the system, the installer guarantees delivery by creating a fallback location. The code block at [cli.py lines 52-62](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L52-L62) checks the installed flag, and if no installation occurred, creates ~/.agents/skills/agent-reach as a guaranteed write location. After each successful copy, the CLI prints a confirmation message indicating the target platform and full path; if the copy fails, a warning is emitted to stderr.

Supported Agent Platforms

The following table maps each supported agent ecosystem to its expected skill directory:

Priority Directory Agent Platform
1 (or 0 if overridden) $OPENCLAW_HOME/.openclaw/skills or ~/.openclaw/skills OpenClaw
2 ~/.claude/skills Claude Code
3 ~/.agents/skills Generic .agents tools

This multi-root approach enables Agent Reach to function as a universal skill provider across diverse AI agent architectures without requiring platform-specific packaging.

Uninstalling Skills

The _uninstall_skill() function (also defined in cli.py) traverses the same three root locations (including any OPENCLAW_HOME override) and recursively deletes the agent-reach directory from each. Like the installation process, it safely handles symlinks to prevent accidental deletion of linked dotfile configurations.

Practical Installation Examples

Install the skill for your current agent platform:


# Trigger the installation process

agent-reach skill --install

Under the hood, this executes the full workflow—detecting locale, selecting the appropriate skill file, and copying to the first available platform directory. If OpenClaw is installed, you will see:


# Expected output indicating successful installation

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

Verify the installed files:

ls ~/.openclaw/skills/agent-reach

# Output:

# SKILL.md  references/

Remove the skill from all platforms:

agent-reach skill --uninstall

# This cleans up the agent-reach directory from OpenClaw, Claude Code, and generic locations

Summary

  • Agent Reach uses _install_skill() in agent_reach/cli.py to automate skill registration across multiple AI platforms.
  • The installer checks environment variables (AGENT_REACH_LANG, LC_ALL, LANG) to select between SKILL_en.md and SKILL.md.
  • Three standard directories are supported in priority order: OpenClaw (~/.openclaw/skills), Claude Code (~/.claude/skills), and generic agents (~/.agents/skills), with OPENCLAW_HOME allowing custom path overrides.
  • The _copy_skill_dir function handles safe file copying, including symlink resolution and reference file propagation.
  • A fallback mechanism creates ~/.agents/skills/agent-reach if no recognized platform directories exist.
  • _uninstall_skill() provides complete cleanup across all configured locations.

Frequently Asked Questions

Which agent platforms does Agent Reach support for skill installation?

Agent Reach officially supports OpenClaw, Claude Code, and generic .agents-compatible tools. The installer searches for skill directories in ~/.openclaw/skills, ~/.claude/skills, and ~/.agents/skills respectively, installing to the first existing location it finds.

How does Agent Reach handle non-standard OpenClaw installations?

If you define the OPENCLAW_HOME environment variable, the installer prepends $OPENCLAW_HOME/.openclaw/skills to the search path with highest priority. This allows the skill to be installed into custom OpenClaw prefixes without modifying the underlying source code in agent_reach/cli.py.

What happens if my system has multiple agent platforms installed?

The installer selects the first existing directory from its prioritized list: OpenClaw (respecting OPENCLAW_HOME), Claude Code, then generic .agents. If you have multiple platforms, it will install to the highest-priority location found, typically OpenClaw if present.

Does the skill installation support localized content?

Yes. The _skill_resource_name function detects English locales via standard environment variables and selects SKILL_en.md instead of the default SKILL.md. This ensures the installed skill content matches the user's language preference where available.

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 →