# How Agent Reach Installs Skills for OpenClaw, Claude Code, and Generic AI Agents

> Learn how Agent Reach seamlessly installs skills for OpenClaw, Claude Code, and generic AI agents. Discover the simple `agent-reach skill --install` command for efficient setup.

- Repository: [Pnant/Agent-Reach](https://github.com/Panniantong/Agent-Reach)
- Tags: how-to-guide
- Published: 2026-07-01

---

**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`](https://github.com/Panniantong/Agent-Reach/blob/main/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-reach` if 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`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md); otherwise it falls back to [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/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`](https://github.com/Panniantong/Agent-Reach/blob/main/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:

```bash

# Install the skill for whichever platform you have configured:

agent-reach skill --install

# Output indicates which platform received the skill files.

```

```bash

# 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.

```

```bash

# 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 `~/.claude` directories.
- The `_install_skill()` function in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) handles locale detection (prioritizing [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) for English environments) and resource loading with editable-install fallbacks.
- Installation prioritizes existing platform directories but falls back to creating the generic `.agents` path if no recognized environments exist.
- The `_copy_skill_dir()` helper manages atomic directory creation and copies both the skill markdown and reference files from `skill/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`](https://github.com/Panniantong/Agent-Reach/blob/main/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`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md); otherwise it uses [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md). This logic appears in lines 53-62 of [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/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.