Trade Journal logo

Trade Journal

Community
PatrickSUDO
trade-journal

Record trades, track execution vs plan, and review trade history. Usage - /trade-journal [action] where action is log, review, or summary.

Overview

PublisherPatrickSUDO
Repositoryfadacai-portfolio
Skill nametrade-journal
Stars
144
Forks
12
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by PatrickSUDO on GitHub. Read the source before you install it.

Installation

Install the Trade Journal AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/trade-journal
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PatrickSUDO/fadacai-portfolio.git /tmp/fadacai-portfolio
mkdir -p .claude/skills
cp -r /tmp/fadacai-portfolio/.agents/skills/trade-journal .claude/skills/trade-journal
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Trade Journal in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Trade Journal on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Trade Journal is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Trade Journal AI skill do?

Record trades, track execution vs plan, and review trade history. Usage - /trade-journal [action] where action is log, review, or summary.

Why use Trade Journal on TypingMind?

Because you install it once and use it with any model. Trade Journal is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Trade Journal in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/PatrickSUDO/fadacai-portfolio/tree/main/.agents/skills/trade-journal. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Trade Journal?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Trade Journal?

As many as you like. As long as a model supports skills, you can use Trade Journal with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Trade Journal AI skill free?

Yes. It is published on GitHub by PatrickSUDO under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇