okx-auto-rebalance

Rebalances crypto portfolios by parsing percentage targets and executing multi-token swaps via onchainos CLI.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-auto-rebalance-nith567
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-auto-rebalance
Source: https://github.com/Nith567/xlayer-skills-arena/tree/main/okx-auto-rebalance
Command: npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-auto-rebalance-nith567

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Manually rebalancing a crypto portfolio requires checking balances, calculating target allocations, and executing multiple swaps one by one. This Skill automates the entire flow: it parses natural-language percentage targets, fetches current holdings, computes the required buys and sells, and executes them in the correct order across supported chains. ## Core Features & Use Cases - Natural-language allocation parsing: Interprets instructions like "50% ETH, 30% USDC, 20% OKB" or "rebalance equally" into concrete target weights, validating that percentages sum to 100%. - Plan-before-execute workflow: Fetches wallet balances, resolves token addresses, calculates per-token deltas, and presents a rebalance plan for user confirmation before any swap runs. - Ordered multi-swap execution with risk controls: Executes sells before buys, applies slippage presets by token type, blocks honeypots, warns on high price impact, and adds MEV protection above chain-specific thresholds. - Use Case: A user holding OKB, ETH, and USDT on X Layer says "rebalance 25% to OKB, rest to USDT". The Skill shows the current vs target allocation, executes two swaps gas-free on X Layer, and reports the final portfolio percentages. ## Quick Start Ask the agent to rebalance your portfolio, for example: "rebalance 50% OKB and 50% USDC on X Layer".

Frequently Asked Questions about okx-auto-rebalance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebalance my crypto portfolio by percentage?▼

State your target allocation in natural language, such as "rebalance 25% to OKB, rest to USDT". The skill fetches your wallet balances, calculates the required buys and sells, shows a plan for confirmation, then executes the swaps in order.

Which chains does the auto-rebalance skill support?▼

It supports all chains available through the onchainos swap CLI, including X Layer (196), Ethereum (1), BNB Chain (56), Polygon (137), Arbitrum (42161), Base (8453), Solana (501), and others. X Layer is the default when no chain is specified.

Does the rebalance execute swaps without my confirmation?▼

No. The skill always displays a rebalance plan showing current versus target allocations and the planned swaps, then waits for you to type confirm before executing any transaction.

What happens if my target percentages do not add up to 100%?▼

The skill validates that allocations sum to 100% and asks you to confirm or correct them before proceeding. Keywords like "rest" or "equally" are automatically converted into the remaining or evenly divided percentages.

Can the skill rebalance assets held in DeFi staking or lending positions?▼

DeFi positions do not appear in wallet balance, so the skill checks them separately and informs you they are excluded. It never auto-withdraws staked or lent assets without your explicit instruction.

How does the skill protect against honeypots and high slippage?▼

It blocks buys of tokens flagged as honeypots, warns prominently when price impact exceeds 5%, applies slippage presets by token type, and adds MEV protection automatically above chain-specific trade-size thresholds.