How the Agent Reach Skill Command Integrates with OpenClaw and AI Agent Frameworks
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#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_LANGLC_ALLLC_MESSAGESLANG
If these variables indicate an English locale, the command selects SKILL_en.md from the agent_reach/skill/ directory; otherwise, it defaults to 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 and video.md.
The command searches for skill directories in this priority order:
$OPENCLAW_HOME/.openclaw/skills(ifOPENCLAW_HOMEenvironment variable is set)~/.agents/skills(generic.agentsframework)~/.openclaw/skills(OpenClaw)~/.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 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:
# 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:
# 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:
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 repository:
-
[
agent_reach/cli.py](https://github.com/Panniantong/Agent-Reach/blob/main/agent_reach/cli.py#L355-L462) – Contains_install_skilland_uninstall_skillimplementations that handle framework registration. -
[
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) – English localization of the skill documentation used when English locale variables are detected. -
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) – Test suite verifying correct installation and uninstallation behavior across mock skill directories.
Summary
-
The
agent-reach skillcommand functions as a bridge between the Agent Reach library and external AI frameworks like OpenClaw by deploying standardized skill metadata. -
Installation relies on
_install_skillincli.pyto perform locale-aware selection ofSKILL.mdfiles and copy them to framework-specific directories (~/.openclaw/skills,~/.claude/skills, or~/.agents/skills). -
The command respects the
OPENCLAW_HOMEenvironment variable and preserves existing skill files to prevent accidental overwrites of local customizations. -
Uninstallation via
_uninstall_skillremoves theagent-reachdirectory from all detected framework locations, completely deregistering the skill. -
OpenClaw discovers installed skills by scanning for
SKILL.mdfiles 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 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. 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.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →