# Trader Budget

Budget Manager.

- Repository: https://github.com/Jakeschincariol/trader-skill (1074 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-14
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Jakeschincariol/trader-skill --skill trader-budget -g -a claude-code -y`
Codex: `npx skills add Jakeschincariol/trader-skill --skill trader-budget -g -a codex -y`
Cursor: `npx skills add Jakeschincariol/trader-skill --skill trader-budget -g -a cursor -y`
Gemini CLI: `npx skills add Jakeschincariol/trader-skill --skill trader-budget -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Jakeschincariol/trader-skill`

## Description

Budget Manager. Sizes every position to your budget before anything is bought: keeps a cash buffer, caps any one stock (the excess is shared out to the others), drops slices under your minimum order, rounds so every dollar is used, supports fractional or whole shares, and writes the proposed buy orders to trader/orders.json in the exact shape of Alpaca's place_stock_order (notional as a string). Nothing is placed. Use when the user says "I have $5,000", "size my trades", "how much of each should I buy", "manage my budget", "split my money", "keep 10% in cash", "no stock over 25%", "set my rules", or after /trader-copycat writes targets.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# trader-budget

The Budget Manager turns "copy this portfolio" into "buy exactly this much of
each", inside rules the user sets once. 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).

```bash
python3 "${CLAUDE_SKILL_DIR}/size.py"                       # trader/targets.json + trader/config.json
python3 "${CLAUDE_SKILL_DIR}/size.py" --budget 5000 --write # write trader/orders.json
python3 "${CLAUDE_SKILL_DIR}/size.py" --whole-shares --prices trader/prices.json
python3 "${CLAUDE_SKILL_DIR}/size.py" --weights AAPL=22.04,AXP=17.14,GOOGL=12.62 --json
```

## What it reads and writes

| file | what |
| --- | --- |
| `trader/config.json` | the rules (start from `config.example.json` in this folder) |
| `trader/targets.json` | the weights to copy, written by trader-copycat (`targets.example.json` here) |
| `trader/prices.json` | only for whole shares or share counts (trader-alerts writes it) |
| `trader/orders.json` | the proposed buy orders it writes with `--write` |

## Step 1: set the rules once

If `trader/config.json` does not exist, copy `config.example.json` into
`trader/config.json` and ask the user for each value in plain words:

- **budget**: how much money this is for. Only money they can afford to lose.
- **cash_buffer_pct**: how much stays in cash (default 10).
- **max_position_pct**: the most any one stock may be, as a percent of the budget (default 25).
- **max_order_usd** and **min_order_usd**: the biggest and smallest single order (2000 and 5).
- **fractional**: true if the broker buys fractional shares (Alpaca does); false for whole shares.
- **blocked**: tickers they never want to own.
- Keep **paper** true until they have watched it work on a paper account.

## Step 2: size it

```bash
python3 "${CLAUDE_SKILL_DIR}/size.py" --write
```

The rest: https://github.com/Jakeschincariol/trader-skill/blob/HEAD/trader-budget/SKILL.md
