skills/pumpfun-trading/SKILL.md
Buy and sell tokens on Pump.fun bonding curves and AMM pools
npx skillsauth add x402agent/solana-clawd skills/pumpfun-tradingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute buy and sell trades on the Pump.fun protocol using the native Pump SDK. Supports both bonding curve trading (pre-graduation) and AMM pool trading (post-graduation).
nanosolana birthHELIUS_RPC_URL configuredBefore trading, always check if the token is on the bonding curve or has graduated:
const sdk = new OnlinePumpSdk(connection);
const summary = await sdk.fetchBondingCurveSummary(mint);
if (summary.isGraduated) {
// Use AMM trading instructions
} else {
// Use bonding curve trading instructions
}
import { OnlinePumpSdk, getBuyTokenAmountFromSolAmount } from "nanosolana";
import BN from "bn.js";
const sdk = new OnlinePumpSdk(connection);
// Fetch state
const [buyState, global, feeConfig] = await Promise.all([
sdk.fetchBuyState(mint, user),
sdk.fetchGlobal(),
sdk.fetchFeeConfig(),
]);
// Calculate expected tokens
const solAmount = new BN(100_000_000); // 0.1 SOL
const expectedTokens = getBuyTokenAmountFromSolAmount({
global, feeConfig,
mintSupply: buyState.bondingCurve.tokenTotalSupply,
bondingCurve: buyState.bondingCurve,
amount: solAmount,
});
// Build instructions
const buyIxs = await sdk.buyInstructions({
...buyState, mint, user,
amount: expectedTokens,
solAmount,
slippage: 0.05, // 5%
});
import { getSellSolAmountFromTokenAmount } from "nanosolana";
const [sellState, global, feeConfig] = await Promise.all([
sdk.fetchSellState(mint, user),
sdk.fetchGlobal(),
sdk.fetchFeeConfig(),
]);
const tokenAmount = new BN(1_000_000_000);
const expectedSol = getSellSolAmountFromTokenAmount({
global, feeConfig,
mintSupply: sellState.bondingCurve.tokenTotalSupply,
bondingCurve: sellState.bondingCurve,
amount: tokenAmount,
});
const sellIxs = await sdk.sellInstructions({
...sellState, mint, user,
amount: tokenAmount,
solAmount: expectedSol,
slippage: 0.05,
});
| Control | Value |
|---------|-------|
| Always use slippage | 3-5% recommended |
| Check bondingCurve.complete | Before trading |
| Use BN for all amounts | Never use JS number |
| Max position per trade | Follow Kelly Criterion |
| Circuit breaker | -10% daily → pause 24h |
Swarm agents with the sniper, momentum, and graduation roles use this skill automatically via the OODA trading loop.
development
Formally verify programs by writing Lean 4 proofs. Trigger this skill whenever the user wants to formally verify code, generate Lean 4 proofs, prove properties about algorithms or smart contracts, verify invariants, convert program logic into formal specifications, or anything involving Lean 4 and formal verification. Also trigger when the user mentions "qedgen", "lean proof", "formal proof", "verify my code", "prove correctness", "formal verification", or wants mathematical guarantees about their implementation.
data-ai
Orchestrate multi-bot trading swarms on Pump.fun with persona-driven agents
tools
End-to-end Solana development playbook (Jan 2026). Prefer Solana Foundation framework-kit (@solana/client + @solana/react-hooks) for React/Next.js UI. Prefer @solana/kit for all new client/RPC/transaction code. When legacy dependencies require web3.js, isolate it behind @solana/web3-compat (or @solana/web3.js as a true legacy fallback). Covers wallet-standard-first connection (incl. ConnectorKit), Anchor/Pinocchio programs, Codama-based client generation, LiteSVM/Mollusk/Surfpool testing, and security checklists.
development
Launch new tokens on Pump.fun directly via the Pump SDK