本文へ移動
cccskills
無料GitHub で公開

trader-budget

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.

日本語の概要は準備中です。原文の説明を表示しています。

実行スコア 未検証

インストール方法を見る

含まれるファイル(4)

  • SKILL.md5.5 KB
  • config.example.json349 B
  • size.py19.3 KB
  • targets.example.json610 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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).

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

filewhat
trader/config.jsonthe rules (start from config.example.json in this folder)
trader/targets.jsonthe weights to copy, written by trader-copycat (targets.example.json here)
trader/prices.jsononly for whole shares or share counts (trader-alerts writes it)
trader/orders.jsonthe 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

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

The maths, in order: the cash buffer comes off the top; the weights are renormalised to 100 over the stocks that are left; any stock over the cap is pinned at the cap and its excess is shared over the others by weight, again until nobody is over; a slice under the minimum order is dropped and its weight shared out; amounts are rounded to whole dollars and the rounding dollar goes to the biggest stock that is not capped, so nothing is left idle by accident. Money that truly cannot be invested (every stock at its cap, or whole shares that do not divide evenly) is shown as "left idle".

Step 3: show the user

Show the table: ticker, weight, dollars, which stock hit the cap, the cash buffer and what is left idle. Say where the weights came from and how old they are (a 13F is up to 45 days old when it is filed). Then hand over to /trader-risk.

Example: the reel

Berkshire Hathaway's Q2 2026 13F (filed 2026-08-14), top five: Apple 22.04%, American Express 17.14%, Alphabet 12.62%, Coca-Cola 10.86%, Bank of America 9.20%. Renormalised over those five: 30.67 / 23.85 / 17.56 / 15.11 / 12.80. A $5,000 budget, a 10% cash buffer and a 25% cap:

stockdollars
AAPL$1,250capped at 25%
AXP$1,119
GOOGL$823
KO$708
BAC$600
cash buffer$500
left idle$0

The first order it writes is {"symbol": "AAPL", "side": "buy", "notional": "1250", "type": "market", "time_in_force": "day"}. Keep the weights to two decimals or more: weights already rounded to one decimal (30.7 / 23.9 / ...) can move a slice by a dollar.

Rules

  • Proposals only. This skill never calls a broker tool.
  • Never size money the user has not said is for this. Ask for the budget.
  • Every number comes from the config, the targets or the prices. Nothing is guessed.
  • No projections: never say what the positions will be worth or earn.
  • Whole shares need real prices from trader/prices.json; never invent a price.

What it never does

It never places, approves or schedules an order, never raises a limit on its own, and never sizes options, margin or short positions.

Safety

  • Education and tooling, not financial advice. Nothing here predicts prices or promises returns.
  • 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Price Alerts. Rings when a price target, a stop or the opening bell hits: above / below / stop rules, percent moves from the previous close, and the NYSE opening bell, each ringing once so you are not spammed. Knows NYSE hours with the 2026 and 2027 holidays and 1:00 p.m. early closes, fetches free delayed quotes (Yahoo chart JSON, Stooq CSV) one ticker at a time, and writes trader/prices.json for the other skills. Use when the user says "alert me when", "tell me if AAPL hits", "set a stop", "price target", "watch my stocks", "is the market open", "when does the market open", "get me prices", or to refresh prices before sizing, risk or tax.

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

The Earnings Analyst. Reads a company's reported numbers straight from SEC EDGAR (XBRL company facts from its 10-Qs and 10-Ks, plus the latest earnings 8-K and its press release) and sums up what changed: revenue, gross, operating and net margins, net income and diluted EPS, quarter by quarter, each against the same quarter a year earlier, with the trailing twelve months. Writes a metrics file the screener reads. Use when the user says "how did Apple's earnings look", "analyze the earnings", "what changed this quarter", "is revenue growing", "check the 10-Q", "compare margins", or "run the analyst on my holdings".

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

Order Executor. Places APPROVED orders through your brokerage connector, one at a time, and never without your explicit yes. Shows each order as a plain ticket plus the exact JSON for Alpaca's place_stock_order, records your yes word for word, then Claude's own Allow once / Deny card asks again. Covers setting up Alpaca's official MCP server in Claude Desktop (paper trading by default, keys in env vars, never in chat), the Interactive Brokers connector (orders go to your IBKR account for your approval), and setting order tools to "Needs approval". Use when the user says "place the orders", "buy it", "execute", "send it to my broker", "connect Alpaca", "connect Interactive Brokers", "set up paper trading", or after /trader-risk passes.

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

The Reverse Engineer. Reads a famous investor's public SEC filings (the quarterly 13F-HR, plus Form 4 if you want the insider trades) and rebuilds their portfolio as weights you can copy: every position, its share of the fund, what they bought, added, trimmed and sold since the last quarter, with tickers matched to every CUSIP. Then it writes trader/targets.json so the budget skill can size it to your money. Use when the user says "copy Buffett", "copy Berkshire", "what does Ackman own", "reverse engineer this investor", "show me their 13F", "what did they buy last quarter", "copy the top 5", or names any fund or famous investor.

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

The News Monitor. Watches breaking market news and SEC filings for the stocks you hold (or are about to copy): Yahoo Finance headlines per ticker and each company's 8-K filings on SEC EDGAR (earnings, CEO changes, deals, restatements, bankruptcy). Shows only what is new since the last check, newest first, flags what touches your positions and why it matters, and never repeats an item. Use when the user says "any news on my stocks", "what's happening with Apple", "monitor the news", "watch my portfolio", "did anything break", "check the 8-Ks", or "morning briefing".

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

The Pelosi Tracker. Watches the stock trades members of Congress must disclose under the STOCK Act: reads the House Clerk's public Periodic Transaction Reports (PTRs) as soon as they are posted, alerts once per new filing, and turns each PDF into clean rows (who, owner, stock, ticker, buy or sell, options strike and expiry, trade date, amount range, how many days it took to disclose). Flags trades in stocks you hold. Senate reports are covered by a documented manual route. Use when the user says "what is Pelosi buying", "track Nancy Pelosi", "Congress trades", "politician stock trades", "did any congressman buy X", "alert me when Pelosi files", or "run the Pelosi skill".

日本語の概要は準備中です。原文の説明を表示しています。

Jakeschincariol/trader-skill4502026年10月15日 更新

Jakeschincariol のスキルをすべて見る

このスキルの問題を報告する