Guide

Skills & Plugins

Drop-in plugins and skills for ElizaOS, Claude Code, OpenClaw/ClawHub, and other AI agent frameworks.

ElizaOS Plugin

Full plugin for ElizaOS agents. 5 actions + 1 portfolio provider. Published on npm and submitted to the ElizaOS registry.

Install

$npm install buff-elizaos-pluginCopy

Configure

env
bash
BUFF_API_KEY=your-api-key # Get from buff.finance/dashboard
BUFF_WALLET_PUBKEY=your-buff-wallet # Your Buff wallet Solana address
BUFF_PLAN=sprout # seed|sprout|tree|forest
BUFF_INVEST_INTO=BTC # BTC|ETH|SOL|USDC
BUFF_THRESHOLD=5 # USD threshold before auto-swap

Add to Character

character.json
typescript
1{
2 "name": "my-agent",
3 "plugins": ["buff-elizaos-plugin"]
4}

Actions

ActionTriggerDescription
BUFF_ROUNDUP"round up my $4.73 transaction"Calculate a round-up
BUFF_INVEST"check my Buff investments"Check threshold & build swap
BUFF_PORTFOLIO"show my Buff portfolio"View wallet balances
BUFF_SET_PLAN"set plan to tree"Change round-up tier
BUFF_SET_ALLOC"set allocation 60% BTC 40% ETH"Set portfolio split

The buffPortfolioProvider automatically injects portfolio context into agent conversations.

OpenClaw / ClawHub Skill

Published on ClawHub as buff-roundup. Drop-in skill for any OpenClaw-compatible agent.

Install

bash
bash
# From ClawHub
clawhub install nightcode112/buff-roundup
# Or copy manually
cp -r packages/openclaw-skill ~/.openclaw/skills/buff-roundup

Configure

env
bash
BUFF_API_KEY=your-api-key
BUFF_WALLET_PUBKEY=your-buff-wallet
BUFF_PLAN=sprout
BUFF_INVEST_INTO=BTC
BUFF_THRESHOLD=5

Usage in OpenClaw Agent

agent.ts
typescript
1import { Buff } from "buff-protocol-sdk"
2
3const buff = new Buff({
4 apiKey: process.env.BUFF_API_KEY,
5 plan: process.env.BUFF_PLAN || "sprout",
6 investInto: process.env.BUFF_INVEST_INTO || "BTC",
7 investThreshold: Number(process.env.BUFF_THRESHOLD) || 5,
8})
9
10// Register the agent
11await buff.registerAgent(agentPubkey, "openclaw-agent")
12
13// After any agent action that costs money
14const breakdown = await buff.calculateRoundUp(costOfAction)
15console.log("Round-up:", breakdown.roundUpUsd)
16
17// Get wrap instructions to transfer the round-up
18const { instructions } = await buff.getWrapInstructions(
19 costOfAction, agentPubkey, buffWalletPubkey
20)
21
22// Build and execute swap when threshold is reached
23const { ready, transactions } = await buff.buildSwap(buffWalletPubkey)
24if (ready) {
25 for (const tx of transactions) {
26 const signed = signWithAgentKey(tx)
27 await buff.executeSwap(signed)
28 }
29}

Claude Code Skills

Two skills for Claude Code — type the slash command in any Claude Code session.

/buff-integrate

Guides you through integrating the Buff SDK into any Solana project. Covers installation, API key auth, wallet signature auth, round-up calculation, wrap instructions, and swap execution.

bash
bash
# In Claude Code, just type:
/buff-integrate
# Claude will walk you through the full SDK setup

/buff-agent

Sets up a Buff-enabled AI agent from scratch. Covers agent registration, API key setup, deriveWallet, round-up calculation, and swap execution.

bash
bash
# In Claude Code:
/buff-agent
# Claude will create the agent wallet, init Buff, and wire everything up

Install Claude Code Skills

Clone the repo and the skills are automatically available:

$git clone https://github.com/nightcode112/Buff.git && cd BuffCopy

The skills live in .claude/skills/buff-integrate/ and .claude/skills/buff-agent/. Claude Code auto-discovers them when you work in the project directory.

Note
To use these skills in a different project, copy the skill folders to your project's .claude/skills/ directory.

Available Plugins & Skills

NamePlatformInstall
buff-elizaos-pluginElizaOSnpm install buff-elizaos-plugin
buff-roundupOpenClaw / ClawHubclawhub install nightcode112/buff-roundup
buff-integrateClaude CodeClone repo → /buff-integrate
buff-agentClaude CodeClone repo → /buff-agent
SKILL.mdAny agentFetch buff.finance/SKILL.md

Universal SKILL.md

Any AI agent can fetch the SKILL.md directly from https://buff.finance/SKILL.md to learn how to use Buff. Compatible with Claude Code, OpenClaw, and any framework that reads SKILL.md files.

Create Your Own Plugin

Build a custom Buff plugin for your platform:

  • Install buff-protocol-sdk from npm
  • Initialize with new Buff({ apiKey }) — all logic is server-side
  • Use calculateRoundUp(), getWrapInstructions(), buildSwap(), executeSwap()
  • Or call the REST API directly from any language
  • See the ElizaOS plugin source for a reference implementation
Note
The SDK is a thin API client — zero sensitive logic. All fee calculation, treasury addresses, and swap routing are handled server-side by the Buff API.