← 返回 Skills 市场
graveyardprotocol

Graveyard Protocol CLI

作者 Graveyard Protocol · GitHub ↗ · v1.2.2 · MIT-0
cross-platform ✓ 安全检测通过
160
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install gp-cli-skill
功能描述
Close empty Solana SPL token accounts and reclaim locked rent SOL back to your wallet, track Ghost Point earnings, claim SOUL tokens at the end of each weekl...
使用说明 (SKILL.md)

\r \r

Graveyard Protocol CLI (gp-cli)\r

\r gp-cli is an open-source command-line tool for interacting with Graveyard Protocol on Solana. It scans your wallets for empty SPL token accounts, closes them in\r batches, and returns the locked rent SOL to your wallet. Ghost Points are earned per closed account and accumulate toward weekly SOUL token distributions.\r \r

Source Code\r

\r The gp-cli tool is open source and its implementation can be reviewed publicly.\r \r Repository:\r https://github.com/graveyardprotocol/gp-cli\r \r The CLI builds and signs the transactions locally and only submits signed\r transactions to the Graveyard Protocol backend. Private keys are never\r transmitted over the network.\r \r

[!IMPORTANT]\r This skill only instructs agents to execute the gp-cli command-line tool. \r The gp-cli tool has --json mode for all the command outputs for better machine readability. Agents can use this option for parsing results programmatically.\r \r

Install and Set up requirements\r

\r

npm install -g @graveyardprotocol/gp-cli\r
```\r
\r
If installed globally, agent can use the shorter `gp` command:\r
\r
```bash\r
gp add-wallet --keypair-file id.json --name "Main wallet" --json\r
```\r
\r
Requires Node.js >= 20.\r
\r
## Add/Remove Wallets\r
You can add as many wallets you want for rent reclaimation. Any wallet keypair is registered once and the CLI encrypts it with AES-256-GCM (PBKDF2 key derivation,\r
100 000 iterations) and stores it locally in `~/.gp-cli/wallets.json`.  \r
\r
```bash\r
gp add-wallet --keypair-file ~/.config/solana/id.json --name "Main Wallet" --json \r
\r
gp list-wallets --json                      # show all saved wallets\r
\r
gp remove-wallet --wallet \x3Caddress> --json  # remove wallet\r
```\r
\r
## Close Empty Token Accounts\r
\r
Scan all or a specified wallet for empty SPL token accounts and close them, returning locked rent to the respective wallet(s). `-y or --yes` option provide auto confirmation to the `Close empty accounts?` interactive prompt.\r
\r
```bash\r
gp close-empty --wallet \x3Caddress> --yes --json    # target a specific walletskip confirmation prompt\r
\r
gp close-empty --all -y --json                 # all saved wallets, auto-confirm\r
\r
gp close-empty --wallet \x3Caddress> --dry-run --yes --json  # preview — no transactions sent\r
```\r
\r
**Flow:**\r
1. Operator or agent adds as many wallets for rent reclaimation during config setup.\r
2. Agent runs Close-empty command. \r
3. Based on the command options, Backend scans the wallet(s) on-chain for empty token accounts\r
4. CLI provides scan summary as received from backend (accounts found, SOL to reclaim, protocol fee, Ghost Points to earn) and asks for confirmation in case `-y` or `--yes` option was not used. \r
5. If confirmed, CLI builds Transaction batches based on total number of accounts; the CLI signs each batch locally and sends only the signed bytes to backend.\r
6. Backend submits batches of signed transactions only and returns results to agent\r
\r
**Protocol economics per batch:**\r
\r
| Item | Value |\r
|---|---|\r
| Protocol fee | 20% of reclaimed rent |\r
| You receive |  80% of total locked SOL |\r
| Ghost Points | 100 points per closed account |\r
\r
\r
## Check Stats\r
\r
Show Ghost Point earnings, SOL reclaimed, and SOUL allocations for the\r
current and previous epoch, plus lifetime totals.\r
\r
```bash\r
gp stats --wallet \x3Caddress> --json           # specific wallet (saved or any address)\r
\r
gp stats --all --json                        # summary JSON for all saved wallets\r
\r
gp stats --wallet \x3Caddress> --yes --json     # auto-write CSV without prompting\r
\r
gp stats --wallet \x3Caddress> --csv-out ~/report.csv --json   # write CSV to path\r
```\r
\r
Stats output includes:\r
\r
- **Lifetime:** total accounts closed, total SOL recovered, total SOUL claimed\r
- **Current epoch:** accounts closed, SOL earned, Ghost Points, Ghost share %\r
- **Previous epoch:** same fields, plus SOUL allocated and claim state\r
\r
Epochs run weekly starting Monday 00:00 UTC.\r
\r
## Claim SOUL Tokens\r
\r
At the close of each weekly epoch, SOUL tokens are distributed\r
proportionally based on each wallet's share of total Ghost Points earned.\r
Use `gp claim-soul` to claim them on-chain.\r
\r
```bash\r
gp claim-soul --wallet \x3Caddress> --json      # specific wallet\r
\r
gp claim-soul --all --json                   # claim for all saved wallets\r
\r
gp claim-soul --wallet \x3Caddress> --dry-run --json  # preview amount — no tx sent\r
```\r
\r
**Important:** SOUL transfers are signed and submitted entirely in the\r
Graveyard Protocol backend by Project's Community Wallet keys — no local keypair signing is required.\r
\r
Before claiming, the CLI shows:\r
- Epoch period\r
- Accounts closed and SOL earned that epoch\r
- Your Ghost Points and share % of the epoch total\r
- SOUL amount to be claimed\r
\r
## Agent / CI Usage\r
\r
Combine `--all`, `--wallet`, `--yes`, and `--json` command options for fully unattended agent/CI pipelines.\r
\r
```bash\r
# Add a wallet non-interactively\r
gp add-wallet --keypair-file ~/.config/solana/id.json --name "Bot" --json\r
\r
# Close empty accounts — auto-confirm, JSON output\r
gp close-empty --wallet \x3Caddress> --yes --json\r
\r
# Close for all wallets\r
gp close-empty --all --yes --json\r
\r
# Fetch stats as JSON\r
gp stats --wallet \x3Caddress> --json\r
gp stats --all --json\r
\r
# Claim SOUL (auto-confirms in JSON mode)\r
gp claim-soul --wallet \x3Caddress> --json\r
gp claim-soul --all --json\r
```\r
\r
## Structured Output\r
\r
Every command supports `--json` for machine-readable output. The default\r
human-readable output uses ANSI formatting, tables, and colour — suitable\r
for direct reading. Use `--json` when scripting or chaining commands.\r
\r
When `--all` is used with `close-empty`, one JSON object is emitted per\r
wallet as it completes (newline-delimited JSON), so results can be streamed\r
and parsed in real time.\r
\r
**`gp add-wallet --json`**\r
```json\r
{ "success": true, "publicKey": "...", "encrypted": true, "name": "Bot" }\r
```\r
\r
**`gp list-wallets --json`**\r
```json\r
{\r
  "success": true,\r
  "wallets": [{ "publicKey": "...", "name": "Bot", "encrypted": false }]\r
}\r
```\r
\r
**`gp close-empty --json`**\r
```json\r
{\r
  "success": true,\r
  "wallet": "...",\r
  "dryRun": false,\r
  "totalBatches": 3,\r
  "transactionsSucceeded": 3,\r
  "transactionsFailed": 0,\r
  "accountsClosed": 42,\r
  "solReclaimed": 0.085764,\r
  "results": [\r
    {\r
      "intentID": "...",\r
      "txSignature": "...",\r
      "batchAccountsClosed": 14,\r
      "batchRentSol": 0.028588,\r
      "success": true\r
    }\r
  ]\r
}\r
```\r
\r
**`gp stats --json`**\r
```json\r
{\r
  "success": true,\r
  "wallets": [{\r
    "walletAddress": "...",\r
    "description": "",\r
    "userStats": {\r
      "totalAccountsClosed": 120,\r
      "totalSolsRecovered": 0.244800,\r
      "totalSoulClaimed": 5.000000\r
    },\r
    "currentEpoch": {\r
      "epochStartDate": 20260324,\r
      "userGhostEarned": 4200,\r
      "userGhostReferrals": 420,\r
      "userGhostTotal": 4620,\r
      "userAccountsClosed": 42,\r
      "userSolsRecovered": 0.085764,\r
      "totalUsers": 1337,\r
      "totalGhostEarned": 9999999,\r
      "ghostSharePct": "0.0462"\r
    },\r
    "previousEpoch": {\r
      "epochStartDate": 20260317,\r
      "userGhostEarned": 3000,\r
      "userGhostReferrals": 300,\r
      "userGhostTotal": 3300,\r
      "userAccountsClosed": 30,\r
      "userSolsRecovered": 0.061200,\r
      "userSoul": 1.234567,\r
      "claimState": "No",\r
      "totalUsers": 1200,\r
      "totalGhostEarned": 8500000,\r
      "totalSoul": 10000.000000,\r
      "ghostSharePct": "0.0388"\r
    }\r
  }]\r
}\r
```\r
\r
**`gp claim-soul --json`**\r
```json\r
{\r
  "success": true,\r
  "wallets": [{\r
    "wallet": "...",\r
    "status": "claimed",\r
    "epochStartDate": 20260317,\r
    "soulClaimed": 1.234567,\r
    "txSignature": "..."\r
  }]\r
}\r
```\r
\r
**`claim-soul` status values:**\r
\r
| Status | Meaning |\r
|---|---|\r
| `claimed` | SOUL successfully claimed on-chain |\r
| `dry_run` | Dry-run preview — no transaction submitted |\r
| `already_claimed` | SOUL was already claimed for this epoch |\r
| `in_progress` | A claim is currently in flight |\r
| `no_soul` | No SOUL allocated for this wallet this epoch |\r
| `no_epoch` | No previous epoch data found |\r
| `aborted` | User declined the interactive confirm prompt |\r
| `error` | Unexpected failure — see `.error` field |\r
\r
On any error:\r
```json\r
{ "success": false, "error": "..." }\r
{ "success": false, "wallet": "...", "error": "..." }\r
```\r
\r
## Epochs & Ghost Points\r
\r
Epochs run weekly, starting Monday 00:00 UTC. Ghost Points are earned at\r
100 points per closed account. At epoch close, SOUL tokens are distributed proportionally based on\r
each wallet's share of total Ghost Points.\r
\r
Use `gp stats` to track your Ghost share % for the current and previous epoch, and\r
`gp claim-soul` to collect SOUL allocated for the previous epoch.\r
\r
## Tips\r
\r
- **Check before closing.** Use `--dry-run` on `close-empty` first as a simulation\r
  before any transaction is submitted.\r
- **`--json` requires `--wallet` or `--all`.** In JSON mode the interactive\r
  wallet picker is suppressed. Always pass an explicit wallet address or\r
  `--all` flag.\r
- **`--json` auto-confirms.** In JSON mode the "close accounts?" and "claim\r
  SOUL?" prompts can be skipped by using `--yes` as default response— transactions proceed automatically.\r
- **No signing for SOUL claims.** `gp claim-soul` does not require\r
  your keypair for signing. Your wallet public-key is sufficient. The SOUL tokens are transferred from Project's Community Wallet making it the transaction Signer and The backend handles signing entirely. \r
- If the encrypted wallet key cannot be decrypted for transaction signing due to any reason such as data corruption, you can remove and re-add the\r
  wallets — on-chain history and funds are unaffected.\r
- **`epochStartDate` is an integer in `YYYYMMDD` format** — e.g. `20260317`\r
  means 17 March 2026. Parse it as a string when formatting dates.\r
- **`solReclaimed` is already net of the 20% protocol fee** in the\r
  `close-empty` JSON output. The `batchRentSol` fields in `results[]` also\r
  reflect the net amount returned to the wallet.\r
\r
## Agent Safety Guidelines\r
\r
Agents using this skill MUST follow these restrictions:\r
\r
- Do not read, modify or access `~/.gp-cli/wallets.json` directly\r
- Do not request or expose private keys by any means\r
- Do not pass private keys on the command line\r
- Only execute documented `gp` commands\r
\r
## Security Model\r
\r
CLI stores the wallets in  `~/.gp-cli/wallets.json` (file mode `600`, readable only by the owner) which is encrypted at rest with AES-256-GCM (PBKDF2 key derivation, 100 000 iterations).\r
\r
Agent does not access `~/.gp-cli/wallets.json` file directly. It instead uses add, remove and list commands for wallet operations. Agent can only provide the path to keypair json file when adding the wallet to gp-cli configuration.\r
\r
Transactions are build and signed locally within the CLI. Only signed transactions are submitted to the Graveyard Protocol backend. Private keys are not transmitted in any form.\r
\r
\r
## Troubleshooting\r
\r
**"Scan cache expired — please rescan"**\r
The batch count endpoint returned 0 after a successful scan. You may need to run\r
`gp close-empty` again — the cache has a short TTL.\r
\r
**"No empty token accounts found"**\r
The wallet has no empty SPL token accounts to close. Nothing to do.\r
\r
**"Failed to decrypt wallet"**\r
The wallet entry is corrupted. Run\r
`gp remove-wallet` and `gp add-wallet` to re-add the wallet.\r
\r
**Network errors / `Non-JSON response`**\r
The Graveyard Protocol API at `https://api.graveyardprotocol.io` was\r
unreachable or returned an unexpected response. Check connectivity and\r
retry.\r
安全使用建议
This skill appears coherent for its stated purpose, but it requires access to private key files and will store encrypted keypairs locally. Before installing or allowing an agent to run it: (1) Inspect the gp-cli repository and release artifacts (https://github.com/graveyardprotocol/gp-cli) or install from a trusted package registry; (2) Avoid giving the agent your raw private key unless you trust the environment — consider using a throwaway or watch-only address first; (3) Verify that only signed transaction bytes (not private keys) are transmitted to the backend; (4) Review the local storage (~/.gp-cli/wallets.json) and the CLI's encryption implementation if you will keep real funds; (5) Prefer manual runs on an air-gapped or developer machine or use hardware wallet / offline signing if possible. If you need a higher-assurance recommendation, share the gp-cli source code or release tag and I can highlight places to audit (signing, network endpoints, and storage format).
能力标签
cryptorequires-wallet
能力评估
Purpose & Capability
Name/description (close empty SPL token accounts, reclaim rent SOL, track/claim rewards) match the instructions. Required binaries (node, npx, gp-cli) and the command-line workflow are proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs agents to run gp-cli commands that (a) read user keypair files (e.g. --keypair-file ~/.config/solana/id.json), (b) store encrypted keypairs locally (~/.gp-cli/wallets.json), (c) build and locally sign transactions and then submit signed bytes to the Graveyard backend. This scope is expected for a wallet-management CLI, but it does require the agent to access private key files — a sensitive action that users should explicitly permit and monitor.
Install Mechanism
Instruction-only skill (no install spec and no code files). The README advises npm install -g @graveyardprotocol/gp-cli which is an expected distribution method for a Node CLI; no arbitrary download or extract URLs are present in the skill itself.
Credentials
The skill declares no required environment variables or external credentials, which is consistent. However, it relies on local private key files and creates an encrypted wallets file on disk; these are sensitive artifacts (private keys) and are justified by the tool's function but should be treated carefully by users.
Persistence & Privilege
The skill does not request always:true or elevated platform privileges. It writes to its own local storage (~/.gp-cli/wallets.json) and does not modify other skills or system-wide agent config. Normal autonomous invocation remains enabled (platform default).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gp-cli-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gp-cli-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.2
gp-cli-skill 1.2.2 - Documentation and SKILL metadata updated for improved clarity and security transparency. - Added explicit details on security practices: wallet storage, private key handling, and local transaction signing. - Provided direct link to source repository for reference. - Simplified and clarified command usage and configuration instructions. - Tightened skill description and removed redundant or outdated sections. - Removed --nopwd option completely for improved security.
v1.2.1
gp-cli-skill v1.2.1 - Added gp-cli as a required executable under openclaw metadata. - Improved documentation to clarify wallet encryption: each wallet can have its own password, which is not stored; using `--no-pwd` is recommended for fully automated use-cases where agents cannot handle password management. - Updated agent and CI usage notes for clarity on wallet encryption vs unencrypted handling. - Enhanced security transparency: confirmed private keys never transmitted; transactions are signed locally only. - Expanded instructions and examples for agent interaction and non-interactive usage, especially regarding JSON mode and command flags.
v1.2.0
gp-cli-skill v1.2.0 gp-cli is a command-line tool for interacting with Graveyard Protocol on Solana. It scans your wallets for empty SPL token accounts, closes them in batches, and returns the locked rent SOL to you — keeping ~80% for you and taking a 20% protocol fee. Ghost Points are earned per closed account and accumulate toward weekly SOUL token distributions. Changelog: - Adds CSV export support to stats output with --csv-out option. - Enhanced documentation for all commands and parameters, including wallet management, stats, and SOUL claiming. - Emphasizes use of --json flag for automated and non-interactive use cases. - Clarifies details around security (key storage and encryption), protocol fees, and SOUL claiming flows. - Improved machine-readable output examples for integration into CI and scripting workflows.
元数据
Slug gp-cli-skill
版本 1.2.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Graveyard Protocol CLI 是什么?

Close empty Solana SPL token accounts and reclaim locked rent SOL back to your wallet, track Ghost Point earnings, claim SOUL tokens at the end of each weekl... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 160 次。

如何安装 Graveyard Protocol CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gp-cli-skill」即可一键安装,无需额外配置。

Graveyard Protocol CLI 是免费的吗?

是的,Graveyard Protocol CLI 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Graveyard Protocol CLI 支持哪些平台?

Graveyard Protocol CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Graveyard Protocol CLI?

由 Graveyard Protocol(@graveyardprotocol)开发并维护,当前版本 v1.2.2。

💬 留言讨论