OpenClaw ships with dozens of community skills (see our top 10 for beginners), but the real power move is building your own. A custom skill is just a folder with a markdown file and a script. No SDK, no framework, no build step.

In this tutorial, we’ll build a stock price checker skill from scratch. By the end, you’ll be able to ask your agent “What’s AAPL trading at?” and get a real-time answer.

Total time: about 10 minutes.

How Skills Work

A skill is a directory inside ~/.openclaw/skills/ containing:

~/.openclaw/skills/stock-price/
├── SKILL.md          # Describes the skill to the agent
└── check-price.sh    # The actual tool

That’s it. SKILL.md tells the agent what the skill can do and how to invoke it. The script does the work. Your agent reads SKILL.md, understands the capability, and calls the script when relevant.

No registration command. No manifest file. Drop the folder in, and the agent picks it up on the next session.

Step 1: Create the Skill Directory

mkdir -p ~/.openclaw/skills/stock-price
cd ~/.openclaw/skills/stock-price

Step 2: Write SKILL.md

This is the most important file. It’s not just documentation — it’s the interface contract between your agent and your tool. Write it clearly, because the LLM reads it literally.

cat > SKILL.md << 'EOF'
# Stock Price Checker

Check real-time stock prices using the Yahoo Finance API.

## Usage

To get the current price of a stock:

```bash
bash ~/.openclaw/skills/stock-price/check-price.sh SYMBOL

Arguments:

  • SYMBOL — Stock ticker symbol (e.g., AAPL, GOOGL, TSLA, MSFT)

Output: Current price, daily change, and percentage change in plain text.

Examples:

  • bash ~/.openclaw/skills/stock-price/check-price.sh AAPL → Apple Inc. current price
  • bash ~/.openclaw/skills/stock-price/check-price.sh TSLA → Tesla current price

When to Use

Use this skill when the user asks about:

  • Current stock prices
  • How a stock is performing today
  • Price comparisons between stocks

Requirements

  • curl and jq must be installed
  • Internet connection required
  • No API key needed (uses Yahoo Finance public endpoint) EOF

### Key things to notice:

1. **Clear description** — the agent knows exactly what this does
2. **Exact command** — full path, exact syntax, no ambiguity
3. **"When to Use" section** — helps the agent decide when to invoke it
4. **Requirements** — the agent can check these before running

## Step 3: Write the Script

```bash
cat > check-price.sh << 'SCRIPT'
#!/bin/bash
# Stock price checker using Yahoo Finance API

SYMBOL="${1^^}"  # Uppercase the symbol

if [ -z "$SYMBOL" ]; then
    echo "Usage: check-price.sh SYMBOL"
    echo "Example: check-price.sh AAPL"
    exit 1
fi

# Fetch quote data from Yahoo Finance
DATA=$(curl -s "https://query1.finance.yahoo.com/v8/finance/chart/${SYMBOL}?interval=1d&range=1d" \
    -H "User-Agent: Mozilla/5.0")

# Check if the request succeeded
ERROR=$(echo "$DATA" | jq -r '.chart.error.description // empty')
if [ -n "$ERROR" ]; then
    echo "Error: $ERROR"
    exit 1
fi

# Extract price data
PRICE=$(echo "$DATA" | jq -r '.chart.result[0].meta.regularMarketPrice')
PREV_CLOSE=$(echo "$DATA" | jq -r '.chart.result[0].meta.chartPreviousClose')
CURRENCY=$(echo "$DATA" | jq -r '.chart.result[0].meta.currency')
NAME=$(echo "$DATA" | jq -r '.chart.result[0].meta.shortName // .chart.result[0].meta.symbol')

if [ "$PRICE" = "null" ] || [ -z "$PRICE" ]; then
    echo "Could not find price data for $SYMBOL"
    exit 1
fi

# Calculate change
CHANGE=$(echo "$PRICE - $PREV_CLOSE" | bc -l)
PCT=$(echo "scale=2; ($CHANGE / $PREV_CLOSE) * 100" | bc -l)

# Format sign
if (( $(echo "$CHANGE >= 0" | bc -l) )); then
    SIGN="+"
    ARROW="▲"
else
    SIGN=""
    ARROW="▼"
fi

echo "${NAME} (${SYMBOL})"
echo "Price: ${CURRENCY} ${PRICE}"
echo "Change: ${SIGN}${CHANGE} (${SIGN}${PCT}%) ${ARROW}"
SCRIPT

chmod +x check-price.sh

Step 4: Test It

Run the script directly to make sure it works:

bash ~/.openclaw/skills/stock-price/check-price.sh AAPL

Expected output:

Apple Inc. (AAPL)
Price: USD 237.42
Change: +1.85 (+0.79%) ▲

If you get errors, check that jq is installed (brew install jq on macOS, apt install jq on Linux).

Step 5: Test with Your Agent

Start a new OpenClaw session (or reload skills) and try:

“What’s the current price of Tesla stock?”

Your agent should:

  1. Recognize this as a stock price question
  2. Find the stock-price skill in its SKILL.md
  3. Run bash ~/.openclaw/skills/stock-price/check-price.sh TSLA
  4. Format the output into a natural response

That’s it. Five steps, one folder, two files.

Writing Better SKILL.md Files

The quality of your SKILL.md directly determines how well the agent uses your skill. Here are patterns that work:

Be explicit about the command

# Bad
Run the script to check prices.

# Good
bash ~/.openclaw/skills/stock-price/check-price.sh SYMBOL

Include “When to Use” and “When NOT to Use”

## When NOT to Use
- Historical price data (use a charting API instead)
- Cryptocurrency prices (use the crypto-price skill)
- Options or derivatives pricing

This prevents false positives — the agent won’t invoke your skill for requests it can’t handle.

Document the output format

## Output Format
Plain text, three lines:
1. Company name and symbol
2. Current price with currency
3. Daily change with percentage and direction arrow

This helps the agent parse and re-format the output for the user.

Going Further: Multi-Command Skills

A skill can have multiple scripts. For a more complete stock skill:

~/.openclaw/skills/stock-price/
├── SKILL.md
├── check-price.sh      # Current price
├── compare.sh           # Compare two stocks
└── watchlist.sh         # Track a list of symbols

Update your SKILL.md to document all three commands. The agent will pick the right one based on the user’s request.

Going Further: Skills in Any Language

Bash is convenient, but skills can be written in anything executable:

#!/usr/bin/env python3
# check-price.py — same thing, but in Python
import sys, requests

symbol = sys.argv[1].upper()
data = requests.get(f"https://query1.finance.yahoo.com/v8/finance/chart/{symbol}").json()
meta = data["chart"]["result"][0]["meta"]
print(f"{symbol}: {meta['currency']} {meta['regularMarketPrice']}")

As long as it’s executable and takes arguments, the agent can call it.

Sharing Your Skill

Built something useful? Share it:

  1. Push your skill directory to a GitHub repo
  2. Add a README with setup instructions
  3. Submit it to the OpenClaw skill directory

The community grows when people share their tools. Your niche skill — whether it checks stock prices, queries a local database, or controls your smart home — might be exactly what someone else needs.

Recap

StepWhatTime
1Create directory10 sec
2Write SKILL.md3 min
3Write script5 min
4Test standalone30 sec
5Test with agent1 min

No framework. No boilerplate. Just a markdown file that describes what your tool does and a script that does it. That’s the OpenClaw way.


Want to understand how skills fit into the bigger picture? Read What Is OpenClaw?. For multi-agent setups where skills become essential, see our multi-agent team guide.