fadacai-portfolio: Instructions file for Claude Code

CLAUDE.md

fadacai-portfolio CLAUDE.md is an instructions file for Claude Code from PatrickSUDO/fadacai-portfolio. It costs 20,606 tokens per session, scanned B, a copy of fadacai-portfolio AGENTS.md, MIT.

Project instructions for an investment research and portfolio-management workspace focused on US stocks and options. They set the language, report formats, research workflow, and optional second-opinion commands.

In plain words
What is it for?
Preparing briefings, stock analysis, portfolio reviews, and related research outputs, including optional Telegram or email delivery.
Why use it?
They give a coding agent the project’s working rules and recurring research process, reducing inconsistent language, formatting, and task handling.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

This is PatrickSUDO/fadacai-portfolio's own configuration. It tells Claude Code how to work on fadacai-portfolio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fadacai-portfolio configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/supatrick/laptop/project/mcp-servers/fmp-mcp/compose.yaml.

Reuse

Borrowing it

Nothing to install: this file belongs to PatrickSUDO/fadacai-portfolio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/PatrickSUDO/fadacai-portfolio/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio

Made for: Claude Code.

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 fadacai-portfolio CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/patricksudo/fadacai-portfolio/claude-md/github.svg)](https://agentmods.dev/instructions/patricksudo/fadacai-portfolio/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/patricksudo/fadacai-portfolio/claude-md"><img src="https://agentmods.dev/badge/instructions/patricksudo/fadacai-portfolio/claude-md/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 fadacai-portfolio CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/patricksudo/fadacai-portfolio/claude-md"><img src="https://agentmods.dev/badge/instructions/patricksudo/fadacai-portfolio/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20,606 This file is loaded in full into every session.
When invoked 20,606 The same file — it is already loaded in full.
Security scan B 1 finding. 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.20606 $0.20606
Opus 5.5 $0.08242 $0.08242
Sonnet 5.5 $0.04121 $0.04121
Haiku 4.5 $0.02061 $0.02061

Measured 6d ago against content hash 2e2d950c3883, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

fadacai-portfolio CLAUDE.md scanned grade B with 1 finding 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 6d ago.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

⚠️ **不要用 `subagent_type: "codex:codex-rescue"` 或 `/codex:rescue`**。實測(2026-06-07)那條路徑會載入 `~/.codex/config.toml` 的 `superpowers@openai-curated` plugin,強制「回應前必須 invoke skill」+ 全域 `model_reasoning_effort = "xhigh"`,把整個 turn
Origin

This is a copy

100% identical to fadacai-portfolio AGENTS.md — 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.

CLAUDE.md · 393 lines

How it starts

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

Fundamental Allocation Study - Project Instructions

Project Overview

This is an investment research and portfolio management workspace. The user actively trades US stocks and options on a Level 2 options margin brokerage account (connected via the firstrade-server MCP as the reference broker integration).

Language & Format

  • All output in Traditional Chinese (繁體中文)
  • Thread/social media posts: plain text only, NO markdown, NO tables
  • Reports and analysis: markdown tables are fine
  • 不用 § 符號(2026-10-19 用戶):章節引用一律寫「第 N 節」或直接寫段名(本期結論、附錄)

Workflow

  1. /briefing — quick daily check (~1 min); /briefing full (~3 min); /briefing deep (~5 min)
    • /briefing telegram — Telegram push tier (~2-3 min):盤中推送專用,產出 briefing-out/ 兩個檔案
    • --send 旗標(任何 tier 可加):執行完後推送 Telegram + email 副本
    • 例:/briefing telegram --send、/briefing full --send
    • launchd 每個交易日美東 11:00(盤中,開盤 90 分鐘後;A 窗失敗 → 美東 15:00 B 窗備援)自動執行 /briefing telegram --send(週五加 --codex)。一律以美國時間為準(2026-09-30 用戶):launchd 每 5 分鐘叫一次、runner export TZ=America/New_York 自判時窗,Mac 在哪個時區都一樣;盤前 10:30 ET 前手動送的那份不擋 11:00 盤中窗;手動補發 BRIEFING_FORCE=1 bash tools/briefing_runner.sh。機械 pass(15:40–15:58 / 16:15–19:00 ET)、盤中防睡 keep_awake_us.sh 同理;runner 固定 --model sonnet(BRIEFING_MODEL 覆寫)、重試 5 次(2026-08-05 五修:API mid-stream 斷流連殺對策)。三次以上全滅 → 互動 session 手動 /briefing telegram --send 補發(dedup 防重複)
    • Setup 文件:docs/briefing-auto-send.md
    • 今日待辦自動執行(T6.5,2026-09-08 用戶指定):/briefing telegram 產出的「今日待辦」中,屬於機械式清理/停損、SGOV 現金停泊、或 thesis 已確認的新倉/加碼,且觸發條件量化已達成、未被任何硬線(>10%集中/財報窗/R14鎖/檔數上限/position_guard缺口)擋下、且無 T5.5 跨日反轉旗標者,直接下單,不再等用戶確認——因為用戶可能不在電腦前。金額上限 $3,000 只管新增曝險(新倉/加碼);機械減碼/停損/平倉與 SGOV 停泊不設上限(2026-09-14)。選擇權平倉(觸及開倉時寫死的管理線)可自動;開倉不自動。Telegram 訊息內以 ✅ 已自動執行 標註(含單號),不符合條件的仍列 🎯 待辦。細則見 .claude/skills/briefing/SKILL.md Telegram Tier T6.5 節;延伸自既有互動場景「警報先做再報」規則到無人值守場景
    • 防自圓其說雙保險(2026-09-08,同上用戶指定,不用 Codex 版):① T5.5 跨日一致性檢查——每日先讀前一交易日 telegram.txt,同一 ticker 的方向性判斷若無新數據支持卻反轉/升降級,標旗且對 T6.5 自動下單構成硬性攔阻;② T6.5 執行後強制留痕——每筆自動下單同時登錄一筆到期會被機械驗收的 thesis_ledger 條目(含具體證偽點),到期由既有 Step 0.7 due 機制自動驗收,不靠事後記憶
  2. /portfolio-review — full deep report with live data via MCP
    • 無人值守(2026-10-06 用戶指定):launchd com.fadacai.portfolio-review 每 15 分鐘叫 tools/portfolio_review_runner.sh,review_due.py 判到期(>30 天)+ 美東平日 11:30–15:00 盤中才跑 --model opus(一天一次、失敗隔天重試)→ HTML 推報告站 → Telegram(報告首段 ## 0. 本期結論 + 連結);失敗也推。手動 --force / --notify-only <md>
  3. /stock-analysis TICKER — individual stock deep dive
  4. /options-strategy TICKER STRATEGY — options calculation (supports multi-ticker comparison)
  5. /trade-journal log|review|summary|auto — trade records
  6. /mcp-health — test all MCP server connections
  7. /event-vol-scan [days] [TICKER ...] — 財報/CPI/FOMC 前末日 buy call / 雙買 straddle 機會掃描(引擎 tools/event_vol_scan.py;賣方策略不適用、仍守財報 ±48h 禁令)
  8. /trade-review [2w|4w|since YYYY-MM-DD] — 每兩週交易檢討(自我進化引擎):歸因每筆成交是「系統決策」還是「脫離 plan 的自主決策」,算三個並列指標、驗影子訊號、更新 feedback/RULES-LEDGER.md 規則命中率,輸出「本期該改哪一條規則」。引擎 tools/trade_ledger.py;briefing 距上次 >14 天會提醒。每期加跑帳戶級四指標(期間報酬/CAGR/MDD/Sharpe + profit factor):tools/account_metrics.py scan && report --live <即時總值>(淨值標記刮自 journal/briefing 快照,2026-06-01 起;FIFO 已實現含選擇權)
    • 無人值守(2026-09-29 用戶指定):launchd com.fadacai.trade-review 每 15 分鐘叫 tools/trade_review_runner.sh,腳本 TZ=America/New_York 自判 ET 平日 16:45–17:45 起跑 + 當日 marker(一天一次、失敗隔天重試;2026-10-29 修:原 09:30 本地在 Mac 換 CET 後 = 04:30 ET 睡眠中,launchd 沒跑)——review_due.py 判 trade-review 到期(>14 天)才執行 claude -p "/trade-review" --model fable,產出 → generate_html trade-review 推報告站 → Telegram 一則(第 6 節 本期結論 + 網頁連結);登入失效/逾時/無產出也推 Telegram(兩週一次的工作不准靜默失敗)。手動:--force 忽略到期、--notify-only <md> 只做 HTML + 推送。log briefing-out/trade-review-runner.log
    • 交易 α(score):進出對不對。β 對實際使用的基準回歸算(半導體對 SMH、其餘對 SPY)——用券商 β(對大盤測)套 SMH 會嚴重過度調整,結論會反過來
    • 持有 α(holding-alpha):該不該繼續抱。滾動窗 + 建倉至今。沒有這項,純交易指標會獎勵頻繁進出、把「抱對」記為零貢獻;首測持有 α 量級大於交易 α
    • beta capture(beta-capture):行情好的時候吃到沒有。拆基準上漲/下跌日各自回歸 β;up-β < down-β = 漲不上跌得凶。梯級停利 + 買梯會機械性壓低 up-capture,這是純 α 看不見的成本
  9. PMCC 收租候選掃描 — python3 tools/pmcc_scan.py(5 因子計分卡機械化,規則 feedback/pmcc-candidate-discipline.md;每次 /portfolio-review Section I.6 自動跑,找「想留但不看好大漲」的名字轉 poor man's covered call;判斷層留給 /options-strategy)

Read the full file on GitHub · 393 lines

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. 6d ago Changed · +2 lines · +682 tokens per session 2e2d950c3883
  2. 7d ago Changed · +80 tokens per session 4ee7bd854e8d
  3. 9d ago Changed · +22 tokens per session ae81a22199ce
  4. 10d ago Changed · +159 tokens per session 49018e31c1e5
  5. 13d ago Changed · +201 tokens per session be1b4aa3c6c5
  6. 16d ago Changed · +4 lines · +750 tokens per session 7bfa5b069e8a
  7. 17d ago Changed · +2 lines · +261 tokens per session 8f89a586dab1
  8. 24d ago Changed · +1 lines · +258 tokens per session de48131037cd
  9. 28d ago Changed · +105 tokens per session 35cd6d1bb7cf
  10. 29d ago First seen · 384 lines · 18,088 tokens per session scan B 0508e22caa02

Subscribe to this mod's changes

fadacai-portfolio CLAUDE.md is an instructions file published in the GitHub repository PatrickSUDO/fadacai-portfolio (144 stars, last pushed 7d ago), licensed MIT. It adds 20,606 tokens to every session, about $0.0824 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 100% identical to fadacai-portfolio AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

fadacai-portfolio CLAUDE.md compared with instructions from other repositories

fadacai-portfolio CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fadacai-portfolio CLAUDE.mdPatrickSUDO/fadacai-portfolioInstructions file1447d agoMITB20,606Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode