Skills Extension and MCP Integration
Skills vs. Plugins: The Hands and Feet of the Agent
After setting up the brain and identity in previous articles, your Agent is currently an empty shell that can't do much besides chatting. We need to equip it with "tools" to interact with the world. In the OpenClaw ecosystem, there are two fundamental modular concepts:
- Skills: Think of these as installing apps on a smartphone. They are functional modules exposed to the model (e.g., sending specific emails, controlling a web form, reading system CPU usage). Their focus is on enabling the AI to execute specific business actions.
- Plugins: Think of these as hardware upgrades for the smartphone. They enhance the capabilities of the OpenClaw gateway itself (e.g., adding support for Telegram conversations, adding performance monitoring panels).
Our focus is on: How to equip and customize business-level Skills.
Installing Existing Skills: ClawHub and MCP
Before you start writing your own code, check the community for existing solutions.
1. Installation via ClawHub Ecosystem
Similar to Apple's App Store, OpenClaw provides a unified package manager to facilitate sharing skill configurations. If you need a specific skill, you can use the command line to search and acquire it:
# Install ClawHub client
npm i -g clawhub
# Search for community skills
clawhub search "Weather"
# Acquire and store it in your workspace
Precedence Mechanism: Skills follow a priority order for loading: Workspace Skills (Project Folder) > Global System-level Skills > Built-in Native Skills.
2. Integration via MCP: Universal Tool Access
If you prefer not to use ClawHub, OpenClaw's deep support for the Model Context Protocol (MCP) standard allows it to instantly connect to a vast array of tools from the global AI community (e.g., Fast.io extensions, Composio, or official GitHub MCP servers).
How to connect:
To register a third-party MCP server, use the dedicated mcp plugin to register the terminal address. Simply write the specific execution command into the gateway configuration file under plugins.entries.mcp.config. Subsequently, all underlying nodes will automatically recognize it:
"Help me create a Fast.io project"—The request will be automatically routed to the corresponding MCP provider.
Custom Skill Development: Simplifying Complexity
If you can't find a skill that fits your specific business needs, you'll need to develop a private Skill. The development process is remarkably simple.
Let's use a hypothetical skill that allows the AI to answer questions based on system disk space status as an example.
1. Structural Skeleton
Create a sub-directory in your workspace's skills/ folder; the directory name serves as the unique ID for the skill. It should contain:
- SKILL.md: This is the most important "constitution," providing guidelines and instructions for the LLM.
- manifest.json: Exposes parameters and security information to the system.
- Script Files: The actual Node.js/Python logic to be executed (optional).
2. Understanding the Instruction Engine: SKILL.md
While traditional development uses Swagger for API documentation, developing a Skill involves using natural language to provide the model with a detailed "job description." In SKILL.md, you need to answer three key questions for the model:
- When (Trigger): Under what types of user commands should this group of skills be selected?
- What (Required Data/I/O): What specific parameters must the model organize and send to successfully execute this job?
- How (Execution Steps): Are there any prerequisite conditions or dependency associations?
Simple Example Snippet:
# Server Monitor Skill Responsibilities
**Trigger**: Call when the user queries "system status" or "troubleshoot lag."
**Required Tool Parameter Format**: No parameters required; execute the probe module directly to fetch data.
**Important Constraint**: Regardless of the data feedback, always render it as a friendly percentage chart in the text interface.
3. Data Contracts and Standardized Responses
To ensure system stability and avoid errors in multi-agent task dispatching, any action script (e.g., index.js) must return a consistent JSON structure:
{
"success": true, // Tells the orchestrator whether to proceed with success or failure logic
"message": "Summary of execution details",
"data": { ... } // The core data results to be returned to the model
}
Debugging Suggestions
Because this grants the model high autonomy to run your code, always follow the SRP (Single Responsibility Principle)—a single skill should not attempt to perform two drastically different tasks.
Follow the pattern of: Execute in the terminal first (e.g., node ./skills/monitor/test.js) to ensure there are no fatal exceptions, then run openclaw gateway restart to grant this capability to the agent system.