# How to Install Agent Reach Skill Files for OpenClaw and Claude Code

> Easily install Agent Reach skill files for OpenClaw and Claude Code with a single command. Automate deployment for OpenClaw, Claude Code, or generic agent directories.

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

---

**Run `agent-reach skill --install` to automatically detect OpenClaw, Claude Code, or generic agent directories and deploy the appropriate skill documentation files.**

The Panniantong/Agent-Reach repository provides a CLI tool that automates the deployment of structured documentation—known as **skills**—to AI agent environments. When you need to install Agent Reach skill files for specific integrations like OpenClaw or Claude Code, the tool handles directory detection, locale selection, and file copying automatically. This guide explains the installation mechanics based on the actual source code implementation.

## How the Skill Installer Works

The installation process centers on the **`_install_skill()`** helper function defined in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py). When you execute the install command, the CLI performs a multi-step detection and copy operation without modifying any upstream tool source code.

### Detecting Target Skill Directories

The installer first identifies which agent environments exist on your system by checking three standard locations (lines 12-16):

- `~/.agents/skills` – Generic agents (highest priority)
- `~/.openclaw/skills` – OpenClaw CLI integration
- `~/.claude/skills` – Claude Code integration

If you have set the **`OPENCLAW_HOME`** environment variable, the installer prepends that custom path to the search list (lines 19-22).

### Selecting the Correct Locale

Before copying files, the installer checks your locale settings. It examines the environment variables **`AGENT_REACH_LANG`**, **`LC_ALL`**, **`LC_MESSAGES`**, and **`LANG`** in sequence (lines 49-62). If any value starts with `en` or `english`, the installer loads [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md); otherwise it falls back to the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md).

### Copying and Installing Files

The **`_copy_skill_dir()`** function (lines 71-107) handles the actual file operations:

1. Removes any previous installation at the target location.
2. Creates the target directory structure.
3. Writes the selected skill markdown file.
4. Copies the `references/` subdirectory containing supplemental documentation.

The main installation loop (lines 124-132) iterates through the candidate directories and installs the skill into the first existing directory it finds, printing a confirmation message like:

```text
Skill installed for OpenClaw: /home/you/.openclaw/skills/agent-reach

```

If none of the agent directories exist, the installer creates `~/.agents/skills/agent-reach` as a fallback (lines 134-140).

## Installing Skills for Specific Integrations

Use the following commands to manage skill files for your specific agent setup.

### Install for All Detected Agents

Run the default install command to deploy skills wherever Agent Reach finds existing agent directories:

```bash
agent-reach skill --install

```

### Install During Full Setup

The full installation command automatically includes the skill step:

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

```

### Targeting OpenClaw with Custom Paths

If you only use OpenClaw, the same command works—the installer automatically detects `~/.openclaw/skills` and copies the files there. To ensure OpenClaw uses a custom location, set the environment variable before running:

```bash
export OPENCLAW_HOME=/custom/path
agent-reach skill --install

```

## Removing Skill Files

To uninstall skills from all locations, run:

```bash
agent-reach skill --uninstall

```

This executes the **`_uninstall_skill()`** function (lines 444-452 in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)), which deletes the `agent-reach` folder from each known skill directory without affecting other agent configurations.

## Summary

- The **`_install_skill()`** function in [`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py) automatically detects OpenClaw, Claude Code, and generic agent directories at `~/.openclaw/skills`, `~/.claude/skills`, and `~/.agents/skills`.
- Locale detection via **`AGENT_REACH_LANG`**, **`LC_ALL`**, **`LC_MESSAGES`**, and **`LANG`** determines whether to install [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) or the default [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md).
- The installer copies files from the package's **`agent_reach/skill/`** directory, including the **`references/`** subdirectory, into the first existing agent directory or falls back to `~/.agents/skills/agent-reach`.
- Use **`agent-reach skill --install`** to deploy and **`agent-reach skill --uninstall`** to remove skills without modifying upstream tool code.

## Frequently Asked Questions

### What files does Agent Reach actually install?

Agent Reach installs markdown documentation files that teach AI agents how to invoke the tool. Specifically, it copies either [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md) (for English locales) or [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) (default) from the `agent_reach/skill/` package directory, along with any files in the `references/` subdirectory. These are documentation files, not executable code, and reside in the agent's skills directory so the AI can read them.

### Can I install skills to a custom OpenClaw directory?

Yes. While the installer automatically checks `~/.openclaw/skills`, you can override this by setting the **`OPENCLAW_HOME`** environment variable. When this variable is set, the installer uses `$OPENCLAW_HOME/skills` as the target location, inserting it at the front of the candidate directory list before running `agent-reach skill --install`.

### Why does the installer choose `~/.agents/skills` when I have multiple agents installed?

The installer iterates through the list of candidate directories and installs into the first existing directory it finds. If you have multiple agent directories (e.g., both OpenClaw and Claude Code), it installs to whichever directory appears first in its internal priority list. If you need to install to a specific directory that isn't being selected, ensure that directory exists before running the command, or temporarily remove other agent directories to force the fallback behavior.

### How do I verify the skill files were installed correctly?

After running `agent-reach skill --install`, check for the confirmation message indicating the target directory. For OpenClaw, verify that `~/.openclaw/skills/agent-reach/SKILL.md` (or [`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md)) exists. For Claude Code, check `~/.claude/skills/agent-reach/`. The installer also copies the `references/` folder, so ensure that subdirectory exists alongside the main skill file.