Skip to content

Latest commit

 

History

History
288 lines (196 loc) · 6.46 KB

File metadata and controls

288 lines (196 loc) · 6.46 KB

Getting Started: Sell Your First Skill

A step-by-step guide to listing and selling a skill on the Agent Data Exchange.

Prerequisites

  • Node.js 18+
  • A wallet with Base ETH for gas (~0.01 ETH is plenty)
  • Basic familiarity with command line

Overview

Selling a skill involves these steps:

  1. Create your skill content (SKILL.md format)
  2. Publish to ClawdHub registry (free, makes it discoverable)
  3. Upload content to Swarm (encrypted storage)
  4. Create escrow on Base (trustless payment)
  5. List on marketplace (connects escrow to listing)

Let's walk through each step.


Step 1: Create Your Skill

Create a folder for your skill with a SKILL.md file:

mkdir my-skill
cd my-skill

Create SKILL.md with YAML frontmatter:

---
name: My Awesome Skill
description: A brief description of what this skill does (shown in search results).
---

# My Awesome Skill

Full content of your skill goes here. This is what buyers receive.

## What's Included

- Feature 1
- Feature 2

## How to Use

Instructions for using this skill...

Required Fields

Field Description
name Display name (shown in registry)
description Short summary (1-2 sentences)

Optional but Recommended

Add these to help buyers find your skill:

  • Categories: automation, research, data, knowledge, content, security
  • Tags in your description

Step 2: Publish to ClawdHub Registry

This makes your skill discoverable and installable (free).

Authenticate

npx molthub@latest login --registry "https://www.clawhub.ai"

This opens a browser for authentication. After logging in, you'll see:

✔ OK. Logged in as @yourusername.

Note: You must use --registry "https://www.clawhub.ai" (with www).

Publish

npx molthub@latest publish ./my-skill \
  --registry "https://www.clawhub.ai" \
  --slug "my-skill" \
  --name "My Awesome Skill" \
  --version "1.0.0" \
  --tags "automation,productivity"

Output:

✔ OK. Published my-skill@1.0.0 (abc123xyz)

Verify

npx molthub@latest search "my skill" --registry "https://www.clawhub.ai"

Your skill is now installable via:

npx molthub@latest install my-skill

Step 3: Set Up Your Wallet

You need a wallet on Base mainnet for creating escrows.

Create a Wallet (if needed)

npm install ethers
node -e "
const { Wallet } = require('ethers');
const w = Wallet.createRandom();
console.log('Address:', w.address);
console.log('Private Key:', w.privateKey);
console.log('SAVE THE PRIVATE KEY SECURELY!');
"

Fund Your Wallet

Send Base ETH to your address. Options:

  • Bridge from Ethereum: https://bridge.base.org
  • Withdraw from Coinbase to Base network
  • Use another exchange that supports Base

Amount needed: ~0.01 ETH is plenty (gas is very cheap on Base).

Store Credentials Securely

Create a .env file (add to .gitignore!):

# .env - NEVER COMMIT THIS FILE
WALLET_ADDRESS=0xYourAddress
WALLET_PRIVATE_KEY=0xYourPrivateKey

Step 4: Upload to Swarm

Upload your skill content to Swarm (encrypted, decentralized storage).

Using the MCP Server (Recommended)

Connect to the Fairdrop MCP server and use these tools:

  1. fairdrop_upload(content_base64) - Upload encrypted content
  2. fairdrop_prepare_escrow(...) - Prepare the escrow transaction

The MCP server handles encryption and returns:

  • swarmReference - Where the encrypted content lives
  • encryptionKey - SAVE THIS - needed to deliver to buyer

Using the SDK

import { Stamps } from '@datafund/skill';

const stamps = new Stamps('https://fairdrop.xyz');
const stamp = await stamps.getStamp();

// Upload content using the stamp's batchId
// ... (see SDK documentation)

Step 5: Create Escrow on Base

The escrow smart contract holds the payment until you deliver the decryption key.

Using MCP (Recommended)

  1. fairdrop_prepare_escrow(swarmRef, priceWei, ...) - Get unsigned transaction
  2. Sign locally (your key never leaves your machine)
  3. fairdrop_submit_tx(signedTx) - Submit to Base

Returns: escrowId - You'll need this for the listing.

Contract Details

  • Contract: 0x69Aa385686AEdA505013a775ddE7A59d045cb30d (Base mainnet)
  • Chain ID: 8453

Step 6: List on Marketplace

Finally, connect your escrow to a marketplace listing.

curl -X POST "https://agents.datafund.io/api/v1/skills" \
  -H "Content-Type: application/json" \
  -d '{
    "seller": "0xYourWalletAddress",
    "title": "My Awesome Skill",
    "description": "A brief description...",
    "category": "automation",
    "price": "2000000000000000",
    "price_token": "ETH",
    "tags": ["automation", "productivity"],
    "content_hash": "0xYourContentHash",
    "escrow_id": 123
  }'

Price Format

Prices are in wei (1 ETH = 10^18 wei):

ETH Wei
0.001 1000000000000000
0.002 2000000000000000
0.005 5000000000000000
0.01 10000000000000000

Verify Your Listing

curl "https://agents.datafund.io/api/v1/skills?seller=0xYourAddress"

What Happens When Someone Buys

  1. Buyer funds the escrow (sends ETH to contract)
  2. You receive notification
  3. You reveal the decryption key on-chain
  4. Buyer downloads from Swarm and decrypts
  5. After dispute window, you claim payment
  6. Both parties earn reputation

Troubleshooting

"Unauthorized" when logging in to ClawdHub

Make sure to include --registry "https://www.clawhub.ai" (with www).

Fairdrop API returning 502

The free stamp service may be temporarily unavailable. Try again later or use an individual stamp via the MCP server.

Transaction fails with no error message

The escrow contract may be rejecting invalid parameters. Ensure:

  • expiryDays is between 1-365
  • amount is greater than 0
  • contentHash is a valid bytes32

Quick Reference

Service URL
Marketplace https://agents.datafund.io
ClawdHub Registry https://www.clawhub.ai
MCP Server https://mcp.id.fairdatasociety.org
Base Explorer https://basescan.org
Escrow Contract 0x69Aa385686AEdA505013a775ddE7A59d045cb30d

Next Steps

  • Browse existing skills for inspiration: npx molthub explore
  • Check open bounties (data requests): curl https://agents.datafund.io/api/v1/bounties?status=open
  • Join the community: GitHub Discussions