Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/realnaka/alphaloopnpx agentmods add skills/realnaka/alphaloop/trade-journalWrote 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.
[](https://agentmods.dev/skills/realnaka/alphaloop/trade-journal)<a href="https://agentmods.dev/skills/realnaka/alphaloop/trade-journal"><img src="https://agentmods.dev/badge/skills/realnaka/alphaloop/trade-journal/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.
<a href="https://agentmods.dev/skills/realnaka/alphaloop/trade-journal"><img src="https://agentmods.dev/badge/skills/realnaka/alphaloop/trade-journal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00198 | $0.01605 |
| Opus 5.5 | $0.00079 | $0.00642 |
| Sonnet 5.5 | $0.00040 | $0.00321 |
| Haiku 4.5 | $0.00020 | $0.00161 |
Grade A, and why
trade-journal scanned grade A with 0 findings 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Trade Journal(交易日志:截图/口述 → 结构化录入)
目的:把"建仓即记"变成习惯——每笔交易记下成本价 + 建仓日 + 来源框架,让 openorder
thesis-ledger.md的盈亏栏能自动回填、框架命中率自然累积。这是闭合「分析→建仓→盈亏→校准」环最缺的一步。 接线:归因/落档走openorder;现价算盈亏走stock-data-fetch;截图数字不臆造走claim-verification(看不清的标 ⚠️,不编)。 铁律:交易写入独立的交易日志表,绝不写用户原有的展示/持仓表,避免污染既有结构与数字。
存储后端(默认本地,云端可选)
为了让任何人开箱即用,默认把交易日志存成本地文件,云端表格是可选适配器:
| 后端 | 路径 / 配置 | 适用 |
|---|---|---|
| 本地 CSV(默认) | ${TRADE_JOURNAL:-$HOME/openorder/trade-journal.csv} |
零依赖,纯文本,git 可追踪 |
| 本地 Markdown 表 | ${OPENORDER_HOME:-$HOME/openorder}/trade-journal.md |
想跟 openorder wiki 放一起、用 Obsidian 浏览 |
| 云端表格(可选) | 飞书/Google Sheets/Notion 等,token 放环境变量,不要硬编码进本仓库 | 多端同步 / 团队共享 |
用云端表格时,把 spreadsheet token、sheet_id 等放进你自己的环境变量或本地配置(如
~/.config/trade-journal/config),永远不要把私有 token 提交到任何公共仓库。
表头(统一列结构,CSV/表格通用)
日期,账户,标的,方向,股数,成本价,货币,金额,来源框架,thesis-id,备注
| 列 | 字段 | 说明 |
|---|---|---|
| 日期 | 成交日 YYYY-MM-DD | |
| 账户 | 券商/钱包名 | FUTU/Tiger/IBKR/Wallet… |
| 标的 | ticker 或中文名 | |
| 方向 | 买 / 卖 / 加仓 / 减仓 / 平仓 | |
| 股数 | 数量 | |
| 成本价 | 成交单价 | |
| 货币 | USD/CNY/HKD… | |
| 金额 | 股数×成本价(本币) | |
| 来源框架 | framework:{id} / 直觉 / 消息 / 未归因 |
每笔必确认 |
| thesis-id | 关联 openorder thesis-ledger 的 ID | 可空 |
| 备注 | 截图看不清/存疑的标注在此 |
录入工作流
1. 读输入(截图用 Read 读图 / 口述直接取)
→ 抽取每笔:日期、账户、标的、方向、股数、成本价、货币
→ 看不清的字段标 ⚠️,向用户确认,绝不臆造(claim-verification 纪律)
2. 逐笔确认「来源框架」(关键人机边界,必须问)
→ 这笔是哪个框架/thesis 驱动的?还是直觉/消息/未归因?
→ 这是把人的判断变成可复利训练信号的入口,不能省
3. 追加到交易日志表(仅此独立表,不碰原始持仓表)
→ 本地 CSV:按表头顺序 append 一行(多笔批量);首次创建先写表头
→ 云端表格:用对应 CLI/API append;写前先确认表结构与 sheet_id
(注意各家 append API 的 range 行数必须 ≥ 要写的行数)
4. 联动 openorder(归因闭环)
→ 框架驱动的建仓:在 thesis-ledger 对应/新建 thesis,回填 头寸=framework:X + 成本 + 建仓日
→ 未归因的:标 直觉/消息,列入复盘提醒
→ 追加 openorder log(action=decision)
5. 回执
→ 列出记了哪几笔、来源框架、写到表的第几行;ASK 是否要据此更新持仓敞口
盈亏计算(查询时)
要看盈亏时:从交易日志取成本,用 stock-data-fetch 取现价(标时间+源),盈亏 = (现价−成本价)×股数。铁律:框架对错(thesis 结果)与头寸盈亏分开记分,不用单笔盈亏给框架定生死(见 openorder frameworks/outcome-tracking.md)。
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.
- 2mo ago First seen · 84 lines · 198 tokens per session scan A f25479647be9
trade-journal is a skill published in the GitHub repository realnaka/alphaloop (20 stars, last pushed 4mo ago), licensed MIT. It adds 198 tokens to every session and 1,605 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
trade-journal compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| trade-journalrealnaka/alphaloop | Skill | 20 | 4mo ago | MIT | A | 198 | Claude Code, Codex |
| channel-economicsborghei/Claude-Skills | Skill | 1.1k | 14d ago | none | A | 45 | Claude Code |
| cro-advisorborghei/Claude-Skills | Skill | 1.1k | 14d ago | none | A | 48 | Claude Code |
| ma-playbookborghei/Claude-Skills | Skill | 1.1k | 14d ago | none | A | 47 | Claude Code |
| cfo-advisorborghei/Claude-Skills | Skill | 1.1k | 14d ago | none | A | 41 | Claude Code |
| xlsx-toolkitborghei/Claude-Skills | Skill | 1.1k | 14d ago | none | A | 47 | Claude Code |
| app-store-pricingmarkdavidgan/apple-dev-skills | Skill | 5 | 2mo ago | MIT | A | 66 | Claude Code |