Anti Gambling Trader
mars-tw/anti-gambling-trader-tw
分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…
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.
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install HKUDS/Vibe-Trading trade-journal --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/trade-journal .claude/skills/trade-journal && rm -rf skills-srcUse ~/.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/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .claude/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journalType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install HKUDS/Vibe-Trading trade-journal --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agent/src/skills/trade-journal .agents/skills/trade-journal && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .agents/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install HKUDS/Vibe-Trading trade-journal --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agent/src/skills/trade-journal .cursor/skills/trade-journal && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .cursor/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/HKUDS/Vibe-Trading.git --path agent/src/skills/trade-journal--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install HKUDS/Vibe-Trading trade-journal --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agent/src/skills/trade-journal .gemini/skills/trade-journal && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .gemini/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install HKUDS/Vibe-Trading trade-journalInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .github/skills && cp -r skills-src/agent/src/skills/trade-journal .github/skills/trade-journal && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .github/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill trade-journal -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install HKUDS/Vibe-Trading trade-journal --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agent/src/skills/trade-journal .opencode/skills/trade-journal && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "trade-journal" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/trade-journal into .opencode/skills/trade-journal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trade-journal", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
trade-journalReads a broker export of your trades (CSV or Excel), builds a trading profile and runs four behavior checks: disposition effect, overtrading, chasing and anchoring.
You hand the agent a broker export and it calls the `analyze_trade_journal` tool, which detects the format on its own: Tonghuashun and Eastmoney A-share CSVs, Futu Hong Kong and US CSVs, or any generic CSV with datetime, symbol, side, quantity and price columns. The profile covers holding days, trade frequency, win rate, profit-and-loss ratio, cumulative profit, maximum drawdown, top symbols and the spread across markets and hours of the day.
Four behavior diagnostics each come with a low, medium or high severity and numeric evidence: disposition effect, overtrading, chasing momentum and anchoring. The tool runs in full, profile-only or behavior-only mode and can filter by date range, symbol or market. Profit and loss uses FIFO lot matching, and open positions are left out of the win-rate figures. The agent then writes one dense Markdown report in your language. The strategy extraction layer is still a placeholder.
Read from SKILL.md and the folder at commit b1f6ce7. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Trade Journal Analysis loads about 1.8k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 466 words of instructions outside code blocks.
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.
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.
The full file from HKUDS/Vibe-Trading at commit b1f6ce7, republished under its MIT licence (© HKUDS). 466 words, ~1,768 tokens.
.claude/skills/trade-journal/SKILL.md (or your agent's skills folder).Users upload broker exports (交割单) and get an honest, data-grounded portrait of their own trading. Two layers are live:
Strategy extraction → backtest bridge lands in Phase 4c.
Supported formats (auto-detected):
datetime/symbol/side/qty/priceCall the analyze_trade_journal tool directly. Never run Python from bash.
analyze_trade_journal(file_path="uploads/xxx.csv")
analyze_trade_journal(file_path="uploads/xxx.csv", analysis_type="profile")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="2026-01 to 2026-03")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="symbol=600519.SH")
analyze_trade_journal(file_path="uploads/xxx.csv", filter_expr="market=china_a")analysis_type:
full (default) — profile + behavior (strategy still placeholder)profile — profile metrics only (fastest)behavior — 4 behavior diagnostics onlystrategy — Phase 4c placeholderfilter_expr (optional):
"YYYY-MM to YYYY-MM" or "YYYY-MM-DD to YYYY-MM-DD""symbol=600519.SH" (exact match on qualified symbol)"market=china_a|us|hk|crypto"{
"status": "ok",
"file": "xxx.csv",
"format_detected": "tonghuashun",
"total_records": 326,
"date_range": "2026-01-06 ~ 2026-03-28",
"symbols_count": 42,
"market": "china_a",
"profile": {
"total_trades": 326,
"total_roundtrips": 118,
"avg_holding_days": 3.2,
"trade_frequency_per_week": 4.1,
"win_rate": 0.48,
"profit_loss_ratio": 1.35,
"total_pnl": 18240.55,
"max_drawdown": -9820.10,
"top_symbols": [{"symbol": "600519.SH", "trades": 14, "total_amount": 1.02e6}, ...],
"market_distribution": {"china_a": 326},
"hourly_distribution": {9: 52, 10: 84, ...},
"roundtrips_sample": [{"symbol": "600519.SH", "buy_dt": "...", "sell_dt": "...", "pnl": 3400.1, "pnl_pct": 0.021, "hold_days": 2.5}, ...]
}
}Note: PnL uses FIFO lot matching; unmatched open positions are excluded from win rate / PnL ratio (only closed round-trips count).
Produce a single markdown report in the user's language. Lead with the top-line numbers, then section-by-section. Keep it dense — this is retail readers skimming on a phone.
## 你的交易画像 — {date_range}
**总体**
- 交易笔数:{total_trades}(完整来回 {total_roundtrips} 次)
- 平均持仓:{avg_holding_days} 天
- 交易频率:{trade_frequency_per_week} 次/周
- 胜率:{win_rate:.0%}
- 盈亏比:{profit_loss_ratio}
- 累计盈亏:{total_pnl}
- 最大回撤:{max_drawdown}
**最常交易的标的**(前 5 名)
| 标的 | 笔数 | 成交额 |
|------|------|--------|
| ... | ... | ... |
**市场分布**
{market_distribution}
**交易时段**
{hourly_distribution — highlight peak hours}
**一句话观察**
(根据数据写 1-2 句:过度交易?只做窄范围标的?集中在某时段?)Guidance:
win_rate < 0.4 AND profit_loss_ratio < 1.0 → explicit warning: losing
on both win rate and payoff. Ask whether they want behavior diagnostics
(Phase 4b) or a cooling-off reality check.avg_holding_days < 1 AND trade_frequency_per_week > 15 → flag
intraday-heavy pattern, note that minute-level backtest would be better.symbols_count <= 3 → concentration risk; ask if they want a sector-
diversification check.After the initial report, users typically ask:
filter_expr="2026-03-01 to 2026-03-31".filter_expr="symbol=600519.SH".market=hk and market=us.Do NOT re-upload — the file path is still valid for subsequent tool calls in the same session.
File not found / Unsupported extension — ask user to re-upload.Unrecognized trade journal format — share the detected columns back to
the user and ask them to rename the key columns to: datetime, symbol, side, quantity, price, amount, fee (generic fallback).No trade records parsed — likely empty file or header-only; ask user to
confirm the export contains actual fills.Under result["behavior"]:
{
"disposition_effect": {
"severity": "high",
"ratio_loss_to_win_hold": 1.69,
"avg_winner_hold_days": 7.4,
"avg_loser_hold_days": 12.5,
"evidence": "Losing roundtrips held 12.5d vs winning 7.4d (ratio 1.69). Classic disposition pattern."
},
"overtrading": {
"severity": "high",
"busy_day_avg_pnl": -2632,
"quiet_day_avg_pnl": 759,
"evidence": "On busy days (≥3 trades) avg PnL -2632; on quiet days (≤1) avg PnL +759. High activity hurts returns."
},
"chasing_momentum": {
"severity": "medium",
"chase_ratio": 0.5,
"buys_evaluated": 4,
"evidence": "2/4 buys (50%) came after a >3% price run-up in the same symbol. Some chasing tendency."
},
"anchoring": {
"severity": "high",
"anchored_symbol_ratio": 0.83,
"symbols_evaluated": 6,
"anchored_symbols": [...],
"evidence": "5/6 frequently-traded symbols stayed in a narrow price band (CV<5%). Strong anchoring."
}
}| Bias | Metric | Medium | High |
|---|---|---|---|
| Disposition effect | avg_loser_hold / avg_winner_hold | ≥ 1.2 | ≥ 1.5 |
| Overtrading | (quiet − busy) / |quiet| day-PnL gap | ≥ 0.3 | ≥ 1.0 |
| Chasing | fraction of buys after 3-trade rolling +3% move | ≥ 40% | ≥ 60% |
| Anchoring | fraction of ≥5-trade symbols with price CV < 5% | ≥ 33% | ≥ 66% |
## 行为偏差诊断
| 偏差 | 严重程度 | 核心证据 |
|------|----------|----------|
| 处置效应 | {high/medium/low} | {evidence} |
| 过度交易 | {...} | {...} |
| 追涨杀跌 | {...} | {...} |
| 锚定效应 | {...} | {...} |
**改进建议**(根据检测到的 high/medium 项生成):
- 处置效应 high → 写死止损(例如 -8%),盈利持仓不要过早兑现
- 过度交易 high → 每日交易次数 <= N 的硬约束
- 追涨杀跌 high → 改买回调而不是新高,设置"涨幅 X% 以上当日不追"规则
- 锚定效应 high → 扩宽价格带,不要死守某个"心理价"Strategy extraction → SignalEngine code gen → auto-backtest lands in Phase 4c. When the user asks for it, respond honestly and offer the behavior diagnostics instead (they're live).
© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agent/src/skills/trade-journal of HKUDS/Vibe-Trading.
Open the folder on GitHubat commit b1f6ce7
Trade Journal Analysis 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Trade Journal Analysis this skillHKUDS/Vibe-Trading | 35k | — | ~1.8k | Automated safety check: Pass | MIT | |
| Anti Gambling Tradermars-tw/anti-gambling-trader-tw | 907 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Data UpdateSixian-Li/plain-backtest | 204 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Regimejackson-video-resources/markov-hedge-fund-method | 484 | — | ~1.6k | Automated safety check: Pass | Custom licence | |
| Trading212 APItrading212-labs/agent-skills | 129 | — | ~11k | Automated safety check: Pass | MIT | |
| Mx Finance Datahiboys/ExploreFinance | 365 | — | ~518 | Automated safety check: Pass | None |
mars-tw/anti-gambling-trader-tw
分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…
Sixian-Li/plain-backtest
Operate and assess the Quant workspace market-data layer through the tested data-update CLI.
jackson-video-resources/markov-hedge-fund-method
Detect the market regime (Bull / Bear / Sideways) for ANY asset and turn it into a tradeable signal or a risk filter.
trading212-labs/agent-skills
This skill should be used when the user asks to "connect to Trading 212", "authenticate Trading 212 API", "place a trade", "buy stock", "sell shares", "place market order",, "place pending order"…
hiboys/ExploreFinance
基于东方财富数据库,支持自然语言查询金融数据,覆盖A港美、基金、债券等多种资产,含实时行情、公司信息、估值、财务报表等,可用于投资研究、交易复盘、市场监控、行业分析、信用研究、财报审计、资产配置等场景,适配机构与个人多元需求。返回结果包含数据说明及 xlsx 文件。Natural language query for financial data across all markets…
hiboys/ExploreFinance
基于东方财富数据库,支持通过自然语言输入筛选A港美股、基金、债券等多种资产,支持多元指标筛选,含技术面、消息面、基本面及市场情绪等,可用于全球资产速筛、跨市场监控、投资组合构建、策略回测等场景。返回结果包含数据说明及 csv 文件。Natural language screener for investment assets across global markets, including…
HKUDS/Vibe-Trading
Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.
HKUDS/Vibe-Trading
Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.
HKUDS/Vibe-Trading
Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.
HKUDS/Vibe-Trading
Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.
HKUDS/Vibe-Trading
Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.
HKUDS/Vibe-Trading
Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.
Works with
Categories
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. You hand the agent a broker export and it calls the `analyze_trade_journal` tool, which detects the format on its own: Tonghuashun and Eastmoney A-share CSVs, Futu Hong Kong and US CSVs, or any generic CSV with datetime, symbol, side, quantity and price columns. The profile covers holding days, trade frequency, win rate, profit-and-loss ratio, cumulative profit, maximum drawdown, top symbols and the spread across markets and hours of the day.
Trade Journal Analysis fits situations like: reviewing your own trading history exported from a broker; checking a trade history for the disposition effect, overtrading, chasing or anchoring; calculating win rate, profit-loss ratio and drawdown from a trade export; narrowing an analysis to a single month, symbol or market.
Run `npx skills add HKUDS/Vibe-Trading --skill trade-journal -a claude-code`. Or copy the skill folder (agent/src/skills/trade-journal in HKUDS/Vibe-Trading) into .claude/skills/trade-journal in your project. Claude Code loads it when a task matches its description.
Run `npx skills add HKUDS/Vibe-Trading --skill trade-journal -a codex`. Or copy the skill folder (agent/src/skills/trade-journal in HKUDS/Vibe-Trading) into .agents/skills/trade-journal in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --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.
SKILL.md names no scripts, command-line tools or credentials: Trade Journal Analysis is instructions for the agent only. Our summary lists: A broker trade export in CSV or Excel format; The `analyze_trade_journal` tool.
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.
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.
Trade Journal Analysis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Trade Journal Analysis: Anti Gambling Trader (mars-tw/anti-gambling-trader-tw, 907 stars), Data Update (Sixian-Li/plain-backtest, 204 stars), Regime (jackson-video-resources/markov-hedge-fund-method, 484 stars) and Trading212 API (trading212-labs/agent-skills, 129 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 35,097 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 9, 2026.
Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.