Build Your First OpenClaw Skill
Why Build a Skill?
The 5,700+ community skills cover a lot — but your business has unique workflows. Maybe you need to check inventory in your specific system, or format reports in a particular way. Building a custom skill lets OpenClaw do things nobody else's assistant can.
What You'll Build
A simple skill that checks your website's uptime and alerts you if it's down. It's practical, teaches the fundamentals, and takes about 20 minutes.
Prerequisites
- OpenClaw installed and running
- Basic comfort with the command line (you'll type some commands, but we'll walk you through each one)
- Node.js installed (comes with OpenClaw)
Step 1: Scaffold the Skill
openclaw skill create my-uptime-checker
cd my-uptime-checker
This creates a folder with the basic skill structure:
my-uptime-checker/
skill.json ← Metadata and permissions
index.ts ← Your skill code
README.md ← Description
Step 2: Define the Skill Metadata
Open skill.json and update it:
{
"name": "my-uptime-checker",
"version": "1.0.0",
"description": "Checks if my website is up and alerts me if it's down",
"permissions": ["network"],
"triggers": {
"schedule": "*/5 * * * *"
}
}
The permissions field tells OpenClaw this skill needs network access. The triggers.schedule field runs it every 5 minutes.
Step 3: Write the Skill Logic
Open index.ts and replace the contents:
import { Skill } from "@openclaw/sdk";
const MY_WEBSITE = "https://your-website.com";
export default new Skill({
name: "my-uptime-checker",
async onSchedule(ctx) {
try {
const res = await fetch(MY_WEBSITE, { method: "HEAD" });
if (!res.ok) {
await ctx.notify(
`⚠️ Website is DOWN! ${MY_WEBSITE} returned status ${res.status}`
);
}
} catch (error) {
await ctx.notify(
`🔴 Website is UNREACHABLE! ${MY_WEBSITE} - ${error}`
);
}
},
async onMessage(ctx, message) {
if (message.includes("check site") || message.includes("website status")) {
try {
const start = Date.now();
const res = await fetch(MY_WEBSITE);
const ms = Date.now() - start;
await ctx.reply(
`✅ ${MY_WEBSITE} is UP (status ${res.status}, ${ms}ms)`
);
} catch {
await ctx.reply(`🔴 ${MY_WEBSITE} is DOWN or unreachable`);
}
}
},
});
Replace https://your-website.com with your actual URL.
Step 4: Test It
openclaw skill test my-uptime-checker
This runs the skill in a sandbox and shows you the output.
Step 5: Install It
openclaw skill install ./my-uptime-checker
Done! Your skill is now running. Every 5 minutes it checks your website, and you can also ask "check my site" in chat.
Going Further
Now that you know the basics, you can build skills for anything:
- Inventory checker — Query your inventory system and alert when stock is low
- Report formatter — Take raw data and format it into your standard template
- Client follow-up — Check your CRM and remind you about overdue follow-ups
The OpenClaw SDK docs at clawdocs.org cover everything: database access, API integrations, file handling, and more.
Publishing Your Skill
If you build something useful, share it with the community:
openclaw skill publish my-uptime-checker
This uploads it to ClawHub where other OpenClaw users can find and install it. Open source at its best.