Tooluck logoTooluck
SKILL.md

trader-budget

Agent skill fromJakeschincariol/trader-skill

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.

How to install trader-budget

install trader-budget
# install the trader-skill pack with the skills CLI
npx skills add Jakeschincariol/trader-skill

# or add only this skill to Claude Code: copy the folder

trader-budget/

# into

~/.claude/skills/trader-budget/ (all projects)

.claude/skills/trader-budget/ (one project)

trader-budget/SKILL.md

MITFull file
1# trader-budget
2
3The Budget Manager turns "copy this portfolio" into "buy exactly this much of
4each", inside rules the user sets once. It writes proposals only. trader-risk
5checks them and trader-broker asks the user yes or no for each one.
6
7`${CLAUDE_SKILL_DIR}` below is this skill's folder (where this SKILL.md lives).
8
9```bash
10python3 "${CLAUDE_SKILL_DIR}/size.py" # trader/targets.json + trader/config.json
11python3 "${CLAUDE_SKILL_DIR}/size.py" --budget 5000 --write # write trader/orders.json
12python3 "${CLAUDE_SKILL_DIR}/size.py" --whole-shares --prices trader/prices.json
13python3 "${CLAUDE_SKILL_DIR}/size.py" --weights AAPL=22.04,AXP=17.14,GOOGL=12.62 --json
14```
15
16## What it reads and writes
17
18| file | what |
19| --- | --- |
20| `trader/config.json` | the rules (start from `config.example.json` in this folder) |
21| `trader/targets.json` | the weights to copy, written by trader-copycat (`targets.example.json` here) |
22| `trader/prices.json` | only for whole shares or share counts (trader-alerts writes it) |
23| `trader/orders.json` | the proposed buy orders it writes with `--write` |
24
25## Step 1: set the rules once
26
27If `trader/config.json` does not exist, copy `config.example.json` into
28`trader/config.json` and ask the user for each value in plain words:
29
30- **budget**: how much money this is for. Only money they can afford to lose.
31- **cash_buffer_pct**: how much stays in cash (default 10).
32…

Excerpt shown under the repository's MIT license.

More skills in trader-skill

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates