CA
SKILL.md

One file.
Full autonomy.

Copy this and send it to your agent. It handles the rest — wallet, launch, fees, buyback. All on-chain.

Why launch a token?

If you want revenue: Your token earns SOL from every trade. Platforms skim 35%; your agent keeps 100%. $10,000 daily volume ≈ $3,000/mo.

If you want autonomy: No API calls. No platform uptime to depend on. Direct to Solana. If pwump disappears, your agent keeps running.

If you want a sustainable loop: Fees → buybacks → more activity → more fees.

Revenue comparison.

Daily VolumePlatform (65%)pwump (100%)
$1,000~$195/mo~$300/mo
$10,000~$1,950/mo~$3,000/mo
$50,000~$9,750/mo~$15,000/mo
$100,000~$19,500/mo~$30,000/mo

pump.fun charges a 1% creator fee on every trade. With pwump, your agent keeps all of it.

Quick start.

01

Step 0 — Wallet Setup (one-time)

Your agent needs a persistent Solana wallet. It generates one on first run and reuses it forever.

typescript
import { Keypair } from "@solana/web3.js";
import fs from "fs";
import path from "path";

const WALLET_DIR  = path.join(process.cwd(), "wallets", "agent-1");
const WALLET_FILE = path.join(WALLET_DIR, "keypair.json");

function loadOrCreateWallet() {
  if (fs.existsSync(WALLET_FILE)) {
    const data = JSON.parse(fs.readFileSync(WALLET_FILE, "utf-8"));
    return Keypair.fromSecretKey(Uint8Array.from(data.secretKey));
  }
  fs.mkdirSync(WALLET_DIR, { recursive: true });
  const keypair = Keypair.generate();
  fs.writeFileSync(
    WALLET_FILE,
    JSON.stringify({
      publicKey: keypair.publicKey.toBase58(),
      secretKey: Array.from(keypair.secretKey),
    }, null, 2),
    { mode: 0o600 },
  );
  console.log("Fund:", keypair.publicKey.toBase58());
  return keypair;
}

const wallet = loadOrCreateWallet();
02

Step 1 — Wait for Funding (first run only)

Block until the wallet has enough SOL for rent and the create instruction.

typescript
import { Connection, LAMPORTS_PER_SOL } from "@solana/web3.js";

const connection = new Connection(
  "https://api.mainnet-beta.solana.com",
  "confirmed",
);

async function waitUntilFunded(publicKey, minSol = 0.025) {
  const minLamports = minSol * LAMPORTS_PER_SOL;
  while (true) {
    const balance = await connection.getBalance(publicKey);
    if (balance >= minLamports) return balance;
    await new Promise((r) => setTimeout(r, 5000));
  }
}
03

Step 2 — Upload Metadata & Launch Token

Upload to pump.fun's IPFS, build the create instruction with the SDK, sign, and send.

typescript
import { Keypair, Transaction } from "@solana/web3.js";
import { PumpFunSDK } from "@pump-fun/pump-sdk";

const form = new FormData();
form.append("file", imageBlob, "icon.png");
form.append("name", TOKEN_NAME);
form.append("symbol", TOKEN_SYMBOL);
form.append("description", TOKEN_DESCRIPTION);

const { metadataUri } = await fetch("https://pump.fun/api/ipfs", {
  method: "POST",
  body: form,
}).then((r) => r.json());

const sdk = new PumpFunSDK({ connection });
const mintKeypair = Keypair.generate();

const { instructions } = await sdk.createInstruction(
  wallet.publicKey,
  TOKEN_NAME,
  TOKEN_SYMBOL,
  metadataUri,
  { unitLimit: 250_000, unitPrice: 250_000 },
);

const tx = new Transaction().add(...instructions);
tx.sign(wallet, mintKeypair);
await connection.sendRawTransaction(tx.serialize());
04

Step 3 — Claim Creator Fees

Periodically pull every fee earned into the agent's wallet.

typescript
async function claimFees(mintAddress) {
  const fees = await sdk.claimCreatorFee(wallet, mintAddress);
  if (fees > 0) console.log("Claimed", fees, "SOL");
  return fees;
}

setInterval(() => claimFees(mintAddress), 30 * 60 * 1000);
05

Step 4 — Buy Back Own Token

Sweep claimed fees back into the same token. No other coins. Ever.

typescript
async function buyback(mintAddress) {
  const balance = await connection.getBalance(wallet.publicKey);
  const buyAmount = balance - 0.01 * LAMPORTS_PER_SOL;
  if (buyAmount <= 0) return;
  await sdk.buyToken(wallet, mintAddress, buyAmount);
}
Allowed
  • Create tokens on pump.fun
  • Claim creator fees from own tokens
  • Buy back own token using claimed fees
  • Manage its persistent wallet
Forbidden
  • Trade or buy other tokens
  • Sell own token
  • Use external SOL for buybacks
  • Share or expose wallet private keys
  • Send SOL to any non-pump.fun address

SDK reference.

pwump uses the @pump-fun/pump-sdk package.

  • createInstruction(creator, name, symbol, uri, opts)

    Creates a new token on pump.fun.

  • buyToken(wallet, mint, amountInLamports)

    Buys tokens on pump.fun using SOL.

  • claimCreatorFee(wallet, mint)

    Claims accumulated creator fees for a token you created.