5minbtc logo

5minbtc

Community
aAAaqwq
5minbtc

BTC 5分钟K线实时方向预测 + 币安预测市场错价套利(paper)。v6.0 真OFI驱动: 方向由当前K线原生 in-candle OFI 净流一票决定(ofi_n=2*(tb/v)-1, REST klines[9] 聚合, 零WS依赖; WS ofi.json 做新鲜度反转保护与交叉校准), 概率=P(close>open|ofi) 经验校准表+Bayesian shrink, edge=EV=p−ask 错价检测, 方向二选一无中性。13因子自v5.9起收敛到3个有证据信号且不再决定bias。黑天鹅防护: ATR spike+FNG<25。launchd 常驻 realtime/watch/trader。⚠️ Binance 端点**人工**双向切换(引擎为单端点硬依赖,无自动故障切换;2026-09-11 曾因 data-api SSL 失败静默断档 6h)。

Overview

PublisheraAAaqwq
RepositoryAGI-Super-Team
Skill name5minbtc
Stars
98
Forks
23
Bundled files
69
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.

  • 69 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the 5minbtc 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.
  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/aAAaqwq/AGI-Super-Team.git /tmp/AGI-Super-Team
mkdir -p .claude/skills
cp -r /tmp/AGI-Super-Team/skills/5minbtc .claude/skills/5minbtc
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 5minbtc 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 5minbtc 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 5minbtc 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.

5minbtc — BTC 5分钟实时预测 v6.0.0

BTC 单根 5min K线 方向 + 收盘价预测。引擎+LLM 混合架构。 SKILL.md 是索引, 详细内容见 references/ v5.9 认知转变: 从"13因子预测器"→"3信号错价检测器" — 方向准确率不是 edge, EV = p − P − 成本 才是 (见 对抗式审查报告) v6.0 执行转变: 方向从"body 延续统计"改成真 OFI 净流一票决定 — 赌的是"净流已发生、token 价还没定价"的 flow-gap

⚠️ 同名易混: 本 skill 只做 BTC 单标的 5min 方向 + 预测市场 EV。要做全市场永续的量价突破扫描, 用 coin-vp-scanner — 两者区别见下方 与 coin-vp-scanner 的分工

触发

5minbtc / 5min btc / btc 5min / 监控 (配合持续盯盘)

何时使用

场景做法
当前 5min K线 方向+价位✅ 标准流程, 方向=OFI 净流, edge=错价 EV (v5.8 零前视回测 61.4% 是延续性不是 alpha, 见性能快照)
会话内持续盯盘, 等明确信号✅ 监控模式 (scripts/5minbtc-monitor.py + Monitor 工具)
币安预测市场 Up/Down 5m 交易✅ paper 模拟/实时监控 (见 预测市场策略)
"今晚 BTC 涨跌" (宽窗口)⚠️ 跑当前 K线 + 给方向倾向, 标注"超出引擎置信区间"
"下根 K线" / "1小时后"引导在该 K线 起始时间再触发

监控模式 (Claude Code)

详见 monitoring-claude-code.md

bash
# 无限持续, 直到用户喊停 (会话内盯盘推荐)
Monitor(command: "python3 <SKILL>/scripts/5minbtc-monitor.py --max-runs 0", persistent: true)

# 默认 20 次采样 (约 40 分钟)
python3 <SKILL>/scripts/5minbtc-monitor.py

# 单次判断 (非持续)
python3 <SKILL>/scripts/5minbtc-monitor.py --dry-run
  • 明确信号 = bias 非中性 + strength∈{medium,moderate,strong} + conf≥50 → 自动停 (⚠️ 实测引擎 strength 输出 medium, 判定集合需同时含 mediummoderate)
  • 每根 K 线第 2/3 分钟采样 (progress ~40-70%), 比 cron 第 4 分钟更早
  • 事件流: START / DIR-CHANGE / CLEAR-SIGNAL / ENGINE-ERR / MAX-RUNS
  • 停止: 用户说「停/结束」→ TaskStop 停 Monitor
  • CLEAR-SIGNAL 后必须拉一次完整引擎快照二次确认
  • 引擎验证: python3 scripts/test_engine.py (13 项, 自带 runner 无需 pytest; 慢测加 --slow) — 装了 pytest 也可 python3 -m pytest scripts/test_engine.py -v (原文件名 test_engine_v58.py 带版本号, 引擎升到 v6.0 后即漂移, 2026-09-10 改为不带版本号)

快速开始

bash
SKILL_DIR=/home/aa/.hermes/profiles/cqo/skills/5minbtc

# 1. 并行: 引擎 + 新闻 + settle (前一根)
python3 $SKILL_DIR/5minbtc-log.py settle-all 2>&1
python3 $SKILL_DIR/5minbtc-engine-v6.0.py 2>&1
python3 $SKILL_DIR/5minbtc-news.py 2>&1

# 2. 3 路 web_search (并行)
# "Bitcoin BTC breaking news price" / "crypto market macro stocks today" / "比特币 BTC 最新 晚间"

# 3. LLM 分析 → 输出 (见 output-template.md)
# 4. 写日志
python3 $SKILL_DIR/5minbtc-log.py log \
  "<candle.iso>" <pred_close> <pred_high> <pred_low> \
  <conf> <bias> <news_sent> <vol_pct>

架构 (1 行/组件)

  • 引擎 5minbtc-engine-v6.0.py (v6.0, 输出 "version": "6.0.0"): bias 由真 OFI 净流一票决定 (ofi_n>0→bull / <0→bear, 二选一无中性; ofi_n 缺失/为0 用 body 符号兜底并标 meta.body_fallback) + 概率 P(close>open|ofi) 三层(经验校准表 Bayesian shrink + flow-gap + 最近60s流) + 三层独立过滤(多周期4h/1h/15m 结构 + 跨资产ETH/SOL 广度 + WS OFI 新鲜度反转保护) + 9路并行HTTP
    • ⚠️ K 线开局阶段概率不可信(已知问题,见 pitfalls):主源 ofi_n = 2*(tb/v)−1 取自当前进行中的 K 线,_ofi_native() 只挡 v<=0无最小样本量保护 → 开局几秒的少量成交就能把 ofi_n 推到 ±0.9。而 vol_gate(L692 按 MIN_VOL_FRAC=0.25 判断流量是否够)算出来但从不参与任何决策,只是输出里的装饰字段。建议只在进度 ≥40% 后采信概率/下单
    • 门限: T_OFI_GATE=0.20 / T_OFI_60=0.35 / WS 质量闸 OFI_CR_MIN=0.80 / OFI_BAYES_N=30
    • 13 因子仍计算并输出(JSON 契约保留), 但自 v6.0 起不参与 bias 决策 — score 只用于 strength 标签与 LLM 参考
  • 订单流 scripts/ofi_feed.py: trade+bookTicker 组合流 tick规则推断主动买卖, 写 ~/bb-auto/ofi.json, 带 ts 保鲜(>30s 引擎降级为只信 REST 主源) (launchd: com.daniel.ofi-feed)
  • 日志 5minbtc-log.py: jsonl 追加 + 增量 settle (写入 logs/)
  • 新闻 5minbtc-news.py: CoinDesk RSS (唯一稳定源, ~14min 延迟)
  • 常驻进程 (launchd): 5minbtc_realtime.py (5s 刷新, 预测快照+EV下单) / 5minbtc_watch.py / 5minbtc_trader.py --paper-monitor
  • LLM: 因子打分基准 + LLM 综合裁决 + 模板输出

铁律

  1. 每次必须重新执行引擎脚本 — 不缓存
  2. 每次必须重新搜索3组新闻
  3. 先 settle 上一根, 再 log 新预测
  4. LLM 可微调引擎的 pred_close/range, 但必须说明理由 ⚠️ bias 不要轻易覆盖 (v6.0): 方向是 OFI 一票决定的, LLM 用因子/新闻翻方向 = 退回被证伪的路径。 仅在 meta.body_fallback=True 或 OFI 数据缺失时才允许改 bias, 并显式写明原因。
  5. 输出 15-25 行 (平衡深度和 Telegram 可读性)

关键裁决规则 (⚠️ 历史规则: v5.7.x 因子打分路径)

v6.0 起 bias 由真 OFI 一票决定, 下列规则不再决定方向。 仅在两条兜底路径上仍有参考价值: ① meta.body_fallback=True (ofi_n 缺失/为0, 方向退回 body 符号) ② LLM 复核时解释 meta 冲突字段。 引擎的 raw score 仍输出, 但只影响 strength 标签, 不影响 bias。

  • half_body vs imbalance 冲突 (v5.7.2): |half_body|>0.25 + |imbalance|>0.5 + progress≥45% → 优先 half_body (注: 两者自 v5.9 起权重已清零)
  • TREND 强趋势 decel 约束 (v5.7.4): EMA delta>$100 时 |decel|>0.7 需 |half_body|>0.15 同向确认
  • fatigue≥0.8: conf 上限 40, 反向 +10pp
  • chainlink_offset 矛盾: bias=bull 但 pred_close<current → 以 current 为锚 ±ATR×0.3
  • 极端进度 (>80%): pred_close 按剩余时间比例缩放
  • Body=0 持续模式: pred_close → current ± ATR×0.2, conf 降至 35-42%

性能快照 (2026-09-10 更新)

数字口径以 对抗式审查报告 为准 — 旧数字多数含前视偏差。

  • v5.7 回测 71.2% 含前视偏差(文件里自己标注"已知"); 零前视 v5.8: 前2根1min=61.4%, 前4根=69.5%
  • 但 61–70% 是"看着 K 线走完再确认"的延续性, 不是 alpha — 做市商已把它定价进 token 价
  • 去掉水分后的真实基准: non-neutral 方向 57.7% | bull 63.9% (唯一显著) | bear 50.0% = 纯硬币
  • paper 交易: 全样本 UP 成交 44% (+$0.24) | 甜区 UP ask 0.40–0.50 → 60% (+$1.39) ← 唯一正 EV 区间
  • 结论: edge 不在方向准不准, 在 EV = p − P − 成本 > 0。v6.0 的错价检测(flow-gap)就是直接做这件事。
  • 当前 LLM: zai/glm-5.2 (8-15s/次) | opencaio 实测 MiniMax-M3 ~2.7s 可作更快选项

📚 引用索引 (references/)

核心方法论

  • strategy-adversarial-review.md对抗式审查报告: 第一性原理 + 13因子证伪 + 该留/删/缺失 + P0/P1/P2行动清单 (v5.9 依据)
  • lessons.md25 条核心教训 (必读, 含 2026-07-05 新增 23-25)
  • pitfalls.md20 条 pitfalls 集中索引 (必读, 含并行 max() 评估陷阱; #18 = K线开局概率不可信; #19 = "真OFI" 只覆盖单一市场; #20 = 端点故障致静默断档)
  • changelog.md — v5.0 ~ v6.0 详细变更
  • skill-organization.mdSkill 文件结构模式 (可复用) — SKILL.md INDEX + references/ 分专题

执行与输出

数据源 & 网络

Binance 三种故障模式各一份(431/451 区域、隧道抖动、高延迟 SSL 超时),不是重复文档,见 setup-from-scratch.md §6

引擎专项

回测 & 复盘

数据采集 & 仓库

  • sync-procedure.md — AGI-Super-Team 同步流程 (路径映射 + -c 校验 + logs 归档策略)
  • archive.md版本归档: v5.0→v6.0 沿革 + 哪些版本已不可取回 + 归档 SOP
  • setup-from-scratch.md从零搭建: 依赖/目录/密钥/6 个 launchd 服务/验证清单/日志轮转/故障表
  • scheduled-tasks.md系统级定时任务教程: 常驻型vs定时型 / 2 个任务 / launchd+cc-connect+hermes 三路线 / plist 模板 / 13 条坑
  • quant-knowledge-index.md — 50 轮蒸馏知识库索引

复盘记录

⚠️ reviews/ 目录本地不存在 —— 早期文件树声称有 23 份按月归档的复盘记录(2026-05/06/07),实际从未落盘。 复盘结论目前散落在 lessons.mdpitfalls.mdstrategy-adversarial-review.mdreports/ 里。 若要恢复这个习惯,需先补 review-procedure.md 的落盘步骤,别只在文档里声明。

报告库

14 份深度蒸馏报告在 reports/ 目录 (也同步在 AGI-Super-Team): R01-R14。

与 coin-vp-scanner 的分工

两个都是交易类 skill, 但赌的不是同一件事, 不要混用:

5minbtc (本 skill)coin-vp-scanner
标的单标的 BTC全量币安 USDT 永续
周期单根 5min K线1–30min 短线
核心逻辑真 OFI 净流 + 错价检测 (净流已发生、token 价未定价 → flow-gap)确定性结构突破 (放量 + 强实体 + 收盘破 1h 结构位 + 趋势同向, 四条全 ✓)
决策依据概率 P(close>open|ofi) vs 市场 token 价 → EV = p − P结构规则布尔判定, 非概率
输出方向 bull/bear + 概率 + edge杠杆 / TP / SL 交易卡
落地方式预测市场 Up/Down token, 仅 paper (LIVE_GATE 硬闸门)直接做合约短线
代码位置本目录自包含 (引擎+脚本+launchd)代码在 ~/projects/coin-vp-scanner/, 本 skill 只是索引

一句话选型: 要赌"市场定价错了" → 5minbtc; 要抓"价格放量破位了" → coin-vp-scanner。

仓库同步

详见 sync-procedure.md。简述:

bash
rsync -av --exclude='data/' --exclude='__pycache__/' \
  --exclude='*.jsonl' --exclude='*.jsonl.*' --exclude='*.gz' \
  /home/aa/.hermes/profiles/cqo/skills/5minbtc/ \
  /home/aa/clawd/repos/AGI-Super-Team/skills/5minbtc/
cd /home/aa/clawd/repos/AGI-Super-Team
git add skills/5minbtc/ && git commit -m "sync(skills/5minbtc): <版本>" && git push origin main

回测系统

backtest/
├── fetch_data.py            # Binance 历史数据下载
├── run_backtest.py          # v5.6 回测 (因子无预测力, 公平回测)
├── run_backtest_v57.py      # v5.7 回测 (含前视偏差, 已知)
├── run_backtest_v58.py      # v5.8 回测 (真实 1min 半 K线, 零前视) ← 推荐
├── run.sh                   # 一键运行
├── data/                    # 5min (105K) + 1min (259K) K线
└── results/                 # 回测结果 (gitignore)

文件结构

5minbtc/
├── SKILL.md                      # 本文件 (~170 行 INDEX)
├── 5minbtc-engine-v6.0.py        # 主引擎 (v6.0 真OFI 一票定方向, launchd 调用)
├── 5minbtc-news.py               # 新闻扫描 (CoinDesk RSS, 唯一稳定源)
├── 5minbtc-log.py                # 日志记录 (写入 logs/)
├── logs/                         # 日志 (当月 live + 历史按月压缩)
│   ├── 5minbtc-log.jsonl         # 当月 live (不入库)
│   └── archive/*.jsonl.gz        # 月度压缩归档 (入库, 见 archive.md)
├── references/                   # 24 份专项 ref (含 skill-organization 模式)
├── backtest/                     # 回测系统 (results/ 不入库)
├── data/                         # 运行时 (news-risk-level.json 等)
├── scripts/                      # 复盘/监控/交易脚本
│   ├── 5minbtc-monitor.py        # ★ 监控脚本 (Claude Code Monitor 集成, v1.0)
│   ├── 5minbtc_watch.py          # ★ Telegram 推送监控 daemon (事件驱动+预测记录+收盘结算)
│   ├── 5minbtc_day_stats.py      # 预测战绩查询 (今日/历史, --push 推送)
│   ├── 5minbtc_trader.py         # ★ 币安预测交易桥接 (--once/--loop/--monitor/--paper/--paper-monitor)
│   ├── prediction_ws_feed.py     # 币安 w3w-prediction WS 实时价源 (<200ms)
│   ├── ofi_feed.py               # ★ 真订单流采集 (trade+bookTicker, launchd com.daniel.ofi-feed)
│   ├── 5minbtc_keyless_paper.py  # 免密钥模拟盘 (公开BTC数据模拟UP/DOWN价)
│   ├── telegram_push.py          # 通用 Telegram 推送助手
│   ├── daily-review-stats.py
│   └── fetch-github-repo.sh

⚠️ archive/ 目录与 reviews/ 目录本地并不存在 —— 本文件早期版本的文件树里声称有它们(还列了 23 份复盘),属于文档/现实漂移,已更正为上面的实际结构:

  • 旧版本引擎源码不保留在本地,只留文字归档 → references/archive.md
  • 每日复盘从未落盘到 reviews/,复盘结论散在 references/lessons.md / pitfalls.mdreports/

最后更新: 2026-09-10 — 引擎 v5.7→v6.0 改名 (文件/SKILL/引用全线对齐, 修引擎内"无中性"过期注释) + SKILL.md 版本刷到 6.0.0 + 性能快照改为审查后的诚实口径 + 补 v5.9/v5.10/v6.0 changelog + 新增与 coin-vp-scanner 的分工说明 + 修文件树未闭合的代码块与 archive//reviews/ 假目录声明 + 新增 archive.mdsetup-from-scratch.md + logs 月度压缩归档入库

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 9 more files.

Frequently asked questions

What does the 5minbtc AI skill do?

BTC 5分钟K线实时方向预测 + 币安预测市场错价套利(paper)。v6.0 真OFI驱动: 方向由当前K线原生 in-candle OFI 净流一票决定(ofi_n=2*(tb/v)-1, REST klines[9] 聚合, 零WS依赖; WS ofi.json 做新鲜度反转保护与交叉校准), 概率=P(close>open|ofi) 经验校准表+Bayesian shrink, edge=EV=p−ask 错价检测, 方向二选一无中性。13因子自v5.9起收敛到3个有证据信号且不再决定bias。黑天鹅防护: ATR spike+FNG<25。launchd 常驻 realtime/watch/trader。⚠️ Binance 端点**人工**双向切换(引擎为单端点硬依赖,无自动故障切换;2026-09-11 曾因 data-api SSL 失败静默断档 6h)。

Why use 5minbtc on TypingMind?

Because you install it once and use it with any model. 5minbtc 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 5minbtc in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aAAaqwq/AGI-Super-Team/tree/main/skills/5minbtc. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use 5minbtc?

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 5minbtc?

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

Is the 5minbtc AI skill free?

Yes. It is published on GitHub by aAAaqwq 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 👇