Agent skill

shelby

Shelby Protocol expert for decentralized blob storage on Aptos blockchain. Covers erasure coding (Clay Codes), TypeScript SDK, smart contracts, CLI tools, storage providers, and dApp integration. High-performance storage for video streaming, AI training, and large datasets. Triggers on Shelby, Shelby Protocol, decentralized storage, Aptos storage, blob storage, ShelbyNodeClient, erasure coding, Clay Codes.

Stars 69
Forks 8

Install this agent skill to your Project

npx add-skill https://github.com/raintree-technology/claude-starter/tree/main/skills/aptos/shelby

Metadata

Additional technical details for this skill

author
raintree
version
1.0

SKILL.md

Shelby Protocol Expert

Shelby is a decentralized blob storage network on Aptos blockchain with erasure coding, micropayment channels, and dedicated private bandwidth.

When to Use

  • Building dApps that need decentralized storage
  • Integrating Shelby SDK (TypeScript/Node.js/Browser)
  • Understanding erasure coding and data durability
  • Working with storage providers and RPC servers
  • Video streaming, AI training data, large datasets

Architecture Overview

User (Public Internet)
  ↓
Shelby RPC Server (handles blob operations)
  ↓ (Private Fiber Network)
Storage Provider Servers (16 per placement group)
  ↓
Aptos L1 Blockchain (state management)

Key Components:

  • Aptos Smart Contract - System state, audits, settlements
  • Storage Providers - Store erasure-coded chunks
  • RPC Servers - User-facing API, erasure coding/decoding
  • Private Network - Dedicated fiber for internal communication

Data Model

Erasure Coding (Clay Codes)

Data is split and encoded for durability:

10MB Blob → Split into chunksets → Erasure code each
                                         ↓
                               16 chunks per chunkset
                               (10 data + 6 parity)
                                         ↓
                               Distributed to 16 storage providers

Recovery: Any 10 of 16 chunks can reconstruct data

Why Clay Codes?

  • Same storage efficiency as Reed-Solomon
  • 4x less bandwidth during recovery
  • Optimal for large-scale distributed storage

Blob Naming

<account>/<user-defined-path>

Examples:
0x123.../videos/intro.mp4
0x123.../datasets/training/batch-001.parquet
  • Max 1024 characters
  • Must NOT end with /
  • Flat namespace (no directories, just paths)

SDK Integration

Installation

bash
npm install @shelby-protocol/sdk @aptos-labs/ts-sdk

Node.js Client

typescript
import { ShelbyNodeClient } from "@shelby-protocol/sdk/node";
import { Network } from "@aptos-labs/ts-sdk";

const client = new ShelbyNodeClient({
  network: Network.SHELBYNET,
  apiKey: process.env.SHELBY_API_KEY,
});

Browser Client

typescript
import { ShelbyClient } from "@shelby-protocol/sdk/browser";
import { Network } from "@aptos-labs/ts-sdk";

const client = new ShelbyClient({
  network: Network.SHELBYNET,
  apiKey: process.env.SHELBY_API_KEY,
});

Common Operations

Upload Blob

typescript
const result = await client.uploadBlob({
  blobName: "user/data/file.txt",
  data: fileBuffer,
  expirationTimestamp: Date.now() + 30 * 24 * 60 * 60 * 1000, // 30 days
});

Download Blob

typescript
// Full blob
const data = await client.getBlob("user/data/file.txt");

// Byte range (efficient for large files)
const partial = await client.getBlob("user/data/file.txt", {
  range: { start: 0, end: 1024 },
});

Multipart Upload (Large Files)

For files > 10MB:

typescript
const upload = await client.startMultipartUpload({
  blobName: "large-dataset.bin",
  expirationTimestamp: futureTimestamp,
});

for (const [index, part] of fileParts.entries()) {
  await client.uploadPart({
    uploadId: upload.id,
    partNumber: index,
    data: part,
  });
}

await client.completeMultipartUpload({ uploadId: upload.id });

Session Management

Reuse sessions for multiple operations:

typescript
const session = await client.createSession({
  rpcUrl: "https://api.shelbynet.shelby.xyz/shelby",
  paymentAmount: 1000000, // ShelbyUSD micro-units
});

// Multiple reads on same session
for (const blobName of blobsToDownload) {
  await client.getBlob(blobName, { session });
}

await session.close();

Token Economics

Two-Token Model

Token Purpose
APT Blockchain gas fees
ShelbyUSD Storage and bandwidth payments

Funding

bash
# APT from faucet
aptos account fund-with-faucet --profile my-profile --amount 1000000000

# ShelbyUSD from faucet
# Visit: https://faucet.shelbynet.shelby.xyz

Use Cases

Ideal Workloads:

  • Video streaming (high bandwidth reads)
  • AI training/inference (large datasets)
  • Data analytics (read-heavy patterns)
  • Content delivery (static assets)
  • Archival storage (long-term retention)

Trade-offs:

  • Optimized for large files (10MB+ chunksets)
  • Blobs are immutable (no updates, only overwrite)
  • User-pays model (storage + bandwidth)

Resources

Expand your agent's capabilities with these related and highly-rated skills.

raintree-technology/claude-starter

claude-mcp-expert

Model Context Protocol (MCP) expert for Claude Code. Install, configure, and troubleshoot MCP servers. Covers HTTP, SSE, and stdio transports, authentication, popular integrations (Sentry, GitHub, Jira, Notion, databases). Triggers on MCP, Model Context Protocol, MCP server, installing MCP, connecting tools, webhooks, remote server.

69 8
Explore
raintree-technology/claude-starter

claude-skill-builder

Interactive skill creator for Claude Code and Agent Skills ecosystem. Build SKILL.md files with proper frontmatter, triggers, and structure. Triggers on creating skills, building skills, skill templates, skill frontmatter, allowed-tools, npx add-skill, agent skills.

69 8
Explore
raintree-technology/claude-starter

move-prover

Move Prover formal verification expert for Aptos smart contracts. Write specifications (MSL), preconditions (requires), postconditions (ensures), invariants, abort conditions (aborts_if), quantifiers, schemas, and pragmas. Debug verification failures. Triggers on Move Prover, formal verification, spec, invariant, ensures, requires, aborts_if, precondition, postcondition.

69 8
Explore
raintree-technology/claude-starter

helius

Helius Solana RPC and API expert. High-performance infrastructure for Solana including RPC nodes, DAS API for NFTs/tokens, LaserStream real-time streaming, webhooks, Priority Fee API, Enhanced Transactions, and ZK Compression. Triggers on Helius, Solana RPC, DAS API, Digital Asset Standard, NFT metadata, Solana webhooks, priority fees, LaserStream, ZK compression.

69 8
Explore
raintree-technology/claude-starter

toon-formatter

Token-Oriented Object Notation (TOON) format expert for 30-60% token savings on structured data. Auto-applies to arrays with 5+ items, tables, logs, API responses, database results. Supports tabular, inline, and expanded formats with comma/tab/pipe delimiters. Triggers on large JSON, data optimization, token reduction, structured data, arrays, tables, logs, metrics, TOON.

69 8
Explore
raintree-technology/claude-starter

aptos

Aptos blockchain and Move language expert. Covers Move programming (abilities, generics, resources), Aptos framework modules, smart contract development, token standards (Coin, Fungible Asset, Digital Asset), object model, gas optimization, and dApp integration. Triggers on Aptos, Move language, Move smart contract, Aptos blockchain, abilities, generics, resources, fungible asset, digital asset.

69 8
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results