Creating Custom Skills

Build your own SKILL.md from scratch โ€” templates, naming rules, helper scripts, testing, and publishing to ClawHub

Custom skills let you extend any Gemach agent with new capabilities specific to your workflow, your APIs, or your trading strategy. This guide walks you through the entire process โ€” from idea to ClawHub-published skill.

Prerequisites

Option A: Use the skill-creator Meta-Skill

The fastest way to build a new skill is to let the agent help you scaffold it. Gclaw ships with a built-in skill-creator skill that turns natural language descriptions into SKILL.md boilerplate.

Step 1. Launch Gclaw and describe what you want:

You: Create a new skill that fetches the current price of any token from
     the CoinGecko API and returns the price in USD.

Step 2. The agent generates a scaffold:

Gclaw: I've created a new skill at workspace/skills/coingecko-price/SKILL.md.
       It includes a get_token_price tool and a helpers/fetch-price.js script.
       Review the files and let me know what to adjust.

Step 3. Review and refine. The scaffold gives you the structure โ€” you fill in the details that only you know (API keys, endpoint specifics, error handling for your use case).

Option B: Build from Scratch

Step 1 โ€” Create the Directory

Skill directory names must be kebab-case and must match the name field in the front matter exactly:

Step 2 โ€” Write the SKILL.md

Start with the template from the SKILL.md Format Reference and fill in each section.

Here is a minimal but complete working example โ€” a skill that checks the health of an external API endpoint:

Examples

Example 1: Healthy endpoint

Prompt: "Is the Gemach API online?"

Expected behavior:

  1. Agent calls check_endpoint with https://api.gemach.io/health

  2. Receives { status: 200, latency_ms: 142, body_preview: "{\"ok\":true}" }

  3. Reports: "Gemach API is online. Response time: 142ms."

Example 2: Unreachable endpoint

Prompt: "Check if my local server at localhost:3000 is running."

Expected behavior:

  1. Agent calls check_endpoint with http://localhost:3000

  2. Receives an error (connection refused)

  3. Reports: "localhost:3000 is not reachable. Check that your server is running."

Error Handling

Error
Meaning
Recommended Action

ERR_TIMEOUT

Request exceeded timeout

Retry once with doubled timeout

ERR_CONNECTION

Host unreachable

Report failure; do not retry automatically

ERR_SSL

Certificate error

Report the SSL issue specifically

Python helper example (helpers/parse-response.py):

Step 4 โ€” Test Locally

Testing a skill is straightforward: load it into a running agent and fire prompts that exercise each example in your Examples section.

Checklist for a skill that passes testing:

Step 5 โ€” Validate the SKILL.md

Before publishing, verify your file structure:

Run a quick lint check on the front matter:

Naming Conventions

Convention
Correct
Incorrect

kebab-case identifiers

price-tracker

PriceTracker, price_tracker

GDEX skills prefixed with gdex-

gdex-my-strategy

my-gdex-strategy

Payment skills prefixed with protocol

tempo-payment

payment-tempo

Concise, action-oriented names

summarize

text-document-summarization-utility

Directory name matches name field

both = my-skill

directory = my_skill, name = my-skill

Publishing to ClawHub

Once your skill is tested and working, you can share it with the Gemach community through ClawHub โ€” the community skill registry for Gemach agents.

1. Prepare your skill package:

2. Push to a public GitHub repository:

3. Submit to ClawHub by opening a PR to the GemachDAO/clawhubarrow-up-right registry repository. Include:

  • Your skill's GitHub repository URL

  • A short description of what the skill does

  • The category tag (gdex-trading, utility, payments, etc.)

Once merged, agents can install your skill directly:


See also:

Last updated