How Skill Installation Works for Different AI Agents in Agent Reach
Agent Reach installs a reusable skill package into platform-specific directories—~/.agents/skills, ~/.openclaw/skills, and ~/.claude/skills—via the _install_skill routine in cli.py, enabling seamless integration with OpenClaw, Claude Code, and generic agent environments.
Agent Reach provides a cross-platform skill installation mechanism that enables AI agents to consume external capabilities through a bundled package. The system ships a reusable skill containing SKILL.md and supporting resources, deploying it into the native skill directories of three major AI agent ecosystems. This ensures consistent availability whether you are running generic .agents, OpenClaw, or Claude Code.
Supported AI Agent Platforms
Agent Reach targets three distinct skill directories, checked in the following priority order:
- Generic agents (
.agents):~/.agents/skills - OpenClaw:
~/.openclaw/skills - Claude Code:
~/.claude/skills
The Installation Pipeline
The _install_skill function in agent_reach/cli.py orchestrates deployment through a five-step process.
Locating Skill Resources
The routine first attempts to load package files via importlib.resources.files("agent_reach").joinpath("skill"). If this fails—common during editable installs—it falls back to the local skill folder adjacent to the source file (lines 399–404).
Reading Skill Metadata
The helper _read_skill_markdown selects either a locale-specific SKILL.md or the generic version, preparing the content for deployment (lines 376–383).
Resolving Target Directories
The code builds a candidate list of installation paths, preferring the generic .agents location, then OpenClaw, then Claude Code (lines 428–435). It verifies which directories exist on the host system.
Deploying Assets
For each existing directory, the routine creates (or symlinks) a subdirectory named agent-reach, writes the markdown file, and copies any references/ sub-folder (lines 383–424). Existing installations are cleared first to prevent stale files (lines 389–397).
Fallback Creation
If none of the known directories exist, the system creates ~/.agents/skills/agent-reach to ensure the skill is always available (lines 453–456).
Automatic Installation Triggers
Beyond manual invocation via agent-reach skill --install, the installation runs automatically during a full agent-reach install execution and again when the doctor command executes, ensuring the skill remains present unless explicitly disabled (lines 1492–1493).
Uninstalling Skills
The _uninstall_skill function mirrors the installation process. It iterates over the same three possible locations, removes the agent-reach directory (handling both real directories and symlinks), and reports success or failure for each (lines 466–499).
Practical Usage Examples
# Install the Agent Reach skill for all supported agents
python -m agent_reach.cli skill --install
# Remove the skill from all known locations
python -m agent_reach.cli skill --uninstall
# Manual implementation of the copy logic
import shutil
from pathlib import Path
import os
src = Path(__file__).parent / "skill"
dst = os.path.expanduser("~/.agents/skills/agent-reach")
shutil.copytree(src, dst, dirs_exist_ok=True)
Key Source Files
agent_reach/cli.py: Contains_install_skilland_uninstall_skillimplementations (lines 376–499, 1492–1493).agent_reach/skill/: Houses the bundledSKILL.mdand optionalreferences/directory.agent_reach/config.py: Defines user configuration paths influencing skill directory resolution.tests/test_skill_command.py: Validates install/uninstall behavior across platforms.
Summary
- Agent Reach supports three agent platforms: generic
.agents, OpenClaw, and Claude Code. - The
_install_skillfunction incli.pyhandles resource location, path resolution, and asset deployment. - Installations target
~/.agents/skills,~/.openclaw/skills, or~/.claude/skillswith a subdirectory namedagent-reach. - The system clears existing installations before copying to avoid stale files and creates fallback directories when none exist.
- Automatic triggers include the main install command and the doctor check.
Frequently Asked Questions
Which AI agent platforms does Agent Reach support for skill installation?
Agent Reach supports three platforms: generic agents using the .agents directory (~/.agents/skills), OpenClaw (~/.openclaw/skills), and Claude Code (~/.claude/skills). The installer checks for existing directories in this priority order and deploys to all found locations.
How does Agent Reach locate the skill files to install?
The _install_skill routine first attempts to load files via importlib.resources.files("agent_reach").joinpath("skill"). If this package resource access fails—common in editable installs—it falls back to the local skill folder relative to the cli.py source file.
What happens if none of the skill directories exist on my system?
If the installer cannot find ~/.agents/skills, ~/.openclaw/skills, or ~/.claude/skills, it automatically creates ~/.agents/skills/agent-reach as a fallback location. This ensures the skill is always available regardless of which agents are currently installed.
Does installing Agent Reach automatically install the skill?
Yes. The skill installation is triggered automatically when running agent-reach install or agent-reach doctor, ensuring the skill package is present in the appropriate directories without requiring manual skill --install execution.
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 →