# Send Solana Easy Swap to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "solana-easy-swap",
    "name": "Solana Easy Swap",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/in-liberty420/solana-easy-swap",
    "canonicalUrl": "https://clawhub.ai/in-liberty420/solana-easy-swap",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/solana-easy-swap",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=solana-easy-swap",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "examples/agent-prompt.md",
      "package-lock.json",
      "package.json",
      "scripts/swap.mjs"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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-easy-swap"
    },
    "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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/solana-easy-swap",
    "downloadUrl": "https://openagent3.xyz/downloads/solana-easy-swap",
    "agentUrl": "https://openagent3.xyz/skills/solana-easy-swap/agent",
    "manifestUrl": "https://openagent3.xyz/skills/solana-easy-swap/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/solana-easy-swap/agent.md"
  }
}
```
## Documentation

### Solana Easy Swap

Swap any Solana token from chat. Say "swap 1 SOL for USDC" and it handles everything — quoting, signing, sending, confirming. No API keys, no wallet extensions, no setup beyond a keypair. Powered by Jupiter.

### Setup

First run: Install dependencies (automatic if install spec is supported, otherwise manual):

cd {baseDir} && npm install --production

Required env var:

SOLANA_KEYPAIR_PATH — path to a Solana keypair JSON file (standard solana-keygen format). This skill reads your keypair to sign transactions. Only use with a keypair you trust this skill to access.

Optional env vars:

SOLANA_RPC_URL — custom RPC endpoint (default: https://api.mainnet-beta.solana.com)
OSS_DEFAULT_SLIPPAGE_BPS — default slippage in basis points (default: 100 = 1%)
OSS_PRIORITY_FEE_FLOOR — minimum priority fee in lamports (default: 50000)

No API keys required. Jupiter is used unauthenticated.

### Common Token Mints

TokenMintSOL (wrapped)So11111111111111111111111111111111111111112USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vUSDTEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB

For other tokens, ask the user for the mint address.

### 1. Prepare

node {baseDir}/scripts/swap.mjs prepare \\
  --from So11111111111111111111111111111111111111112 \\
  --to EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \\
  --amount 1000000000 \\
  --slippage 100

Returns JSON:

{
  "prepareId": "abc123",
  "expectedOut": "150230000",
  "minOut": "148727700",
  "priceImpact": "0.01",
  "expiresAt": "2025-02-13T20:00:00Z",
  "summary": {
    "from": "1 SOL",
    "to": "~150.23 USDC",
    "minReceived": "148.73 USDC",
    "slippage": "1%",
    "priceImpact": "0.01%",
    "destination": "owner"
  }
}

Always show the summary to the user and wait for confirmation before executing.

If priceImpact > 1%, warn the user explicitly.

### 2. Execute

After user confirms:

node {baseDir}/scripts/swap.mjs execute --prepareId abc123

Returns JSON:

{
  "signature": "5UzV...",
  "submittedAt": "2025-02-13T19:58:12Z"
}

### 3. Status (poll until confirmed)

node {baseDir}/scripts/swap.mjs status --signature 5UzV...

Returns JSON:

{
  "state": "confirmed",
  "slot": 123456789,
  "confirmationStatus": "finalized"
}

States: submitted → confirmed | failed | expired | unknown

### 4. Receipt

node {baseDir}/scripts/swap.mjs receipt --signature 5UzV...

Returns JSON with actual amounts swapped, fees, and a Solscan link.

### Error Handling

All commands return JSON with error field on failure:

{
  "error": {
    "code": "INSUFFICIENT_SOL",
    "message": "Not enough SOL for fees. Have 0.001, need ~0.006",
    "retryable": false
  }
}

Error codes and retry guidance:

CodeRetry?ActionINVALID_INPUTNoFix the inputINSUFFICIENT_SOLNoTell user they need more SOLKEYPAIR_NOT_FOUNDNoCheck SOLANA_KEYPAIR_PATH is setKEYPAIR_INVALIDNoCheck keypair file formatPREPARE_EXPIREDYesRun prepare again, re-confirm with userPREPARE_ALREADY_EXECUTEDNoThis swap was already sentBACKEND_UNAVAILABLEYesWait 3s, retry prepare up to 2xBACKEND_QUOTE_FAILEDNoNo route — tell user (bad pair or no liquidity)TX_EXPIREDYesRun prepare again, re-confirm with userTX_BROADCAST_FAILEDYesRetry execute once (if not expired)TX_FAILED_ONCHAINNoSwap failed (e.g., slippage). Do NOT retry.RPC_UNAVAILABLEYesWait 3s, retry up to 2x

### Agent Guidelines

Always confirm before executing. Show the user the summary from prepare and wait for explicit "yes" / "go" / "confirm".
Never auto-retry failed onchain transactions. If TX_FAILED_ONCHAIN, the tx landed and failed — retrying sends a new tx.
Re-confirm on re-prepare. If you need to prepare again (expired quote), show the new summary — prices may have changed.
Handle amounts in base units. SOL = 9 decimals (1 SOL = 1000000000), USDC = 6 decimals (1 USDC = 1000000).
Ask for mint addresses if the user mentions a token you don't recognize. Don't guess.
Report the Solscan link after confirmation: https://solscan.io/tx/{signature}

### Security

This skill signs transactions using the configured keypair. It does NOT create, import, or manage keys.
Keypair material is never logged, echoed, or included in any output.
Third-party destinations require explicit --allowThirdParty flag.
All swaps enforce slippage protection via minOut.
Prepared swaps expire after 120 seconds by default.

### Limitations (v1)

Jupiter unauthenticated API — Token2022 and pump.fun tokens may not work.
No best-price routing — takes whatever Jupiter returns.
Receipt amounts are best-effort (derived from pre/post balance diffs).
Solana mainnet only.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: in-liberty420
- Version: 1.0.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/solana-easy-swap)
- [Send to Agent page](https://openagent3.xyz/skills/solana-easy-swap/agent)
- [JSON manifest](https://openagent3.xyz/skills/solana-easy-swap/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/solana-easy-swap/agent.md)
- [Download page](https://openagent3.xyz/downloads/solana-easy-swap)