# How the Agent Reach Skill Command Integrates with OpenClaw and AI Agent Frameworks

> Learn how the agent reach skill command integrates with OpenClaw and AI agent frameworks. Deploy locale-aware SKILL.md bundles to easily extend your agent capabilities.

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

---

**The `agent-reach skill` command bridges Agent Reach with external AI agent frameworks by deploying a locale-aware SKILL.md bundle into framework-specific directories like `~/.openclaw/skills`, enabling OpenClaw to discover and load Agent Reach capabilities as a first-class skill.**

The Agent Reach CLI provides a dedicated `skill` sub-command that seamlessly integrates the library with modern AI agent frameworks including OpenClaw. When developers run `agent-reach skill --install`, the command registers Agent Reach as a discoverable skill that LLM agents can leverage for enhanced automation capabilities.

## Core Implementation in agent_reach/cli.py

The skill integration logic resides in **[[`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L355-L462)** within the private helper functions **`_install_skill`** and **`_uninstall_skill`**. These functions handle the entire lifecycle of skill registration, from locale detection to filesystem deployment.

When invoked via the CLI with `--install` or `--uninstall` flags, these helpers orchestrate the copying of skill metadata into the appropriate directories that AI frameworks monitor for new capabilities.

## Step-by-Step Installation Workflow

The `skill --install` command executes a precise sequence to ensure proper framework integration.

### Locale-Aware Skill Selection

Before copying any files, the command determines which language version of the skill documentation to deploy. The function **`_skill_resource_name()`** inspects environment variables in the following priority order:

- `AGENT_REACH_LANG`
- `LC_ALL`
- `LC_MESSAGES`
- `LANG`

If these variables indicate an English locale, the command selects **[`SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL_en.md)** from the `agent_reach/skill/` directory; otherwise, it defaults to **[`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md)**. This ensures that OpenClaw and other frameworks receive the appropriate localized documentation for parsing.

### Directory Deployment Strategy

The **`_copy_skill_dir(target)`** function performs the actual installation by creating the target directory structure and writing the selected markdown file. It also copies the entire **`references/`** subfolder containing auxiliary documentation such as [`web.md`](https://github.com/Panniantong/Agent-Reach/blob/main/web.md) and [`video.md`](https://github.com/Panniantong/Agent-Reach/blob/main/video.md).

The command searches for skill directories in this priority order:

1. `$OPENCLAW_HOME/.openclaw/skills` (if `OPENCLAW_HOME` environment variable is set)
2. `~/.agents/skills` (generic `.agents` framework)
3. `~/.openclaw/skills` (OpenClaw)
4. `~/.claude/skills` (Claude Code)

If none of these directories exist, the command creates a default installation at `~/.agents/skills/agent-reach`.

### Framework Registration and File Preservation

OpenClaw expects agent skills to be present under `~/.openclaw/skills/<skill-name>/SKILL.md`. By placing the documentation and references in this location, Agent Reach becomes a first-class skill that OpenClaw's runtime can discover. The framework scans its `skills/` directory for [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) files, parses the markdown to identify capabilities, and makes those functions available to the LLM agent.

During installation, the command preserves existing files in the target directory. This safeguards local customizations, ensuring that developers can modify their skill definitions without losing changes during subsequent installations.

## Uninstallation and Cleanup

The **`_uninstall_skill()`** function iterates over the same set of framework directories and removes the `agent-reach` folder from each location. This effectively deregisters the skill from OpenClaw and other supported frameworks, cleaning up all deployed markdown files and reference documentation.

## Practical Usage Examples

Install the Agent Reach skill across all supported frameworks:

```bash

# Install for OpenClaw, Claude Code, and generic .agents frameworks

$ agent-reach skill --install
Skill installed for OpenClaw: /home/username/.openclaw/skills/agent-reach
Skill installed for Claude Code: /home/username/.claude/skills/agent-reach
Skill installed for Agent: /home/username/.agents/skills/agent-reach

```

Remove the skill from all frameworks:

```bash

# Uninstall from every known framework directory

$ agent-reach skill --uninstall
Removed skill directory: /home/username/.openclaw/skills/agent-reach
Removed skill directory: /home/username/.claude/skills/agent-reach
Removed skill directory: /home/username/.agents/skills/agent-reach

```

Load the installed skill within an OpenClaw session:

```python
from openclaw import Agent

# OpenClaw reads ~/.openclaw/skills/agent-reach/SKILL.md automatically

agent = Agent(name="my-agent")
agent.load_skill("agent-reach")

```

## Key Source Files and Components

The integration relies on these specific components within the **[Panniantong/Agent-Reach](https://github.com/Panniantong/Agent-Reach)** repository:

- **[[`agent_reach/cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py)](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L355-L462)** – Contains `_install_skill` and `_uninstall_skill` implementations that handle framework registration.

- **[[`agent_reach/skill/SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/skill/SKILL.md)](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/skill/SKILL.md)** – Default skill definition describing Agent Reach capabilities in markdown format.

- **[[`agent_reach/skill/SKILL_en.md`](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/skill/SKILL_en.md)](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/skill/SKILL_en.md)** – English localization of the skill documentation used when English locale variables are detected.

- **[`agent_reach/skill/references/`](https://github.com/Panniantong/Agent-Reach/tree/main/agent_reach/skill/references)** – Directory containing supplemental documentation files copied alongside the main SKILL.md.

- **[[`tests/test_skill_command.py`](https://github.com/Panniantong/Agent-Reach/blob/main/tests/test_skill_command.py)](https://github.com/Panniantong/Agent-Reach/blob/main/tests/test_skill_command.py)** – Test suite verifying correct installation and uninstallation behavior across mock skill directories.

## Summary

- The `agent-reach skill` command functions as a bridge between the Agent Reach library and external AI frameworks like OpenClaw by deploying standardized skill metadata.

- Installation relies on **`_install_skill`** in [`cli.py`](https://github.com/Panniantong/Agent-Reach/blob/main/cli.py) to perform locale-aware selection of [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) files and copy them to framework-specific directories (`~/.openclaw/skills`, `~/.claude/skills`, or `~/.agents/skills`).

- The command respects the `OPENCLAW_HOME` environment variable and preserves existing skill files to prevent accidental overwrites of local customizations.

- Uninstallation via **`_uninstall_skill`** removes the `agent-reach` directory from all detected framework locations, completely deregistering the skill.

- OpenClaw discovers installed skills by scanning for [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) files and parsing the contained capabilities for use by LLM agents.

## Frequently Asked Questions

### How does the skill command detect which AI framework to use?

The command checks for skill directories in a hardcoded priority order, starting with the `OPENCLAW_HOME` environment variable, then falling back to standard paths like `~/.openclaw/skills`, `~/.claude/skills`, and `~/.agents/skills`. It installs the skill into every directory that exists on the system, ensuring compatibility across multiple simultaneously installed frameworks.

### What happens if I customize the SKILL.md file after installation?

The installation process preserves existing files, meaning local modifications to [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md) or files in the `references/` directory remain intact during subsequent `--install` operations. This allows developers to tailor the skill description for their specific OpenClaw workflows without losing changes during updates.

### Can I install the skill for only one specific framework?

The current implementation installs to all detected framework directories simultaneously. To target a single framework, you would need to temporarily remove or rename other skill directories before running the install command, or manually copy the `agent_reach/skill/` contents to your desired single location.

### Where does the skill command store the reference documentation?

The **`_copy_skill_dir`** function deploys the entire `references/` subdirectory from `agent_reach/skill/` into the target installation directory alongside [`SKILL.md`](https://github.com/Panniantong/Agent-Reach/blob/main/SKILL.md). For OpenClaw installations, this places auxiliary docs at `~/.openclaw/skills/agent-reach/references/`, making them available for the framework to access when parsing the skill definition.