How Agent Reach Implements Skill Registration Across AI Agent Platforms

Agent Reach implements skill registration through a CLI-driven process that detects your system locale, selects the appropriate skill descriptor, and installs the skill package to the first available platform directory among generic .agents, OpenClaw, or Claude Code.

Agent Reach (Panniantong/Agent-Reach) is an open-source framework that exposes its capabilities as a portable skill. The skill registration process allows the framework to integrate with multiple AI-agent environments—including OpenClaw and Claude Code—through a unified command-line interface.

Supported AI Agent Platforms

Agent Reach supports three distinct platform targets, each with a specific filesystem location:

  • Generic .agents: ~/.agents/skills/agent-reach – Any agent reading the standard ~/.agents/skills directory
  • OpenClaw: ~/.openclaw/skills/agent-reach (or $OPENCLAW_HOME/.openclaw/skills/agent-reach if the environment variable is set)
  • Claude Code: ~/.claude/skills/agent-reach

Each location expects a SKILL.md file and a references/ subdirectory containing documentation.

The Registration Workflow

The agent-reach skill command orchestrates installation. In agent_reach/cli.py, the CLI parser registers the skill sub-command with mutually exclusive --install and --uninstall flags at lines 104‑110.

Locale-Aware Skill Selection

Before copying files, the _install_skill function determines which language variant to deploy. It checks environment variables in the following order: AGENT_REACH_LANG, LC_ALL, LC_MESSAGES, and LANG (lines 53‑62).

If the locale indicates English, the process selects SKILL_en.md; otherwise, it defaults to SKILL.md. This ensures agents receive documentation in the user's preferred language.

Target Directory Resolution

The installation iterates over a prioritized list of skill roots defined at lines 12‑22:

  1. ~/.agents/skills (generic agents)
  2. ~/.openclaw/skills (OpenClaw)
  3. ~/.claude/skills (Claude Code)

If OPENCLAW_HOME is defined, its path is inserted at the front of the list. The algorithm selects the first existing directory, or falls back to creating ~/.agents/skills/agent-reach if none exist (lines 34‑40).

File Installation and Copying

The _copy_skill_dir function (lines 71‑99) performs the actual filesystem operations:

  • Removes any previous installation (handling both normal directories and symlinks)
  • Creates the target agent-reach directory
  • Writes the selected SKILL.md file
  • Copies the entire references/ subdirectory containing detailed help documentation

Uninstalling the Skill

To remove the skill, the _uninstall_skill function (lines 44‑61) traverses the same set of platform directories. It deletes the entire agent-reach skill directory from each location, including symbolic links, and reports what was removed. Running agent-reach skill --uninstall triggers this cleanup across all detected platforms.

Skill Package Structure

The source files reside in agent_reach/skill/ and include:

These files are what AI agents load at runtime to understand Agent Reach's capabilities.

Practical Usage Examples

Install the skill for automatic platform detection:

agent-reach skill --install

Force English language installation:

export LANG=en_US.UTF-8
agent-reach skill --install

Install to a custom OpenClaw home:

export OPENCLAW_HOME=$HOME/custom-openclaw
agent-reach skill --install

Remove the skill from all platforms:

agent-reach skill --uninstall

Programmatic installation from Python:

from agent_reach.cli import _install_skill, _uninstall_skill

# Register the skill

_install_skill()

# Later, unregister

_uninstall_skill()

Summary

  • Agent Reach supports skill registration across three platforms: generic .agents, OpenClaw, and Claude Code.
  • The CLI command agent-reach skill --install handles detection, locale selection, and file copying via functions in agent_reach/cli.py.
  • Locale detection prioritizes AGENT_REACH_LANG, falling back to standard LANG variables to choose between SKILL.md and SKILL_en.md.
  • Installation targets the first existing directory in a prioritized list, with ~/.agents/skills as the fallback.
  • The skill package includes the main descriptor and a references/ folder with detailed documentation.
  • Uninstallation cleans up all platform directories using the same traversal logic.

Frequently Asked Questions

Which environment variables control the skill language selection?

Agent Reach checks AGENT_REACH_LANG first, then falls back to LC_ALL, LC_MESSAGES, and finally LANG to determine whether to install SKILL_en.md or the default SKILL.md.

How does Agent Reach decide which platform directory to use?

The installer checks for existing directories in the order: OPENCLAW_HOME (if set), ~/.agents/skills, ~/.openclaw/skills, and ~/.claude/skills. It uses the first existing path, or creates ~/.agents/skills/agent-reach if none exist.

What files are included in the skill installation?

The installation copies the selected SKILL.md (or SKILL_en.md) and the entire references/ subdirectory from agent_reach/skill/ to the target platform directory.

Can I use the registration functions without the CLI?

Yes, you can import _install_skill and _uninstall_skill directly from agent_reach.cli to programmatically manage skill registration in Python scripts without invoking the command line.

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 →