rhaios-staging

Interact with the Rhaios staging REST API for yield operations. Discover -> prepare -> setup-if-needed -> sign -> execute flow with pluggable signer backend. Triggers on requests involving DeFi yield, vault deposits, redeems, rebalancing, or Rhaios API.

3,891 stars
Complexity: medium

About this skill

This AI agent skill is designed to enable automated interaction with the Rhaios staging REST API, specifically for Decentralized Finance (DeFi) yield management. It orchestrates a complete workflow from discovering available yield opportunities to the final execution of transactions. The process involves multiple steps: discovering relevant operations, preparing the transaction details, performing any necessary setup, signing the transaction using a flexible backend (either Privy wallet integration or a direct private key), and finally executing the operation on the Rhaios staging environment. The primary use cases for this skill revolve around automating complex DeFi strategies on the Rhaios platform. This includes programmatically managing vault deposits, initiating redeems from yield-generating vaults, and intelligently rebalancing portfolios based on predefined strategies or market conditions. By abstracting the complexities of direct API interaction and integrating secure signing mechanisms, it empowers AI agents to perform sophisticated financial operations autonomously. Users would leverage this skill to enhance the efficiency and scalability of their DeFi yield strategies within the Rhaios ecosystem. It's particularly useful for developers and quantitative strategists who need to test and refine their automated trading bots or yield farming protocols in a controlled, non-production staging environment. The pluggable signer backend ensures robust security and flexibility, accommodating different operational security requirements.

Best use case

The primary use case is the automation and testing of DeFi yield management strategies within the Rhaios staging environment. This skill benefits DeFi developers, quantitative analysts, and automated trading system operators who aim to programmatically manage digital asset vaults, execute rebalancing strategies, and handle deposits or redemptions with minimal manual intervention. It's ideal for iterating on strategies before deploying to production.

Interact with the Rhaios staging REST API for yield operations. Discover -> prepare -> setup-if-needed -> sign -> execute flow with pluggable signer backend. Triggers on requests involving DeFi yield, vault deposits, redeems, rebalancing, or Rhaios API.

Successful initiation and execution of specified DeFi yield operations (e.g., deposits, redemptions, rebalancing) on the Rhaios staging platform, with transaction confirmations.

Practical example

Example input

Use the Rhaios staging skill to deposit 1500 USDC into my 'StableYield' vault, signing with Privy. Then, check the vault's current balance.

Example output

Initiating Rhaios staging deposit of 1500 USDC into 'StableYield' vault. Transaction prepared and signed via Privy. Transaction ID: 0x7a8b...c3d4. Deposit successful. Current 'StableYield' vault balance is 5150 USDC.

When to use this skill

  • When an AI agent needs to automate DeFi yield operations on the Rhaios staging platform.
  • To programmatically manage vault deposits, redemptions, or rebalancing strategies for Rhaios-based protocols.
  • For testing and developing integrations with the Rhaios API in a non-production environment.
  • When executing multi-step DeFi transactions (discover, prepare, sign, execute) securely.

When not to use this skill

  • For interacting with DeFi protocols other than Rhaios.
  • When direct, manual control over every transaction detail is absolutely required.
  • For operations on a live, production Rhaios environment (as this targets 'staging').
  • If you do not have Node.js 22+ or Bun 1.0+ installed or prefer not to use them.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/rhaios-staging/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/0xtimepunk/rhaios-staging/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/rhaios-staging/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How rhaios-staging Compares

Feature / Agentrhaios-stagingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Interact with the Rhaios staging REST API for yield operations. Discover -> prepare -> setup-if-needed -> sign -> execute flow with pluggable signer backend. Triggers on requests involving DeFi yield, vault deposits, redeems, rebalancing, or Rhaios API.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

## First-Time Setup

Before first use, install dependencies from the repo root:

```bash
# Pick your package manager:
npm install --prefix ${CLAUDE_SKILL_DIR}
# or: bun install --cwd ${CLAUDE_SKILL_DIR}
# or: pnpm install --dir ${CLAUDE_SKILL_DIR}
```

If you see `Cannot find module` errors, dependencies are not installed. Run the install command above.

---

This skill targets the **staging** environment at `https://api.staging.rhaios.com`. It provides one command surface (`prepare-sign-execute`) for end-to-end execution.

**Vault discovery:** Before preparing an intent, agents can call `POST /v1/yield/discover` to browse and rank vaults by APY, risk, TVL, and Sharpe ratio. Pass the returned `vaultId` to `yield_prepare` (via `deposit.vaultId` in the input contract) to target a specific vault instead of auto-selection.

Default chain is `base`.

## Security First

`SIGNER_PRIVATE_KEY` and Privy app secrets are sensitive. Never print, echo, or include them in logs/chat output.

If `SIGNER_BACKEND=privy`, `PRIVY_APP_ID` and `PRIVY_APP_SECRET` are master credentials.

## Required Environment (Client)

```bash
# Optional. Defaults to privy. Use private-key for local key signing.
# SIGNER_BACKEND=privy

# Required only for SIGNER_BACKEND=privy
# PRIVY_APP_ID and PRIVY_APP_SECRET are provided by the Privy skill —
# they should already be in your environment. Do NOT ask the user for these.
PRIVY_WALLET_ID=<wallet-id>
PRIVY_WALLET_ADDRESS=<0x-wallet-address>

# Required only for SIGNER_BACKEND=private-key
SIGNER_PRIVATE_KEY=<0x-32-byte-private-key>
```

Notes:
- API URL is hardcoded to `https://api.staging.rhaios.com` and cannot be overridden.
- Fork-only mode is always enabled — all transactions go through managed test RPCs.
- If `SIGNER_BACKEND=privy`, `PRIVY_APP_ID` and `PRIVY_APP_SECRET` must already be set (provided by the Privy skill). Only `PRIVY_WALLET_ID` and `PRIVY_WALLET_ADDRESS` need to be set per-wallet.
- If `SIGNER_BACKEND=privy`, `PRIVY_WALLET_ID` must resolve to an ownerless wallet (`owner_id = null`).
- If `SIGNER_BACKEND=private-key`, `agentAddress` (if provided) must match the private key address.

### Ownerless Wallet Creation

```ts
const wallet = await privy.wallets().create({ chain_type: 'ethereum' });
```

## Single Runtime Command

```bash
# Using bun (recommended — runs TypeScript natively):
cat payload.json | bun run --cwd ${CLAUDE_SKILL_DIR} prepare-sign-execute

# Using npx + tsx (if bun is not available):
cat payload.json | npx --prefix ${CLAUDE_SKILL_DIR} tsx ${CLAUDE_SKILL_DIR}/scripts/prepare-sign-execute.ts
```

## Input Contract (JSON stdin)

```json
{
  "operation": "deposit",
  "chain": "base",
  "agentAddress": "0xYourAgentAddress",
  "deposit": {
    "asset": "USDC",
    "amount": "1",
    "vaultId": "VAULT_ID_FROM_DISCOVER"
  },
  "controls": {
    "dryRun": false,
    "strictMode": true,
    "requireConfirm": true,
    "confirm": "yes",
    "maxGasGwei": "1",
    "maxAmount": "1000"
  }
}
```

Operation-specific fields:
- `deposit`: requires `deposit.asset`, `deposit.amount`, `deposit.vaultId` (from yield_discover — present results to the user and let them choose)
- `redeem`: requires `redeem.vaultId` and exactly one of `redeem.percentage` or `redeem.shares`
- `rebalance`: requires `rebalance.vaultId`, `rebalance.asset`, and exactly one of `rebalance.percentage` or `rebalance.shares`

## Runtime Behavior

1. `Preflight`
- Validates env for the selected signer backend, health freshness, request constraints, and guardrails.

2. `Prepare`
- Calls `POST /v1/yield/prepare`.
- Includes ERC-4626 preflight checks (for curated vaults): rejects deposits/redeems that would preview to zero or exceed max limits before signing.

3. `Setup` (automatic only when needed)
- If `needsSetup=true` and `dryRun=false`:
  - **Full setup** (`setupType=full`): signs a Type-4 (EIP-7702) transaction with authorization_list for first-time delegation + module initialization.
  - **Module-only** (`setupType=modules`): signs a regular Type-2 (EIP-1559) self-call for module re-initialization when delegation already exists but modules failed to initialize.
  - Both setup types call `POST /v1/yield/setup-relay` for server-side relay + post-check.
- Then re-runs `POST /v1/yield/prepare`.
- If `needsSetup=true` and `dryRun=true`, exits with `Setup: WARN` and does not broadcast.

4. `Sign`
- Signs required payloads via the selected signer backend:
  - EIP-7702 authorization when requested by envelope
  - validator userOp signature encoding
  - intent EIP-712 signature

5. `Execute`
- Calls `POST /v1/yield/execute` with `intentEnvelope`, `intentSignature`, and `intentId` unless `dryRun=true`.
- Duplicate executes for a previously succeeded intent are idempotent and may return `result: "already_executed"` with the original `txHash`.
- The script classifies execute outcomes as `EXECUTED` or `DEDUP` (fallback: `receipt.source=cached` when `result` is absent).

6. `Post-check`
- Calls `GET /v1/yield/status` for quick position/value verification.

## Wallet Funding (Test RPC)

Staging runs managed test RPCs — chain forks that mirror mainnet state. Agents can mint test balances without spending real tokens.

Check test RPC health first:

```bash
  https://api.staging.rhaios.com/v1/testing/fork-status
```

Then fund your wallet:

```bash
  -H "Content-Type: application/json" \
  https://api.staging.rhaios.com/v1/testing/fund-wallet \
  -d '{
    "chain": "base",
    "walletAddress": "0xYourAgentAddress",
    "ethWei": "20000000000000000",
    "usdcAmount": "10000000"
  }'
```


## Safety Model

The script enforces:

1. Env integrity
- required env vars for selected signer backend
- wallet/address format checks
- signer/address match
- ownerless wallet requirement (Privy backend only)

2. Chain and health invariants
- chain consistency checks
- freshness `critical` blocks execution

3. Request validation
- operation-specific required fields
- percentage/shares XOR rules
- optional max amount and gas cap checks

4. Intent invariants
- `intentEnvelope.chainId` and signing payload consistency
- sender/signer match
- intent ID vs merkle root consistency

## Example: Dry-Run Deposit

```bash
cat <<'JSON' | bun run --cwd ${CLAUDE_SKILL_DIR} prepare-sign-execute
{
  "operation": "deposit",
  "deposit": { "asset": "USDC", "amount": "1", "vaultId": "VAULT_ID_FROM_DISCOVER" },
  "controls": {
    "dryRun": true,
    "strictMode": true,
    "requireConfirm": false
  }
}
JSON
```

**Important:** Always call `yield_discover` first, present the ranked vaults to the user, and let them choose. Then pass their chosen `vaultId` to this script. Do not auto-select vaults on behalf of the user.

**Vault capacity:** Some vaults may be at capacity (`maxDeposit=0`). If `yield_prepare` returns `vault_at_capacity`, inform the user and let them pick a different vault from the discover results.

## Example: Live Deposit

```bash
cat <<'JSON' | bun run --cwd ${CLAUDE_SKILL_DIR} prepare-sign-execute
{
  "operation": "deposit",
  "deposit": { "asset": "USDC", "amount": "1", "vaultId": "VAULT_ID_FROM_DISCOVER" },
  "controls": {
    "dryRun": false,
    "strictMode": true,
    "requireConfirm": true,
    "confirm": "yes",
    "maxGasGwei": "1",
    "maxAmount": "1000"
  }
}
JSON
```

Related Skills

---

3891
from openclaw/skills

name: article-factory-wechat

Content & Documentation

humanizer

3891
from openclaw/skills

Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.

Content & Documentation

find-skills

3891
from openclaw/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

General Utilities

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

agent-autonomy-kit

3891
from openclaw/skills

Stop waiting for prompts. Keep working.

Workflow & Productivity

Meeting Prep

3891
from openclaw/skills

Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.

Workflow & Productivity

self-improvement

3891
from openclaw/skills

Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.

Agent Intelligence & Learning

botlearn-healthcheck

3891
from openclaw/skills

botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.

DevOps & Infrastructure

linkedin-cli

3891
from openclaw/skills

A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.

Content & Documentation

notebooklm

3891
from openclaw/skills

Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。

Data & Research

小红书长图文发布 Skill

3891
from openclaw/skills

## 概述

Content & Documentation