Agent skill

Trade Journal

by PatrickSUDO in PatrickSUDO/fadacai-portfolio

Record trades, track execution vs plan, and review trade history.

MITAuto-check passed

Install Trade Journal

skills CLI
$ npx skills add PatrickSUDO/fadacai-portfolio --skill trade-journal -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PatrickSUDO/fadacai-portfolio trade-journal --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trade-journal .claude/skills/trade-journal && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trade-journal
GitHub stars
142
Token cost
~900 tokens
SKILL.md length
197 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Record trades, track execution vs plan, and review trade history.

  • Works in 2 steps: 若 action 是 auto → 無論今天是否已偵測,都重新執行完整偵測(這是… → 若 action 是 log/review/summary
  • SKILL.md covers Arguments, Step 0: 配置同步 & 倉位偵測, Workflow and File Structure, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Trade Journal is an agent skill from PatrickSUDO/fadacai-portfolio. Record trades, track execution vs plan, and review trade history. Usage - /trade-journal [action] where action is log, review, or summary.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Claude Code 投資研究與組合管理框架:skills + MCP + 第一性原理紀律 + thesis ledger. The licence is MIT.

Example prompts

  • “/trade-journal”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 若 action 是 auto → 無論今天是否已偵測,都重新執行完整偵測(這是 auto 的主要功能)
  2. 若 action 是 log/review/summary

What it can do on your machine

Read from SKILL.md and the folder at commit 25eedc4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trade Journal loads about 900 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 197 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~900

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PatrickSUDO/fadacai-portfolio at commit 25eedc4, republished under its MIT licence (© PatrickSUDO). 197 words, ~900 tokens.

Download SKILL.mdSave it as .claude/skills/trade-journal/SKILL.md (or your agent's skills folder).
name
trade-journal
description
Record trades, track execution vs plan, and review trade history. Usage - /trade-journal [action] where action is log, review, or summary.
user_invocable
true
model
sonnet

Trade Journal

Track trades and compare execution against the investment plan.

Arguments

  • /trade-journal log — Record a new trade (manual or auto-detect from position changes)
  • /trade-journal review — Show recent trades and compare to plan
  • /trade-journal summary — Monthly P&L summary
  • /trade-journal auto — 只做倉位變動偵測(不需手動輸入)

Step 0: 配置同步 & 倉位偵測

0a. 每次必做
  • 讀取 plan.md — 掌握計畫中的待辦操作,用於判斷交易是否「按計畫執行」
  • 讀取 feedback/*.md — 套用交易風格偏好
0b. 倉位取得與 journal 判斷(auto 例外)
  1. 若 action 是 auto → 無論今天是否已偵測,都重新執行完整偵測(這是 auto 的主要功能)
  2. 若 action 是 log/review/summary:
    • 呼叫 mcp__firstrade-server__get_account_position 取得即時持倉
    • 檢查 journal/YYYY-MM-DD.md(今天日期)是否已存在
    • 若已存在 → 跳過偵測,使用即時持倉進入主流程
    • 若不存在 → 執行完整偵測(見下方 Auto-Detect)

Workflow

Auto-Detect(完整偵測流程)

倉位變動自動偵測(後減前):

  1. 呼叫 mcp__firstrade-server__get_account_position 取得即時持倉(後 = 最新倉位)

  2. 找到 journal/ 目錄下最新的 .md 檔案(前 = 上次快照)

  3. 解析「前」檔案的倉位表格:

    • 現股:從「現股持倉」或 Stocks 表格提取 {ticker: quantity}
    • 選擇權:從「選擇權持倉」或 Options 表格提取 {contract: quantity}
  4. 解析「後」(即時持倉)的倉位表格:同上

  5. 比較差異:

    股票:

    for each ticker in 後:
      if ticker not in 前 → 「🆕 新建倉:{ticker} {qty} 股」
      if ticker in 前 and qty changed → 「📈 加碼 / 📉 減碼:{ticker} {前qty} → {後qty}」
    for each ticker in 前:
      if ticker not in 後 → 「🔴 已清倉:{ticker} {前qty} 股」

    選擇權:

    比較合約名稱(Symbol + Strike + Expiry + Type)
    新合約 → 「🆕 新開倉」
    消失的合約 → 「🔴 已平倉/到期」
    數量變化 → 「加減倉」
  6. 輸出偵測結果給用戶確認:

    ## ⚡ 自動偵測到的倉位變動(vs 上次快照 YYYY-MM-DD)
    
    | 類型 | 操作 | 標的 | 變化 | 計畫對應 |
    |------|------|------|------|----------|
    | 股票 | 🆕 新建倉 | DDOG | 57 股 | ✅ SaaS建倉計畫 #1 |
    | 股票 | 🔴 清倉 | DY | 18 股 | ❓ 非計畫操作 |
  7. 計畫對應:比對 plan.md 的待辦清單

    • 如果交易匹配計畫中的操作 → 標記 ✅ 並引用計畫編號
    • 如果是計畫外操作 → 標記 ❓ 提醒用戶記錄原因
Log a Trade
  1. 如果 auto-detect 已偵測到變動 → 以偵測結果為基礎,詢問用戶補充:
    • 交易價格(auto-detect 無法得知)
    • 交易原因
    • 是否按計畫執行
  2. 如果用戶手動提供交易資訊 → 直接記錄
  3. 建立/更新檔案:journal/YYYY-MM-DD.md

日記檔案格式:

markdown
# 交易日誌 — YYYY/MM/DD

## 帳戶總覽
| 項目 | 數值 |
|------|------|
| 股票市值 | $XXX,XXX |
| 選擇權市值 | $XX,XXX |
| 總資產 | ~$XXX,XXX |
| 今日變動 | +/- $X,XXX (+/- X.XX%) |
| 總損益 | +/- $X,XXX (+/- X.XX%) |

## 今日交易
| 時間 | 操作 | 代碼 | 合約 | 數量 | 價格 | 金額 | 計畫對應 |
|------|------|------|------|------|------|------|----------|
(若為自動偵測,時間欄填「—」,價格欄填「待確認」)

## 交易後倉位變化摘要
- TICKER: 前 → 後(描述)

## 現股持倉
| 代碼 | 股數 | 現價 | 成本 | 市值 | 損益 | 損益% |
|------|------|------|------|------|------|-------|
(從即時持倉取得,作為下次比較的快照)

## 選擇權持倉
| 代碼 | 合約 | 數量 | 現價 | 成本 | 市值 | 損益 | 損益% |
|------|------|------|------|------|------|------|-------|
(從即時持倉取得)

## 備註
- 用戶補充的交易原因和覆盤筆記
  1. 記錄完成後,檢查是否需要更新配置計畫:
    • 提示用戶:「此交易是否需要更新 plan.md?」
Review
  1. 讀取 journal/ 目錄下所有檔案
  2. 讀取 plan.md
  3. 生成:
markdown
## Trade Review

### 計畫執行進度
| # | 計畫操作 | 狀態 | 執行日期 | 備註 |
(從配置計畫的「待執行操作」逐項對照)

### 計畫外交易
| 日期 | 操作 | 標的 | 原因 |

### 交易統計(本月)
- 總交易次數: XX
- 勝率: XX%
- 平均盈利: XX%
- 平均虧損: XX%
- 最佳交易: ...
- 最差交易: ...
Summary
  1. 計算月度 P&L
  2. 選擇權收入統計(premium 收入 vs 到期損益)
  3. 組合價值變化趨勢
  4. 計畫執行率(完成 / 總待辦)

File Structure

journal/
├── 2026-03-03.md    ← 每日一檔(含完整倉位快照)
├── 2026-03-04.md
└── ...

Create the trade-journal directory if it doesn't exist.

重要:倉位快照

每個 journal 檔案都必須包含完整的「現股持倉」和「選擇權持倉」表格, 這是下次「後減前」比較的數據來源。沒有快照就無法偵測變動。

Output Language

Use Traditional Chinese (繁體中文) for all text output.

© PatrickSUDO, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/trade-journal of PatrickSUDO/fadacai-portfolio.

Open the folder on GitHubat commit 25eedc4

Compare with similar skills

Trade Journal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trade Journal compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trade Journal this skillPatrickSUDO/fadacai-portfolio142—~900Automated safety check: PassMIT
Recordingcodewhale-hq/Codewhale41k—~540Automated safety check: PassMIT
Agent Trading Predictorruvnet/ruflo74k2 repos~2.5kAutomated safety check: PassMIT
LLM Trading Agent Securityaffaan-m/ECC276k2 repos~1.2kAutomated safety check: PassMIT
Trade Journal AnalysisHKUDS/Vibe-Trading35k—~1.8kAutomated safety check: PassMIT
Trading Ledgersickn33/agentic-awesome-skills47k1 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Recording

    codewhale-hq/Codewhale

    Capture screenshots on registered computers, record on macOS or HarmonyOS, and manage saved captures.

    41k GitHub stars~540 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Agent skill for trading-predictor - invoke with $agent-trading-predictor

    74k GitHub starsUsed in 2 repos~2.5k tokens
    Business, Finance & HRAuto-check passed
  • Security patterns for autonomous trading agents with wallet or transaction authority.

    276k GitHub starsUsed in 2 repos~1.2k tokens
    SecurityAuto-check passed
  • Trade Journal Analysis

    HKUDS/Vibe-Trading

    Reads a broker export of your trades (CSV or Excel), builds a trading profile and runs four behavior checks: disposition effect, overtrading, chasing and anchoring.

    35k GitHub stars~1.8k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Trading Ledger

    sickn33/agentic-awesome-skills

    A trading journal that captures the decision, not just the fill: thesis, plan, and emotion at the moment of entry, written to the user's own Notion database; reviews grade decisions, not P&L.

    47k GitHub starsUsed in 1 repo~2.2k tokens
    Business, Finance & HRAuto-check passed
  • Pair Trading Signals

    HKUDS/Vibe-Trading

    Trades mean reversion between two correlated instruments using the Z-score of their price ratio, going long one leg and short the other when the ratio stretches.

    35k GitHub stars~651 tokensUpdated yesterday
    Business, Finance & HRAuto-check passed

More from PatrickSUDO/fadacai-portfolio

All 10 skills in this repo
  • Portfolio Review

    PatrickSUDO/fadacai-portfolio

    Fetch live brokerage positions and generate a comprehensive portfolio report with sector allocation, P&L analysis, options summary, and risk assessment.

    142 GitHub stars~6.9k tokensUpdated yesterday
    Auto-check passed
  • Ev Check

    PatrickSUDO/fadacai-portfolio

    強制 first-principles 機率分布 + EV 計算。用於檢查當前組合在指定時間窗的預期報酬,禁止用 default bell shape 或質性語言。Usage - /ev-check [30d|7d|14d] [optional scenario theme]

    142 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Event Vol Scan

    PatrickSUDO/fadacai-portfolio

    財報/重大事件(CPI/FOMC)前的末日 buy call 與雙買 straddle 機會掃描。Usage - /event-vol-scan [days] [TICKER ...](預設窗 14 天,掃持倉 + L1 候補 + SPY/QQQ 宏觀事件)

    142 GitHub stars~891 tokensUpdated yesterday
    Auto-check passed
  • MCP Health

    PatrickSUDO/fadacai-portfolio

    Test all MCP server connections and report health status. An agent skill from PatrickSUDO/fadacai-portfolio.

    142 GitHub stars~569 tokensUpdated yesterday
    Auto-check passed
  • Options Strategy

    PatrickSUDO/fadacai-portfolio

    Calculate and compare options strategies (sell put, covered call, LEAPS, naked call) for a given ticker.

    142 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Todo

    PatrickSUDO/fadacai-portfolio

    生成下一個交易日的優先行動清單。當用戶問「明天開盤要做什麼」、「今天要操作什麼」、「給我待辦」、「接下來要做什麼」、「有什麼需要處理」等問題時立刻使用此 skill。也適用於盤中(「現在有什麼要做」)和盤後(「今天還有什麼沒做」)場景。不要等用戶說 /todo 才觸發,只要問的是「下一步行動」的問題就應該用。

    142 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Questions about Trade Journal

What does Trade Journal do?

Record trades, track execution vs plan, and review trade history. Trade Journal is an agent skill from PatrickSUDO/fadacai-portfolio. Record trades, track execution vs plan, and review trade history.

How do I install Trade Journal in Claude Code?

Run `npx skills add PatrickSUDO/fadacai-portfolio --skill trade-journal -a claude-code`. Or copy the skill folder (.agents/skills/trade-journal in PatrickSUDO/fadacai-portfolio) into .claude/skills/trade-journal in your project. Claude Code loads it when a task matches its description.

How do I install Trade Journal in Codex?

Run `npx skills add PatrickSUDO/fadacai-portfolio --skill trade-journal -a codex`. Or copy the skill folder (.agents/skills/trade-journal in PatrickSUDO/fadacai-portfolio) into .agents/skills/trade-journal in your project. Codex loads it when a task matches its description.

Can I use Trade Journal in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PatrickSUDO/fadacai-portfolio --skill trade-journal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trade-journal, .gemini/skills/trade-journal, .github/skills/trade-journal and .opencode/skills/trade-journal in your project.

What does Trade Journal need to run?

SKILL.md names no scripts, command-line tools or credentials: Trade Journal is instructions for the agent only.

Does Trade Journal access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Trade Journal safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Trade Journal use?

Trade Journal is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trade Journal use?

About 900 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trade Journal?

Skills that share tags, products or a category with Trade Journal: Recording (codewhale-hq/Codewhale, 41k stars), Agent Trading Predictor (ruvnet/ruflo, 74k stars), LLM Trading Agent Security (affaan-m/ECC, 276k stars) and Trade Journal Analysis (HKUDS/Vibe-Trading, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trade Journal?

PatrickSUDO (a GitHub user) maintains it in PatrickSUDO/fadacai-portfolio, which has 142 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 8, 2026.

Source: PatrickSUDO/fadacai-portfolio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.