rebalancer

rebalancer is a skill for Claude Code, Codex from kayzaa/k.i.t.-bot. It costs 21 tokens per session (2,805 once invoked), scanned A, a copy of rebalancer, MIT.

A portfolio management tool that compares current holdings with target percentages and rebalances when they drift too far or when a calendar date arrives. Rebalancing means buying or selling assets to restore chosen portfolio weights.

In plain words
What is it for?
Use it to maintain target allocations across crypto, stocks, ETFs, bonds, and other assets with threshold-based, calendar-based, or hybrid triggers.
Why use it?
It reduces the need to track allocation changes and decide manually when to adjust them. It can also support approval steps, buy-only modes, cash-flow rebalancing, and tax-related settings.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: positional $N argument; built for openclaw.

Good fit Use it to maintain target allocations across crypto, stocks, ETFs, bonds, and other assets with threshold-based, calendar-based, or hybrid triggers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kayzaa/k.i.t.-bot/rebalancer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kayzaa/k.i.t.-bot --skill rebalancer
Clone the repo
git clone --depth 1 https://github.com/kayzaa/k.i.t.-bot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rebalancer

README.md
[![agentmods](https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/rebalancer/github.svg)](https://agentmods.dev/skills/kayzaa/k.i.t.-bot/rebalancer)
Your own site
<a href="https://agentmods.dev/skills/kayzaa/k.i.t.-bot/rebalancer"><img src="https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/rebalancer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rebalancer

Your own site · 80×15
<a href="https://agentmods.dev/skills/kayzaa/k.i.t.-bot/rebalancer"><img src="https://agentmods.dev/badge/skills/kayzaa/k.i.t.-bot/rebalancer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,805 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.02805
Opus 5 $0.00010 $0.01403
Sonnet 5 $0.00004 $0.00561
Haiku 4.5 $0.00002 $0.00281

Measured 8d ago against content hash ed7823f8475d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

rebalancer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/rebalance_calc.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to rebalancer — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/rebalancer/SKILL.md · 371 lines

How it starts

The opening of the file, as written. The whole thing — 371 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rebalancer

Vollautomatisches Portfolio-Rebalancing für optimale Asset Allocation.

Overview

  • Target Allocation - Ziel-Gewichtungen definieren
  • Drift Detection - Abweichungen erkennen
  • Smart Rebalancing - Steuer- und kostenoptimiert
  • Multi-Asset - Crypto, Aktien, ETFs, Bonds

🤖 AUTO-PILOT MODE

# ~/.kit/config/rebalancer.json
{
  "auto_pilot": {
    "enabled": true,
    "trigger": {
      "type": "threshold",  # threshold | calendar | hybrid
      "threshold_pct": 5,   # Rebalance wenn >5% Drift
      "calendar": "quarterly",  # monthly | quarterly | yearly
      "check_interval_hours": 24
    },
    "execution": {
      "mode": "sell_buy",   # sell_buy | buy_only | cashflow
      "min_trade_eur": 50,
      "require_approval": true,  # User muss bestätigen
      "approval_timeout_hours": 24
    },
    "tax_optimization": {
      "avoid_short_term_gains": true,
      "use_tax_loss_harvesting": true,
      "max_annual_gains_eur": 10000
    },
    "notifications": {
      "drift_alert_pct": 3,
      "rebalance_complete": true
    }
  },
  "target_allocation": {
    "crypto": {
      "BTC": 40,
      "ETH": 30,
      "SOL": 15,
      "stablecoins": 15
    },
    "traditional": {
      "stocks_us": 40,
      "stocks_eu": 20,
      "bonds": 25,
      "gold": 10,
      "cash": 5
    }
  }
}

Commands

Check Current Allocation vs Target

python3 -c "
import ccxt
import yfinance as yf

# Target allocation
target = {
    'BTC': 40,
    'ETH': 30,
    'SOL': 15,
    'USDT': 15
}

# Current holdings (from exchange)
holdings = {
    'BTC': 0.5,
    'ETH': 3.0,
    'SOL': 50,
    'USDT': 5000
}

exchange = ccxt.binance()
values = {}
total = 0

# Calculate values
for coin, amount in holdings.items():
    if coin in ['USDT', 'USDC']:
        values[coin] = amount
    else:
        ticker = exchange.fetch_ticker(f'{coin}/USDT')
        values[coin] = amount * ticker['last']
    total += values[coin]

print('⚖️ PORTFOLIO ALLOCATION')
print('=' * 70)
print(f'{\"Asset\":8} {\"Value\":>12} {\"Current\":>10} {\"Target\":>10} {\"Drift\":>10} {\"Status\":>10}')
print('-' * 70)

max_drift = 0
for coin in target:
    current_pct = (values.get(coin, 0) / total * 100) if total > 0 else 0
    target_pct = target[coin]
    drift = current_pct - target_pct
    max_drift = max(max_drift, abs(drift))
    
    if abs(drift) > 5:
        status = '🔴 REBAL'
    elif abs(drift) > 2:
        status = '🟡 Watch'
    else:
        status = '🟢 OK'
    
    print(f'{coin:8} \${values.get(coin, 0):>11,.2f} {current_pct:>9.1f}% {target_pct:>9.1f}% {drift:>+9.1f}% {status:>10}')

print('-' * 70)
print(f'{\"TOTAL\":8} \${total:>11,.2f}')
print()

if max_drift > 5:
    print('⚠️ REBALANCING RECOMMENDED - Max drift exceeds 5%')
else:
    print('✅ Portfolio within tolerance')
"

Read the full file on GitHub · 371 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 371 lines · 21 tokens per session scan A ed7823f8475d

Subscribe to this mod's changes

rebalancer is a skill published in the GitHub repository kayzaa/k.i.t.-bot (5 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 2,805 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to rebalancer, differing in 0 lines, and is treated as a copy.