{
  "schemaVersion": "1.0",
  "item": {
    "slug": "solana-swaps",
    "name": "Solana Swaps",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/imthatcarlos/solana-swaps",
    "canonicalUrl": "https://clawhub.ai/imthatcarlos/solana-swaps",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/solana-swaps",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=solana-swaps",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/solana-swaps"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/solana-swaps",
    "agentPageUrl": "https://openagent3.xyz/skills/solana-swaps/agent",
    "manifestUrl": "https://openagent3.xyz/skills/solana-swaps/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/solana-swaps/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Solana Swaps",
        "body": "Manage your Solana wallet: check balances and swap tokens using the Jupiter aggregator."
      },
      {
        "title": "Environment Variables",
        "body": "These environment variables are pre-configured and available for use:\n\nVariableDescriptionSOLANA_KEYPAIR_PATHPath to wallet keypair JSON fileJUPITER_API_KEYJupiter API key for authenticated requests (avoids platform fees, required for Token2022/pump.fun tokens)\n\nNote: These are already set in the skill config. Just use $SOLANA_KEYPAIR_PATH and $JUPITER_API_KEY directly in commands."
      },
      {
        "title": "Verify Setup",
        "body": "# Check wallet address\nsolana address --keypair \"$SOLANA_KEYPAIR_PATH\"\n\n# Check Solana CLI config\nsolana config get"
      },
      {
        "title": "Check SOL Balance",
        "body": "solana balance --keypair \"$SOLANA_KEYPAIR_PATH\""
      },
      {
        "title": "List All Token Accounts",
        "body": "spl-token accounts --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")"
      },
      {
        "title": "Check Specific Token Balance",
        "body": "spl-token balance <TOKEN_MINT_ADDRESS> --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")"
      },
      {
        "title": "Common Token Mint Addresses",
        "body": "TokenSymbolMint AddressDecimalsWrapped SOLSOLSo111111111111111111111111111111111111111129USD CoinUSDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v6TetherUSDTEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB6BonkBONKDezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB2635JupiterJUPJUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN6RaydiumRAY4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R6"
      },
      {
        "title": "Token Swaps via Jupiter",
        "body": "CRITICAL: Always display swap details and wait for explicit user confirmation before executing any swap."
      },
      {
        "title": "Step 1: Get Quote",
        "body": "Convert human-readable amounts to raw units:\n\nSOL: multiply by 1,000,000,000 (10^9)\nUSDC/USDT: multiply by 1,000,000 (10^6)\nBONK: multiply by 100,000 (10^5)\n\n# Example: Get quote for swapping 1 SOL to USDC\nINPUT_MINT=\"So11111111111111111111111111111111111111112\"\nOUTPUT_MINT=\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\nAMOUNT=\"1000000000\"  # 1 SOL in lamports\nSLIPPAGE_BPS=\"50\"    # 0.5% slippage\n\n# Get quote with API key authentication\ncurl -s -H \"x-api-key: $JUPITER_API_KEY\" \\\n  \"https://api.jup.ag/swap/v1/quote?inputMint=${INPUT_MINT}&outputMint=${OUTPUT_MINT}&amount=${AMOUNT}&slippageBps=${SLIPPAGE_BPS}\" | jq ."
      },
      {
        "title": "Step 2: Display Quote and Request Confirmation",
        "body": "Parse the quote response and display to user:\n\nInput: amount and token name\nOutput: expected amount and token name\nPrice impact percentage\nSlippage tolerance\nMinimum received (otherAmountThreshold)\n\nIMPORTANT: Ask user \"Do you want to proceed with this swap?\" and wait for explicit confirmation (\"yes\", \"proceed\", \"confirm\") before continuing."
      },
      {
        "title": "Step 3: Build Swap Transaction",
        "body": "After user confirms, request the swap transaction:\n\nUSER_PUBKEY=$(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\n\n# Save quote response to file\nQUOTE_FILE=\"/tmp/jupiter_quote.json\"\ncurl -s -H \"x-api-key: $JUPITER_API_KEY\" \\\n  \"https://api.jup.ag/swap/v1/quote?inputMint=${INPUT_MINT}&outputMint=${OUTPUT_MINT}&amount=${AMOUNT}&slippageBps=${SLIPPAGE_BPS}\" > \"$QUOTE_FILE\"\n\n# Request swap transaction\ncurl -s -X POST \\\n  -H \"x-api-key: $JUPITER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  \"https://api.jup.ag/swap/v1/swap\" \\\n  -d \"{\n    \\\"quoteResponse\\\": $(cat $QUOTE_FILE),\n    \\\"userPublicKey\\\": \\\"${USER_PUBKEY}\\\",\n    \\\"dynamicComputeUnitLimit\\\": true,\n    \\\"prioritizationFeeLamports\\\": {\n      \\\"priorityLevelWithMaxLamports\\\": {\n        \\\"maxLamports\\\": 5000000,\n        \\\"priorityLevel\\\": \\\"high\\\"\n      }\n    }\n  }\" > /tmp/jupiter_swap.json\n\n# Extract the swap transaction\nSWAP_TX=$(cat /tmp/jupiter_swap.json | jq -r '.swapTransaction')"
      },
      {
        "title": "Step 4: Sign and Submit Transaction",
        "body": "Use the jupiter-swap.mjs script to sign and submit:\n\nnode \"$(dirname \"$0\")/scripts/jupiter-swap.mjs\" \\\n  --keypair \"$SOLANA_KEYPAIR_PATH\" \\\n  --transaction \"$SWAP_TX\"\n\nThe script will output the transaction signature and a Solscan link."
      },
      {
        "title": "Safety Rules",
        "body": "ALWAYS display swap details and wait for user confirmation before executing\nNEVER execute swaps automatically without explicit approval\nALWAYS check balance before attempting swaps to ensure sufficient funds\nWARN users if price impact exceeds 1%\nWARN users if slippage is set above 1% (100 bps)\nNEVER log, display, or transmit private key contents"
      },
      {
        "title": "Error Handling",
        "body": "ErrorCauseSolution\"Insufficient balance\"Not enough input tokensCheck balance, reduce swap amount\"Slippage tolerance exceeded\"Price moved during swapGet fresh quote, consider higher slippage\"Transaction expired\"Blockhash too oldGet fresh quote and retry immediately\"Account not found\"Missing token accountToken account will be created automatically\"Route not found\"No liquidity for pairTry smaller amount or different token\"Platform fee not supported\"Token2022 tokens block platform feesUse authenticated API with $JUPITER_API_KEY header"
      },
      {
        "title": "Retry Logic",
        "body": "If a swap fails due to network issues:\n\nWait 2-3 seconds\nGet a fresh quote (prices may have changed)\nRe-confirm with user showing new quote\nRetry the swap"
      },
      {
        "title": "Check Balance",
        "body": "User: \"What's my SOL balance?\"\n\nRun: solana balance --keypair \"$SOLANA_KEYPAIR_PATH\"\nReport: \"Your wallet has X.XXX SOL\""
      },
      {
        "title": "Swap Tokens",
        "body": "User: \"Swap 0.5 SOL for USDC\"\n\nGet wallet address\nFetch Jupiter quote for 0.5 SOL (500000000 lamports) -> USDC\nDisplay quote details:\n\nFrom: 0.5 SOL\nTo: ~XX.XX USDC (estimated)\nPrice Impact: X.XX%\nMinimum Received: XX.XX USDC\n\n\nAsk: \"Do you want to proceed with this swap?\"\nWait for confirmation\nOn \"yes\": Execute swap, report transaction link\nOn \"no\": Acknowledge cancellation"
      },
      {
        "title": "List All Tokens",
        "body": "User: \"Show me all my tokens\"\n\nRun: spl-token accounts --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\nFormat and display token list with balances"
      }
    ],
    "body": "Solana Swaps\n\nManage your Solana wallet: check balances and swap tokens using the Jupiter aggregator.\n\nEnvironment Variables\n\nThese environment variables are pre-configured and available for use:\n\nVariable\tDescription\nSOLANA_KEYPAIR_PATH\tPath to wallet keypair JSON file\nJUPITER_API_KEY\tJupiter API key for authenticated requests (avoids platform fees, required for Token2022/pump.fun tokens)\n\nNote: These are already set in the skill config. Just use $SOLANA_KEYPAIR_PATH and $JUPITER_API_KEY directly in commands.\n\nVerify Setup\n# Check wallet address\nsolana address --keypair \"$SOLANA_KEYPAIR_PATH\"\n\n# Check Solana CLI config\nsolana config get\n\nBalance Checking\nCheck SOL Balance\nsolana balance --keypair \"$SOLANA_KEYPAIR_PATH\"\n\nList All Token Accounts\nspl-token accounts --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\n\nCheck Specific Token Balance\nspl-token balance <TOKEN_MINT_ADDRESS> --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\n\nCommon Token Mint Addresses\nToken\tSymbol\tMint Address\tDecimals\nWrapped SOL\tSOL\tSo11111111111111111111111111111111111111112\t9\nUSD Coin\tUSDC\tEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\t6\nTether\tUSDT\tEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\t6\nBonk\tBONK\tDezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263\t5\nJupiter\tJUP\tJUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN\t6\nRaydium\tRAY\t4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R\t6\nToken Swaps via Jupiter\n\nCRITICAL: Always display swap details and wait for explicit user confirmation before executing any swap.\n\nStep 1: Get Quote\n\nConvert human-readable amounts to raw units:\n\nSOL: multiply by 1,000,000,000 (10^9)\nUSDC/USDT: multiply by 1,000,000 (10^6)\nBONK: multiply by 100,000 (10^5)\n# Example: Get quote for swapping 1 SOL to USDC\nINPUT_MINT=\"So11111111111111111111111111111111111111112\"\nOUTPUT_MINT=\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\nAMOUNT=\"1000000000\"  # 1 SOL in lamports\nSLIPPAGE_BPS=\"50\"    # 0.5% slippage\n\n# Get quote with API key authentication\ncurl -s -H \"x-api-key: $JUPITER_API_KEY\" \\\n  \"https://api.jup.ag/swap/v1/quote?inputMint=${INPUT_MINT}&outputMint=${OUTPUT_MINT}&amount=${AMOUNT}&slippageBps=${SLIPPAGE_BPS}\" | jq .\n\nStep 2: Display Quote and Request Confirmation\n\nParse the quote response and display to user:\n\nInput: amount and token name\nOutput: expected amount and token name\nPrice impact percentage\nSlippage tolerance\nMinimum received (otherAmountThreshold)\n\nIMPORTANT: Ask user \"Do you want to proceed with this swap?\" and wait for explicit confirmation (\"yes\", \"proceed\", \"confirm\") before continuing.\n\nStep 3: Build Swap Transaction\n\nAfter user confirms, request the swap transaction:\n\nUSER_PUBKEY=$(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\n\n# Save quote response to file\nQUOTE_FILE=\"/tmp/jupiter_quote.json\"\ncurl -s -H \"x-api-key: $JUPITER_API_KEY\" \\\n  \"https://api.jup.ag/swap/v1/quote?inputMint=${INPUT_MINT}&outputMint=${OUTPUT_MINT}&amount=${AMOUNT}&slippageBps=${SLIPPAGE_BPS}\" > \"$QUOTE_FILE\"\n\n# Request swap transaction\ncurl -s -X POST \\\n  -H \"x-api-key: $JUPITER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  \"https://api.jup.ag/swap/v1/swap\" \\\n  -d \"{\n    \\\"quoteResponse\\\": $(cat $QUOTE_FILE),\n    \\\"userPublicKey\\\": \\\"${USER_PUBKEY}\\\",\n    \\\"dynamicComputeUnitLimit\\\": true,\n    \\\"prioritizationFeeLamports\\\": {\n      \\\"priorityLevelWithMaxLamports\\\": {\n        \\\"maxLamports\\\": 5000000,\n        \\\"priorityLevel\\\": \\\"high\\\"\n      }\n    }\n  }\" > /tmp/jupiter_swap.json\n\n# Extract the swap transaction\nSWAP_TX=$(cat /tmp/jupiter_swap.json | jq -r '.swapTransaction')\n\nStep 4: Sign and Submit Transaction\n\nUse the jupiter-swap.mjs script to sign and submit:\n\nnode \"$(dirname \"$0\")/scripts/jupiter-swap.mjs\" \\\n  --keypair \"$SOLANA_KEYPAIR_PATH\" \\\n  --transaction \"$SWAP_TX\"\n\n\nThe script will output the transaction signature and a Solscan link.\n\nSafety Rules\nALWAYS display swap details and wait for user confirmation before executing\nNEVER execute swaps automatically without explicit approval\nALWAYS check balance before attempting swaps to ensure sufficient funds\nWARN users if price impact exceeds 1%\nWARN users if slippage is set above 1% (100 bps)\nNEVER log, display, or transmit private key contents\nError Handling\nError\tCause\tSolution\n\"Insufficient balance\"\tNot enough input tokens\tCheck balance, reduce swap amount\n\"Slippage tolerance exceeded\"\tPrice moved during swap\tGet fresh quote, consider higher slippage\n\"Transaction expired\"\tBlockhash too old\tGet fresh quote and retry immediately\n\"Account not found\"\tMissing token account\tToken account will be created automatically\n\"Route not found\"\tNo liquidity for pair\tTry smaller amount or different token\n\"Platform fee not supported\"\tToken2022 tokens block platform fees\tUse authenticated API with $JUPITER_API_KEY header\nRetry Logic\n\nIf a swap fails due to network issues:\n\nWait 2-3 seconds\nGet a fresh quote (prices may have changed)\nRe-confirm with user showing new quote\nRetry the swap\nExample Interactions\nCheck Balance\n\nUser: \"What's my SOL balance?\"\n\nRun: solana balance --keypair \"$SOLANA_KEYPAIR_PATH\"\nReport: \"Your wallet has X.XXX SOL\"\nSwap Tokens\n\nUser: \"Swap 0.5 SOL for USDC\"\n\nGet wallet address\nFetch Jupiter quote for 0.5 SOL (500000000 lamports) -> USDC\nDisplay quote details:\nFrom: 0.5 SOL\nTo: ~XX.XX USDC (estimated)\nPrice Impact: X.XX%\nMinimum Received: XX.XX USDC\nAsk: \"Do you want to proceed with this swap?\"\nWait for confirmation\nOn \"yes\": Execute swap, report transaction link\nOn \"no\": Acknowledge cancellation\nList All Tokens\n\nUser: \"Show me all my tokens\"\n\nRun: spl-token accounts --owner $(solana address --keypair \"$SOLANA_KEYPAIR_PATH\")\nFormat and display token list with balances"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/imthatcarlos/solana-swaps",
    "publisherUrl": "https://clawhub.ai/imthatcarlos/solana-swaps",
    "owner": "imthatcarlos",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/solana-swaps",
    "downloadUrl": "https://openagent3.xyz/downloads/solana-swaps",
    "agentUrl": "https://openagent3.xyz/skills/solana-swaps/agent",
    "manifestUrl": "https://openagent3.xyz/skills/solana-swaps/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/solana-swaps/agent.md"
  }
}