Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

tokenized-agents

БесплатноБез исполняемых скриптовНе проверен

Use when the user wants to charge users for actions. Use @pump-fun/agent-payments-sdk, to build Solana payment transactions, verify on-chain invoice payments…

jiayaoqijiaот jiayaoqijia★ 81 звезда на GitHub

Об этом скилле

Before Starting Work

MANDATORY — Do NOT write or modify any code until every item below is answered by the user:

  • Agent token mint address (from pump.fun)
  • Payment currency decided (USDC or SOL)
  • Price/amount confirmed (in smallest unit)
  • RPC URL provided or a fallback agreed upon
  • Framework confirmed (Next.js, Express, other)

You MUST ask the user for ALL unchecked items in your very first response. Do not assume defaults. Do not proceed until the user has explicitly answered each one.

Safety Rules

  • NEVER log, print, or return private keys or secret key material.
  • NEVER sign transactions on behalf of a user — you build the instruction, the user signs.
  • Always validate that amount > 0 before creating an invoice.
  • Always ensure endTime > startTime and both are valid Unix timestamps.
  • Use the correct decimal precision for the currency (6 decimals for USDC, 9 for SOL).
  • Always verify payments on the server using validateInvoicePayment before delivering any service. Never trust the client alone — clients can be spoofed.
  • Always verify your code against this skill before finalizing. Before delivering generated code, re-read the relevant sections of this document and confirm:
    • Parameter types match the documented signatures — buildAcceptPaymentInstructions accepts number for numeric fields, validateInvoicePayment accepts number, and getInvoiceIdPDA accepts number.
    • Parameter ordering and names match exactly.
    • Default values (e.g. computeUnitLimit defaults to 100_000) are not contradicted.
    • Import paths use @pump-fun/agent-payments-sdk, not internal module paths.

Supported Currencies

Currency Decimals Smallest unit example
USDC 6 1000000 = 1 USDC
Wrapped SOL 9 1000000000 = 1 SOL

Environment Variables

Create a .env (or .env.local for Next.js) file with the following:

# Solana RPC — server-side (used to build transactions and verify payments)
SOLANA_RPC_URL=https://rpc.solanatracker.io/public

# Solana RPC — client-side (used by wallet adapter in the browser)
NEXT_PUBLIC_SOLANA_RPC_URL=https://rpc.solanatracker.io/public

# The token mint address of your tokenized agent on pump.fun
AGENT_TOKEN_MINT_ADDRESS=<your-agent-mint-address>

# Payment currency mint
# USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
# SOL (wrapped): So11111111111111111111111111111111111111112
CURRENCY_MINT=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

RPC for mainnet-beta: The default Solana public RPC (https://api.mainnet-beta.solana.com) does not support sending transactions. You MUST ask the user which RPC endpoint to use. Present these free mainnet-beta options if the user does not have their own:

  • Solana Tracker — https://rpc.solanatracker.io/public
  • Ankr — https://rpc.ankr.com/solana

Do NOT silently pick one — wait for the user to confirm before proceeding.

Read these values from process.env at runtime. Never hard-code mint addresses or RPC URLs.

Install

npm install @pump-fun/[email protected] @solana/web3.js@^1.98.0

Dependency Compatibility — IMPORTANT

@pump-fun/agent-payments-sdk depends on @solana/web3.js and @solana/spl-token. When the app also installs these packages directly, mismatched versions can cause runtime errors.

Rules:

  1. Before installing @solana/web3.js, @solana/spl-token, or any @solana/wallet-adapter-* package, first check what versions @pump-fun/agent-payments-sdk declares in its own package.json (inspect it via npm info @pump-fun/agent-payments-sdk dependencies). Install the same ranges — or ranges that resolve to the same major.minor — so npm/pnpm hoists a single copy instead of two.
  2. Never blindly install "latest" for these shared packages. Always prefer the version that is most compatible with the latest @pump-fun/agent-payments-sdk.
  3. If the project already has these packages at different versions, align them to match the SDK and re-install.

SDK Setup

PumpAgent is the main class. It can build payment instructions and verify invoices.

import { PumpAgent } from "@pump-fun/agent-payments-sdk";
import { PublicKey } from "@solana/web3.js";

const agentMint = new PublicKey(process.env.AGENT_TOKEN_MINT_ADDRESS!);

Constructor

new PumpAgent(mint: PublicKey, environment?: "mainnet" | "devnet", connection?: Connection)
Parameter Type Default Description
mint PublicKey — The tokenized agent's token mint address
environment "mainnet" | "devnet" "mainnet" Network enviro
Полный SKILL.md на GitHub

Установить tokenized-agents в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SCENARIOS.mdSOURCE.mdTRUST.auto.yamlWALLET_INTEGRATION.mdreferences/SCENARIOS.mdreferences/WALLET_INTEGRATION.md

FAQ

Что делает скилл tokenized-agents?

Use when the user wants to charge users for actions. Use @pump-fun/agent-payments-sdk, to build Solana payment transactions, verify on-chain invoice payments, or integrate Solana wallet adapters for agent payment flows.

Как установить скилл tokenized-agents?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл tokenized-agents запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить tokenized-agents с