
trader-rebalance
Rebalancer. Brings the portfolio back to its target weights when it drifts: values every holding at current prices, works out each stock's drift from its target in percentage points, trades only the stocks outside a band (default 5 points), keeps the cash buffer and the per-stock cap, skips tiny trades, lists sells before buys, and writes the trades to trader/orders.json as proposals. Use when the user says "rebalance", "my portfolio drifted", "bring it back to the targets", "I added money", "the new 13F changed the weights", "am I overweight", or on a schedule (monthly or quarterly) after /trader-copycat updates the targets.
- Installs
- 41
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/jakeschincariol/trader-skill --skill trader-rebalance- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads trader-rebalance automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
trader-rebalance
The Rebalancer keeps the portfolio looking like the plan. Prices move, new money arrives and a new 13F changes the weights; this skill finds the stocks that drifted too far and proposes the trades that bring them back. It writes proposals only: trader-risk checks them and trader-broker asks the user yes or no for each one.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/rebalance.py" # the drift table, no files written
python3 "${CLAUDE_SKILL_DIR}/rebalance.py" --band 5 --write # proposals -> trader/orders.json
python3 "${CLAUDE_SKILL_DIR}/rebalance.py" --sell-untracked # also sell holdings not in the targets
python3 "${CLAUDE_SKILL_DIR}/rebalance.py" --json
What it reads and writes
| file | what |
|---|---|
trader/portfolio.json | cash and positions (shares); same shape as trader-tax's portfolio.example.json |
trader/prices.json | a price for every holding and every target (trader-alerts writes it) |
trader/targets.json | the target weights (trader-copycat writes it) |
trader/config.json | cash buffer, cap, min and max order, rebalance_band_pct |
trader/orders.json | the proposals it writes with --write, sells first |
How it decides
- Account value = cash + every holding at its price.
- Targets: the weights renormalised over the stock sleeve (account minus
the cash buffer), with no stock above
max_position_pctof the account. The excess is shared out, the same way trader-budget does it, so a capped stock is not bought back over the cap every month. - Drift = current percent of the account minus target percent.
- Band: only stocks drifting MORE than the band trade (default 5 points). A trade takes the stock all the way back to its target. A small band means more trades; a wide band means fewer.
- Sells first, then buys. Buys only spend cash above the buffer; if there is not enough, all buys are scaled down by the same share.
- Trades under
min_order_usdare skipped. A trade overmax_order_usdis cut to the max with a note to run again after it fills. - Untracked holdings (not in the targets) are left alone and listed,
unless the user asks to sell them with
--sell-untracked.
Steps
- Refresh prices: trader-alerts
alerts.py quote --holdings --write. - Run
rebalance.pyand show the drift table in plain words: which stocks are over or under, by how many points, and what it would trade. - Before any sell, run trader-tax (
lots.py sell TICKER SHARES) and show what the sale would realize. Selling a winner can mean a tax bill. - If the user wants the trades:
rebalance.py --write, then/trader-risk, then/trader-broker, one yes per order.
Example: the reel's portfolio
The copy portfolio bought on 2026-10-13 (AAPL $1,250 capped, AXP $1,119,
GOOGL $823, KO $708, BAC $600, $500 cash), valued at that day's closes, sits
on its targets: every drift is under 0.1 point, so rebalance.py says
"Nothing is outside the band" and exits 1. If the user adds $2,000 of cash,
the account is $7,000 and the cap becomes $1,750. AAPL is now 7.1 points under
its target and AXP 6.4, both outside the 5-point band, so it proposes buying
$499 of AAPL and $446 of AXP. GOOGL, KO and BAC are under target too, but
inside the band, so they wait. Add $5,000 instead and all five are outside
the band: five buys that leave the $1,000 buffer in cash.
What it never does
It never places an order, never trades inside the band to chase small differences, never sells holdings outside the targets unless asked, and never says a rebalance will improve returns.
Safety
- Education and tooling, not financial advice. A rebalance follows the user's own targets, not a forecast.
- Paper trading by default (
"paper": true). Going live is the user's own decision, in their own config. - Nothing in this pack places an order except trader-broker, and only when all three hold: trader-risk passed that exact order today, the user typed an explicit yes for that one order in the chat, and the user clicked Allow once on Claude's own card because the order tool is set to "Needs approval" (Customize > Connectors > tool permissions). Never set an order tool to "Always allow".
- No options, margin, short selling or leverage unless the config allows it and the user confirms.
- Broker keys live in environment variables or the Claude Desktop config, never in the chat.
FAQ
What does the trader-rebalance skill do?
Rebalancer. Brings the portfolio back to its target weights when it drifts: values every holding at current prices, works out each stock's drift from its target in percentage points, trades only the stocks outside a band (default 5 points), keeps the cash buffer and the per-stock cap, skips tiny trades, lists sells before buys, and writes the trades to trader/orders.json as proposals. Use when the user says "rebalance", "my portfolio drifted", "bring it back to the targets", "I added money", "the new 13F changed the weights", "am I overweight", or on a schedule (monthly or quarterly) after /trader-copycat updates the targets.
How do I install trader-rebalance?
Run npx skills add https://github.com/jakeschincariol/trader-skill --skill trader-rebalance in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/trader-rebalance/ (personal) or .claude/skills/trader-rebalance/ (project).
Which AI agents can use trader-rebalance?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is trader-rebalance safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains trader-rebalance?
It is published by jakeschincariol in jakeschincariol/trader-skill. It has 41 recorded installs.
More from jakeschincariol/trader-skill
trader-analyst
jakeschincariol/trader-skill
Open the skill to read its SKILL.md instructions.
trader-screener
jakeschincariol/trader-skill
Open the skill to read its SKILL.md instructions.
trader-budget
jakeschincariol/trader-skill
Open the skill to read its SKILL.md instructions.
trader-pelosi
jakeschincariol/trader-skill
Open the skill to read its SKILL.md instructions.
Popular business & finance skills
sales-enablement
coreyhaines31/marketingskills
When the user wants to create sales collateral, pitch decks, one-pagers, objection handling docs, or demo scripts. Also use when the user mentions 'sales deck,' 'pitch deck,' 'one-pager,' 'leave-behind,' 'objection handling,' 'deal-specific ROI analysis,' 'demo script,' 'talk track,' 'sales playbook,' 'proposal template,' 'buyer persona card,' 'battle card,' 'battlecard,' 'competitive one-pager,' 'win-loss analysis,' 'why are we losing deals,' 'loss reasons,' 'how do I respond to this objection,' 'prospect just said,' 'help my sales team,' 'sales materials,' or 'what should I give my sales reps,' 'cold call script,' or 'voicemail script.' Use this for any document or asset that helps a sales team close deals. For public competitor comparison pages, see competitors. For running buyer interviews or churn research, see customer-research. For marketing website copy, see copywriting. For cold outreach emails, see cold-email. For the offer being sold (bonuses, guarantees, pricing structure),
revops
coreyhaines31/marketingskills
When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'outbound pipeline stages,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and processes that connect marketing to revenue. For cold outreach emails, see cold-email. For email drip campaigns, see emails. For pricing decisions, see pricing.
sales-funnel-blueprint
autonnel/autonnel-skills
Turn an offer into a concrete multi-step sales funnel spec - page-by-page structure, price ladder, copy outline and the metrics each step must hit. Use when asked to build a sales funnel, marketing funnel, landing page flow, lead magnet funnel, webinar funnel, tripwire or VSL funnel, when planning a product launch page flow, or when someone asks "what pages do I need" for selling something online.
pricing
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' 'should I offer a free plan,' 'pricing page teardown,' 'pricing page audit,' 'is my pricing page AI-readable,' or 'can AI read my pricing.' Use this whenever someone is figuring out what to charge, how to structure their plans, or wants to audit a pricing page (for humans and for the AI agents that shortlist tools). For in-app upgrade screens, see paywalls. For offer construction (bonuses, guarantees, value framing, naming) on services/courses/coaching/high-ticket B2B, see offers.
cross-border-ecommerce
nexscope-ai/ecommerce-skills
Cross-border e-commerce expansion advisor. Scores target markets on 8 weighted dimensions (market size, ecommerce penetration, competition, regulatory complexity, logistics infrastructure, payment ecosystem, cultural distance, IP protection), compares 5 fulfillment models with cost and transit data, provides country-by-country tax/duty compliance guides (EU VAT/IOSS, UK VAT, US sales tax, CA GST, AU GST, JP consumption tax), maps local payment preferences by market, and builds a phased expansion roadmap. No API key required.
pricing-strategy
coreyhaines31/marketingskills
When the user wants help with pricing decisions, packaging, or monetization strategy. Also use when the user mentions 'pricing,' 'pricing tiers,' 'freemium,' 'free trial,' 'packaging,' 'price increase,' 'value metric,' 'Van Westendorp,' 'willingness to pay,' 'monetization,' 'how much should I charge,' 'my pricing is wrong,' 'pricing page,' 'annual vs monthly,' 'per seat pricing,' or 'should I offer a free plan.' Use this whenever someone is figuring out what to charge or how to structure their plans. For in-app upgrade screens, see paywall-upgrade-cro.