krakenfx/kraken-cli/kraken-rebalancing
Claude Code and agent skill by krakenfx/kraken-cli
- community
Checking that the SKILL.md file is still in the repository.
Portfolio rebalancing to maintain target allocations across assets.
Install
npx vskill@latest install krakenfx/kraken-cli/kraken-rebalancingSKILL.md
kraken-rebalancing
Use this skill for:
- checking current portfolio allocation vs target weights
- calculating rebalance trades
- executing rebalance orders with minimum trade thresholds
- scheduling periodic rebalance checks
Define Target Allocation
Example target: 50% BTC, 30% ETH, 20% SOL (by USD value).
The agent maintains these weights and compares against current holdings.
Read Current Portfolio
- Get balances:
``bash kraken balance -o json 2>/dev/null ``
- Get current prices for all held assets:
``bash kraken ticker BTCUSD ETHUSD SOLUSD -o json 2>/dev/null ``
- Calculate USD value of each holding and total portfolio value.
- Compute current weights: asset_value / total_value for each.
Calculate Rebalance Trades
For each asset:
- Target value = total_portfolio * target_weight
- Current value = holdings * current_price
- Delta = target_value - current_value
- If delta > threshold: buy (delta / price) units
- If delta < -threshold: sell (|delta| / price) units
Set a minimum trade threshold (e.g., $50) to avoid placing tiny orders that waste fees.
Paper Rebalance Test
Live Rebalance Execution
Live orders run outside the paper workspace, so run unset KRAKEN_WORKSPACE first. Inside it, the orders fill on paper and kraken balance reads the paper ledger.
- Calculate all required trades.
- Present the rebalance plan to the user:
- Current allocation vs target
- Proposed trades with estimated fees
- Validate each order:
``bash kraken order sell BTCUSD 0.005 --type market --validate -o json 2>/dev/null kraken order buy SOLUSD 2 --type market --validate -o json 2>/dev/null ``
- Execute sells first (to free capital), then buys (requires human approval):
``bash kraken order sell BTCUSD 0.005 --type market -o json 2>/dev/null kraken order buy SOLUSD 2 --type market -o json 2>/dev/null ``
- Verify final state:
``bash kraken balance -o json 2>/dev/null ``
Drift Detection
Periodically compare current weights to targets. Trigger rebalance when any asset drifts beyond a threshold (e.g., 5% absolute drift):
Rebalance with Limit Orders
For lower fees, use limit orders instead of market:
Check fills before declaring rebalance complete:
Hard Rules
- Never execute rebalance trades without explicit human approval.
- Always present the full rebalance plan (sells and buys) before execution.
- Execute sells before buys to ensure sufficient quote currency.
- Respect minimum order sizes for each pair (check pair info with
kraken pairs). - Apply a minimum trade threshold to skip negligible adjustments.
- If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with
kraken feedback.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kraken-rebalancing/SKILL.md
Popularity
- Repository stars
- 74
- Repository forks
- 10
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/krakenfx/kraken-cli/kraken-rebalancing)