← 返回
未分类 Key 中文

Labor Solana skill: Solana ecosystem

Transfers native SOL on Solana to a recipient address using a funded signing key from environment configuration. Use when the user asks to send SOL, transfer...
在 Solana 上使用环境中已注入资金的签名密钥将原生 SOL 转账至收款地址。当用户请求发送 SOL、转账时使用。
0xxbrain01 0xxbrain01 来源
未分类 clawhub v1.0.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 466
下载
💾 0
安装
1
版本
#latest

概述

Solana native SOL transfer

When to use

Apply this skill when the user wants to send native SOL (not SPL tokens) from

their wallet to another Solana address.

Preconditions

  1. Node.js is available on PATH (node).
  2. User has set SOLANA_PRIVATE_KEY (see README — never commit or paste keys

into chat). Optionally set SOLANA_RPC_URL (defaults to public devnet).

  1. Dependencies installed once in this skill folder: npm install (or npm ci).
  2. This skill uses TypeScript source compiled to JavaScript via npm run build

and does not require Solana CLI (solana) or Python.

Safety

  • Do not echo, log, or copy the private key. Use env vars or OpenClaw secrets only.
  • Prefer devnet for testing. For mainnet-beta, require explicit user

confirmation and a SOLANA_RPC_URL pointing at mainnet (or user clearly opts in).

  • Reject transfers to invalid addresses. Confirm recipient and amount with the user

for non-trivial sums.

How to run the transfer

From the directory that contains this SKILL.md (skill root), after npm install:

SOLANA_RPC_URL="${SOLANA_RPC_URL:-https://api.devnet.solana.com}" \
SOLANA_PRIVATE_KEY="<set-by-user-or-secrets>" \
npm run transfer -- --to "<RECIPIENT_PUBKEY>" --sol "<AMOUNT_SOL>"
  • --to — base58 public key of the recipient.
  • --sol — amount in SOL (decimal string or number, e.g. 0.01).
  • Optional: --rpc overrides SOLANA_RPC_URL.

On success, report the signature (transaction id) and a Solscan

link (explorerUrl in CLI output) using the appropriate cluster (devnet vs mainnet-beta).

On failure, report the error message from the script without exposing secrets.

Execution constraints (important)

  • Use only this command path: npm run transfer -- --to ... --sol ....
  • Do not switch to scripts/transfer_sol.py, .skill bundles, or any Python flow.
  • Do not require solana CLI for this skill; transfers are sent via @solana/web3.js.

Mandatory user-facing workflow

Always show a visible step plan before execution and mark completed steps with a

green indicator.

Use this exact checklist style in chat:

  • 🟩 Step 1 - Collect input when done, otherwise ⬜ Step 1 - Collect input
  • 🟩 Step 2 - Validate input when done, otherwise ⬜ Step 2 - Validate input
  • 🟩 Step 3 - User confirmation when done, otherwise ⬜ Step 3 - User confirmation
  • 🟩 Step 4 - Execute transfer when done, otherwise ⬜ Step 4 - Execute transfer
  • 🟩 Step 5 - Report result when done, otherwise ⬜ Step 5 - Report result

Step 1 - Collect input (ask if missing)

Required input:

  • recipient address (to)
  • amount in SOL (sol)
  • network (devnet or mainnet-beta, default devnet)

If any field is missing, ask follow-up questions. Do not execute until all fields

are present.

Step 2 - Validate input

Validate:

  • recipient is a valid base58 Solana address
  • amount is numeric and positive
  • network is one of: devnet, mainnet-beta

If validation fails, explain the exact invalid field and stop.

Step 3 - User confirmation (strict gate)

Before running any command, send a confirmation summary and ask user to confirm:

  • To: recipient
  • Amount: SOL amount
  • Network: selected network
  • Source wallet: signer public key (if available)

Only continue on explicit confirmation such as: confirm, yes, or equivalent.

If user rejects/corrects any value, cancel current run and return to Step 1.

Step 4 - Execute transfer

Run only after confirmation:

SOLANA_RPC_URL="${SOLANA_RPC_URL:-https://api.devnet.solana.com}" \
SOLANA_PRIVATE_KEY="<set-by-user-or-secrets>" \
npm run transfer -- --to "<RECIPIENT_PUBKEY>" --sol "<AMOUNT_SOL>"

Step 5 - Report result

If transaction succeeds, the response must include:

  • Successfully + icon ( or 🎉)
  • transaction signature
  • explorer URL
  • network and amount

Success response template:

✅ Successfully transferred SOL to on .

If transaction fails, report concise failure reason and suggest the next safe action

(retry with corrected input, check balance, or switch network).

Response style (concise + polished)

Keep all user-facing messages short, clear, and visually clean.

  • Max 4-6 lines per response.
  • Use compact bullets (-) or short blocks; no long paragraphs.
  • Show only essential fields: amount, to, network, signature, explorer URL.
  • For confirmations, ask one short yes/no question.

Confirmation message format

Use this exact compact template before execution:

Confirm this transaction?

- Amount: SOL

- To:

- Network:

Reply: yes / no

Success message format

Use this exact compact template on success:

✅ Successfully transferred SOL

- To:

- Network:

- Signature:

- Explorer:

Failure message format

Use this exact compact template on failure:

❌ Transfer failed:

- Network:

- Next: check amount/address/balance and confirm to retry

Extending this skill

Implementation lives under src/ (shared Solana helpers) and scripts/ (one thin entry per user-facing command). Add new Solana features by new modules + a new script, then update this file so the agent knows when to use them.

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-03 07:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 845 📥 327,574
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,124 📥 877,409
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,413 📥 325,623