fadacai-portfolio: Instructions file for Claude Code

AGENTS.md

fadacai-portfolio AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from PatrickSUDO/fadacai-portfolio. It costs 13,173 tokens per session, scanned B, original, MIT.

A set of instructions for an AI coding agent working in an investment research and portfolio-management workspace. It defines language, report formats, workflows, and optional second-opinion checks.

In plain words
What is it for?
It guides daily market briefings, portfolio reviews, stock analysis, and scheduled report delivery in Traditional Chinese.
Why use it?
It gives the agent project-specific rules for handling stock, options, and portfolio work instead of relying on general assumptions.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also runs codex exec. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

This is PatrickSUDO/fadacai-portfolio's own configuration. It tells Claude Code, Codex and OpenCode 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/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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio

Made for: Claude Code, Codex, OpenCode.

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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/patricksudo/fadacai-portfolio/agents-md.svg)](https://agentmods.dev/instructions/patricksudo/fadacai-portfolio/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/patricksudo/fadacai-portfolio/agents-md"><img src="https://agentmods.dev/badge/instructions/patricksudo/fadacai-portfolio/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 13,173 This file is loaded in full into every session.
When invoked 13,173 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 original No closer match found 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.13173 $0.13173
Opus 5 $0.06587 $0.06587
Sonnet 5 $0.02635 $0.02635
Haiku 4.5 $0.01317 $0.01317

Measured today against content hash db05e7bb9f2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

fadacai-portfolio AGENTS.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 today.

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

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 360 lines

How it starts

The opening of the file, as written. The whole thing — 360 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

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 每個交易日 CEST 17:00 自動執行 /briefing telegram --send(週五加 --codex);runner 固定 --model sonnetBRIEFING_MODEL 覆寫)、重試 5 次(2026-08-05 五修:API mid-stream 斷流連殺對策)。三次以上全滅 → 互動 session 手動 /briefing telegram --send 補發(dedup 防重複)
    • Setup 文件:docs/briefing-auto-send.md
  2. /portfolio-review — full deep report with live data via MCP
  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 已實現含選擇權)
    • 交易 αscore):進出對不對。β 對實際使用的基準回歸算(半導體對 SMH、其餘對 SPY)——用券商 β(對大盤測)套 SMH 會嚴重過度調整,結論會反過來
    • 持有 αholding-alpha):該不該繼續抱。滾動窗 + 建倉至今。沒有這項,純交易指標會獎勵頻繁進出、把「抱對」記為零貢獻;首測持有 α 量級大於交易 α
    • beta capturebeta-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 · 360 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. today Changed · +7 lines · +970 tokens per session db05e7bb9f2f
  2. 8d ago First seen · 353 lines · 12,203 tokens per session scan B 5c2bd35ea11c

Subscribe to this mod's changes

fadacai-portfolio AGENTS.md is an instructions file published in the GitHub repository PatrickSUDO/fadacai-portfolio (138 stars, last pushed today), licensed MIT. It adds 13,173 tokens to every session, about $0.0659 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens