Building Custom OpenClaw Skills: Extend Your AI Agent

Create custom AgentSkills for OpenClaw: define permissions, schemas, functions, test locally, and publish safely.

By AI Mastermind Lab · Published 1 Mar 2026

A personal AI agent is only as good as the tools it has access to. OpenClaw thrives on its AgentSkills ecosystem. In this guide, we will build a custom skill that allows OpenClaw to check crypto prices natively.

1. Scaffold the Skill

Use the OpenClaw CLI to bootstrap a new skill directory.

openclaw skill create crypto-tracker
cd crypto-tracker
npm install

2. Defining the Manifest

The manifest.json tells the OpenClaw reasoning engine exactly what this skill does and what parameters it requires. This acts as the "Function Calling" schema.

{
  "name": "crypto-tracker",
  "version": "1.0.0",
  "description": "Fetch real-time cryptocurrency prices for the user.",
  "author": "Your Name",
  "permissions": ["network"],
  "functions": [
    {
      "name": "get_crypto_price",
      "description": "Get the current USD price of a cryptocurrency.",
      "parameters": {
        "type": "object",
        "properties": {
          "coin_id": {
            "type": "string",
            "description": "The ID of the coin (e.g., 'bitcoin', 'ethereum')"
          }
        },
        "required": ["coin_id"]
      }
    }
  ]
}

3. Implement the Logic

Open the src/index.ts file. This is where we implement the actual logic that gets executed when the LLM decides to call this tool.

import { AgentSkill, Context } from '@openclaw/sdk';

export default class CryptoTrackerSkill extends AgentSkill {
  
  async get_crypto_price(params: { coin_id: string }, ctx: Context) {
    ctx.logger.info(`Fetching price for ${params.coin_id}...`);
    
    try {
      const response = await fetch(`https://api.coingecko.com/api/v3/simple/price?ids=${params.coin_id}&vs_currencies=usd`);
      const data = await response.json();
      
      if (!data[params.coin_id]) {
        return `Error: Coin ${params.coin_id} not found.`;
      }
      
      const price = data[params.coin_id].usd;
      return `The current price of ${params.coin_id} is ${price} USD.`;
    } catch (error) {
       return `An error occurred while fetching the price.`;
    }
  }
}

4. Install & Test

Install it locally into your OpenClaw daemon:

openclaw skill link
openclaw reload

Now, message your OpenClaw bot: "What's the price of Bitcoin right now?" The agent will parse your intent, map 'Bitcoin' to the get_crypto_price skill, execute the typescript code, parse the JSON response, and formulate a conversational reply.