Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/oakshen/crypto-trading-bot/agents-mdgit clone --depth 1 https://github.com/Oakshen/crypto-trading-botWrote 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/instructions/oakshen/crypto-trading-bot/agents-md)<a href="https://agentmods.dev/instructions/oakshen/crypto-trading-bot/agents-md"><img src="https://agentmods.dev/badge/instructions/oakshen/crypto-trading-bot/agents-md.svg" alt="Measured on agentmods" 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.00845 | $0.00845 |
| Opus 5 | $0.00423 | $0.00423 |
| Sonnet 5 | $0.00169 | $0.00169 |
| Haiku 4.5 | $0.00085 | $0.00085 |
Grade A, and why
crypto-trading-bot AGENTS.md 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 6d 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.
What it actually says
AGENTS.md
项目使命
- 基于 Go 的自动加密货币交易智能体,结合 LLM、技术指标与币安期货执行形成端到端闭环
- 通过 Cloudwego Eino Graph 管理多智能体并发(分析→决策→执行),以最少人工干预实现稳定策略迭代
最新亮点
- 外部 Prompt 管理:
prompts/目录可热更新策略文案,通过TRADER_PROMPT_PATH切换不同交易风格 - 动态杠杆:
BINANCE_LEVERAGE=low-high允许 LLM 依据置信度/趋势/波动在区间内自适应,兼顾收益与风险
多智能体工作流
- 并行阶段:
market_analyst负责 OHLCV 与技术指标;sentiment_analyst从 CryptoOracle 拉取情绪 - 顺序阶段:
crypto_analyst汇总币种专属数据,随后position_info查询币安持仓 - 决策阶段:
trader等待所有上下游数据,优先调用 OpenAI,失败时回落到内置规则;图定义位于internal/agents/graph.go
核心模块速览
internal/agents/:图定义、LLM 工具、决策逻辑internal/dataflows/:市场与情绪数据,含 RSI/MACD/BB/SMA/EMA/ATR 等指标计算internal/executors/:币安期货下单,支持单向/双向持仓、BUY/SELL/CLOSE_* 动作,含指数退避重试internal/storage/:SQLitetrading_sessions,记录所有报告与执行结果- 其他:
internal/config负责 Viper + .env;internal/scheduler对齐 K 线节奏;internal/web提供 Hertz 监控端口
运行 & 调试
make build # 编译主机器人
make run # 单次执行
make run-web # 循环执行 + Web 控制台
make query ARGS="latest 5" # 查询最近会话
make test / make test-cover # 测试与覆盖率
- 调试图时设置
DEBUG_MODE=true,观察日志链路并可用make query ARGS="latest 1"检查数据库
配置要点
.env中集中管理,参考env.example.yaml;修改internal/config/config.go记得同步.env.example- 关键开关:
BINANCE_TEST_MODE(测试 vs 实盘)、BINANCE_POSITION_MODE(oneway/hedge)、OPENAI_API_KEY、CRYPTO_TIMEFRAME、TRADER_PROMPT_PATH - 杠杆、仓位、止损等需结合
MAX_DRAWDOWN、RISK_PER_TRADE做统一风险设定
测试策略
- 单元测试集中在 config/storage/scheduler/dataflows/executors 包
- 集成/币安测试仅在
BINANCE_TEST_MODE=true下运行,避免真实成交
风险提示
BINANCE_TEST_MODE=false即为实盘,务必先小仓+低杠杆验证- LLM 失败会自动退回规则策略,但仍需人工审查关键交易
- 日志、数据库与 Web 控制台是追踪异常的三大信号来源
协作备注
- 若代码注释写英文,需紧跟一行中文翻译
- Prompt 或配置变更请更新
prompts/README.md与.env.example - 请用中文回答用户的问题
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.
- 6d ago First seen · 51 lines · 845 tokens per session scan A 17a710650a2e
crypto-trading-bot AGENTS.md is an instructions file published in the GitHub repository Oakshen/crypto-trading-bot (50 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 845 tokens to every session, about $0.0042 per session on Opus 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.
Other instructions, from other repositories
ClawRouter CLAUDE.md
Claude Code instructions for BlockRunAI/ClawRouter, covering clawrouter, commands, project structure, key dependencies and conventions.
InvestSkill GEMINI.md
Gemini CLI instructions for yennanliu/InvestSkill, covering investskill — gemini cli setup & usage guide, installation & setup, quick start, navigate to the investskill directory and start gemini cli (loads gemini.md automatically).
LLM-TradeBot copilot-instructions.md
Copilot instructions for EthanAlgoX/LLM-TradeBot, covering repository instructions, core rules, validation and ai asset governance.
Convertible-Bond-Pricing-Research CLAUDE.md
Instructions for ericxuzhesheng/Convertible-Bond-Pricing-Research, covering claude.md — convertible bond pricing research, current published state and routine commands.
bukio-cli AGENTS.md
AGENTS.md instructions for erikvankempen/bukio-cli, covering agents.md — bukio-cli agent manual, 1. house rules (non-negotiable), 2. environment, 3. command quick reference and 3.1 jurisdiction profiles (16 markets).
swiss-snb-mcp CLAUDE.md
Claude Code instructions for malkreide/swiss-snb-mcp, covering claude.md, teil 1 — konventionen (portfolio-weit), vor der arbeit, tests and wenn etwas rot ist.