How Skill Installation Works for OpenClaw, Claude Code, and Generic Agents in Agent Reach

Agent Reach installs its reusable skill by detecting your agent platform and copying localized SKILL.md files and reference resources to the appropriate directory, supporting OpenClaw, Claude Code, and generic .agents environments through a single command.

The Panniantong/Agent-Reach repository provides a unified CLI mechanism for deploying capabilities across multiple AI agent platforms. Understanding how skill installation functions ensures you can correctly register the tool with your specific environment, whether you are running OpenClaw, Claude Code, or a generic agent system.

Platform-Specific Installation Paths

Agent Reach targets three distinct directory structures based on which agent platform is detected:

Platform Expected Skill Directory
Generic agents (.agents) ~/.agents/skills/agent-reach
OpenClaw ~/.openclaw/skills/agent-reach (or ${OPENCLAW_HOME}/.openclaw/skills/agent-reach if OPENCLAW_HOME is set)
Claude Code ~/.claude/skills/agent-reach

The Installation Pipeline

The private helper _install_skill() in agent_reach/cli.py (lines 342-440) orchestrates a seven-step pipeline when you execute agent-reach skill --install.

Step 1: Locale-Aware File Selection

The function first inspects environment variables including AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG at lines 53-62. If any of these indicate an English locale, the installer selects SKILL_en.md; otherwise it falls back to the default SKILL.md.

Step 2: Resource Loading with Editable Fallback

The system attempts to load skill resources via importlib.resources.files("agent_reach").joinpath("skill"). For packages installed in editable mode, it falls back to Path(__file__).resolve().parent / "skill" as implemented at lines 84-90.

Step 3: Skill Directory Deployment

The _copy_skill_dir(target) helper creates (or clears) the destination folder, writes the selected markdown file, and copies all reference files from skill/references/ (lines 71-99). This includes supporting documentation for web, video, social, search, dev, and career contexts.

Step 4-6: Platform Detection and Targeted Installation

The installer builds a prioritized candidate list (generic agents → OpenClaw → Claude Code). If OPENCLAW_HOME is defined, its path is inserted at the front to override the default ~/.openclaw location (lines 12-22). The function iterates over existing candidate directories (lines 28-31), invoking _copy_skill_dir for each match. If none of the known skill roots exist, it creates the generic-agent path at ~/.agents/skills/agent-reach as a fallback (lines 34-38).

Uninstalling the Skill

The matching removal logic resides in _uninstall_skill() at lines 444-476. This function removes the entire agent-reach directory from each known skill root, ensuring complete cleanup across all platforms where it was previously deployed.

Practical Usage 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

# Creates ~/.agents/skills/agent-reach/SKILL.md and copies reference files

Remove the skill from all platforms:

agent-reach skill --uninstall

Summary

  • Multi-platform support: Agent Reach automatically detects OpenClaw, Claude Code, and generic .agents directories using environment-aware path resolution.
  • Locale detection: The installer selects between SKILL_en.md and SKILL.md based on system language settings (AGENT_REACH_LANG, LC_ALL, LANG).
  • Editable install compatibility: Falls back to filesystem paths when importlib.resources is unavailable in development setups.
  • Atomic operations: The _copy_skill_dir function clears existing installations before copying new resources to ensure consistency.
  • Simple CLI interface: Single commands handle both installation and uninstallation across all target platforms.

Frequently Asked Questions

What files does Agent Reach actually install?

The installer copies a localized SKILL.md (or SKILL_en.md for English locales) plus the entire contents of the skill/references/ directory, which contains supporting markdown files for web search, video, social media, development, and career contexts.

How does Agent Reach choose between OpenClaw and Claude Code when both are present?

The system prioritizes candidates in the order: generic agents, then OpenClaw, then Claude Code. However, if OPENCLAW_HOME is defined, that path takes precedence over the default ~/.openclaw location. The skill is installed to the first existing directory in this prioritized list.

Can I force installation to a specific platform only?

Agent Reach does not currently support platform-specific flags. To force installation to a specific target, ensure only that platform's skill directory exists (e.g., create ~/.agents/skills while removing or renaming ~/.openclaw and ~/.claude temporarily).

What happens if I run the install command multiple times?

The _copy_skill_dir() function clears the destination folder before copying new files, so repeated installations effectively refresh the skill to the latest version. This ensures SKILL.md and reference files are always synchronized with the current package state.

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 →