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

> Learn how Agent Reach effortlessly installs skills for OpenClaw, Claude Code, and generic agents. Discover automatic skill bundle installation to agent directories.

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

---

**Agent Reach automatically installs its skill bundle to `~/.openclaw/skills/`, `~/.claude/skills/`, or `~/.agents/skills/` by detecting existing agent directories and copying the appropriate [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) file along with reference documentation.**

Agent Reach distributes a reusable skill package designed to integrate with multiple AI agent runtimes. Understanding the skill installation process for OpenClaw and Claude Code ensures seamless integration across different AI ecosystems without manual configuration.

## How the Skill Installation Works

The core installation logic resides in **[`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)** within the private helper function `_install_skill()`. This function orchestrates the detection of agent runtimes and manages the file copy operations.

### Runtime Detection Logic

The installer builds a prioritized search list of potential skill directories. According to lines 27-33 of the source, the function first inspects `os.path.expanduser("~/.openclaw/skills")` for **OpenClaw** installations. If the environment variable `OPENCLAW_HOME` is set, its corresponding `.openclaw/skills` path is inserted at the front of the search list, allowing custom installations to take precedence.

Next, the function checks for **Claude Code** via `os.path.expanduser("~/.claude/skills")`. If neither specialized directory exists, the installer falls back to the generic **`.agents`** location at `~/.agents/skills/agent-reach` (lines 53-61).

### The Installation Routine

For each detected directory, the function creates a target folder `<skill_dir>/agent-reach` and invokes `_copy_skill_dir` to populate it. The copy routine (lines 84-122) performs two critical operations:

- **Locale detection**: If the environment indicates an English locale (`EN*` or `english*`), the installer selects [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md); otherwise it uses the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) (lines 61-74)
- **Reference copying**: All markdown files from `skill/references/` are copied into the target `references/` subfolder

If no existing skill directories are found, the function automatically creates the generic `~/.agents/skills/agent-reach` path and performs the same copy operation.

## Skill Installation Paths for Different Agents

Agent Reach supports three distinct runtime environments with specific default locations:

| Runtime | Default Skill Location | Detection Method |
|---------|----------------------|------------------|
| **OpenClaw** | `~/.openclaw/skills/agent-reach` | Primary check; respects `OPENCLAW_HOME` environment variable |
| **Claude Code** | `~/.claude/skills/agent-reach` | Secondary check after OpenClaw detection |
| **Generic Agents** | `~/.agents/skills/agent-reach` | Fallback when no specialized directories exist |

This hierarchy ensures that users running multiple agent ecosystems receive the skill in the appropriate location for each runtime.

## Locale-Aware Skill Selection

The installer implements intelligent locale handling to serve the correct language version. When the system environment indicates an English locale, the routine prefers [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) over the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) (which contains Chinese content). This selection occurs during the copy operation at lines 61-74, ensuring OpenClaw and Claude Code users receive documentation in their preferred language without manual intervention.

## Uninstalling the Skill

The companion helper `_uninstall_skill()` (lines 66-99) removes the installed skill folder from all three possible locations simultaneously. This ensures complete cleanup across OpenClaw, Claude Code, and generic agent installations when users run the uninstall command.

## CLI Usage Examples

Install the skill automatically with runtime detection:

```bash
agent-reach install --env=auto

```

Force a fresh copy even if a skill already exists:

```bash
agent-reach install --env=auto --force

```

Manually install the skill for Claude Code when auto-detection fails:

```bash
mkdir -p ~/.claude/skills/agent-reach
cp -r $(python -c 'import importlib.resources, pathlib, sys; \
    p = importlib.resources.files("agent_reach").joinpath("skill"); \
    sys.stdout.write(str(p))')/* ~/.claude/skills/agent-reach/

```

Remove the skill from all runtimes:

```bash
agent-reach uninstall

```

## Summary

- **Agent Reach** installs skills to `~/.openclaw/skills/`, `~/.claude/skills/`, or `~/.agents/skills/` based on detected runtimes
- The **`_install_skill()`** function in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) handles detection, directory creation, and file copying (lines 27-122)
- **OpenClaw** takes precedence in detection and supports custom paths via the `OPENCLAW_HOME` environment variable
- **Locale awareness** automatically selects [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) for English environments versus the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md)
- The **`_uninstall_skill()`** helper removes skills from all three locations simultaneously (lines 66-99)

## Frequently Asked Questions

### How does Agent Reach decide where to install the skill?

Agent Reach checks for existing agent directories in a specific order: first OpenClaw (`~/.openclaw/skills/`), then Claude Code (`~/.claude/skills/`), and finally falls back to the generic path (`~/.agents/skills/`). The function uses `os.path.expanduser()` to resolve home directory paths and checks for the `OPENCLAW_HOME` environment variable to support custom OpenClaw installations.

### Can I force the skill to install for a specific agent runtime?

Yes. While the default `agent-reach install --env=auto` automatically detects the appropriate runtime, you can manually copy the skill files to any location. Use the Python one-liner provided in the manual installation example to locate the skill package resources, then copy them to your desired agent's skills directory (e.g., `~/.claude/skills/agent-reach/`).

### What happens if I have both OpenClaw and Claude Code installed?

The installer detects both directories and installs the skill to each location independently. The `_install_skill()` function iterates through all existing skill directories in its search list, ensuring the skill is available to both OpenClaw and Claude Code simultaneously without requiring separate commands.

### How do I remove the skill completely from my system?

Run `agent-reach uninstall` to invoke the `_uninstall_skill()` function, which removes the `agent-reach` skill folder from all three possible locations (`~/.openclaw/skills/`, `~/.claude/skills/`, and `~/.agents/skills/`). This ensures complete removal regardless of which agent runtimes were originally detected during installation.