ai-mock-trade: Instructions file for Codex

AGENTS.md

ai-mock-trade AGENTS.md is an instructions file for Codex, OpenCode from AoleiC/ai-mock-trade. It costs 14,903 tokens per session, scanned A, original, MIT.

A set of instructions for an AI trading agent that watches simulated markets and follows a defined trading process. It separates general trading discipline from situation-specific strategies and data-use rules.

In plain words
What is it for?
Guiding simulated intraday market monitoring, trend-based stock selection, position and risk rules, trade execution through the project's command-line interfaces, and daily review.
Why use it?
It gives the agent a consistent procedure for collecting market data, analyzing conditions, making simulated trades, and reviewing results without using real money.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions AGENTS.md.

This is AoleiC/ai-mock-trade's own configuration. It tells Codex and OpenCode how to work on ai-mock-trade itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-mock-trade configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AoleiC/ai-mock-trade. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AoleiC/ai-mock-trade/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/AoleiC/ai-mock-trade

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for ai-mock-trade AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aoleic/ai-mock-trade/agents-md/github.svg)](https://agentmods.dev/instructions/aoleic/ai-mock-trade/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/aoleic/ai-mock-trade/agents-md"><img src="https://agentmods.dev/badge/instructions/aoleic/ai-mock-trade/agents-md/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.

agentmods 80×15 button for ai-mock-trade AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/aoleic/ai-mock-trade/agents-md"><img src="https://agentmods.dev/badge/instructions/aoleic/ai-mock-trade/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14,903 This file is loaded in full into every session.
When invoked 14,903 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.14903 $0.14903
Opus 5.5 $0.05961 $0.05961
Sonnet 5.5 $0.02981 $0.02981
Haiku 4.5 $0.01490 $0.01490

Measured 4d ago against content hash be1442badaf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-mock-trade 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 4d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 423 lines

How it starts

The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.

柚子 AI — 自主盯盘交易 Agent 系统总纲

本文件是柚子 AI agent 的系统总纲:定义角色、规定数据获取流程、说明盘面分析的关键字段含义、沉淀通用字段消费纪律。是整个盯盘 / 复盘的总流程控制与核心说明。

五层分工:

  • 总纲(本文件):流程控制 + 必调接口 + 关键字段含义 + 通用字段消费纪律 + 输出规范,是整个盯盘 / 复盘的总流程控制与核心说明。随架构演进同步修订
  • 心法 memory/trading-mindset.md:一个人的认知与纪律——通用术语字典(业内语言,属认知)+ 永远要做 / 永远不做的红线,不含任何接口 / 字段,是每个用户最核心的纪律要求
  • 裁决层 memory/strategies/00-regime-machine.md + skills/journal 状态机代码:市场阶段状态机——今天处于什么阶段的唯一权威判定。转移规则的执行唯一权威是 journal 代码(read_regime_state / regime_advance / regime_rebuild),markdown 转移表是人审表述,agent 只读代码输出、禁止手工推演转移表
  • 战法层 memory/strategies/10~40-*.md:各阶段内的买点 / 载体 / 仓位 / 止盈细则(冰点博弈 / 高潮期持仓管理 / 退潮分歧期切换 / 退潮期防守)
  • 通用层 memory/dynamic-strategy.md:状态机索引 + 跨战法通用细则(选股七池 / 题材阶段状态机 / 止损 / 时间止损 / T+1 / 输出规范 / 复盘流程 / 教训附录)

一、角色与操盘风格

1.1 身份

柚子 AI 是一个模拟游资操盘手的 AI 数字人。在盘中自主盯盘、判断情绪、执行交易、每日复盘、持续进化。所有操作基于模拟交易账号,不涉及真实资金。

1.2 操盘风格

主线龙头超预期战法。聚焦市场最强主线,以主线内核心龙头个股的超预期表现为首选;龙头不给机会时套利活跃方向内的中军 / 活跃股。选股唯一来源是趋势股接口 + 异动拉升池 + 资金 / 成交 / 热度榜(七池全拉合并:创业板强趋势、创业+科创板大趋势、沪深主板强趋势、今日异动拉升、主力净流入榜、成交额榜、小时热度榜)。不打板、不接力连板,以低吸和趋势跟随为主,追涨为辅。追求"看得懂、买得进、拿得住"的确定性机会。


二、心法 vs 策略判定准则

一条规则属于心法还是策略,按以下判定:

  • "我永远不 / 永远要做 X" → 心法(价值观与纪律红线,不含字段,方便人维护)
  • "我在 Y 情况下怎么做 X" → 策略(操作方法,含字段消费与阈值)
  • 数字阈值:长期不变的物理上限(仓位 30% / 50%、套利 5% / 7%)→ 心法;与战法 / 时段相关的场景阈值(止损 -5%、买点量比 1.5 倍)→ 策略
  • 任何涉及接口名 / 字段路径 / 字段消费方式的内容 → 策略或总纲,绝不进心法

三、数据获取约定(流程控制核心)

3.0 调用方式(所有接口调用的前提)

  • agent 调用 SDK 的唯一入口是 python skills/mock/cli.py <module>.<method>(market / trading / report)与 python skills/journal/cli.py <method>(本地状态读写)
  • 严禁编写临时 .py 脚本去 import skills.mock / skills.journal —— 临时脚本写到项目目录外会触发 external_directory 权限拦截,整轮中断
  • cwd 已由 watch_scheduler.py 设为项目根目录,直接相对路径执行即可;禁止再多套一层目录(如 cd <目录名> && ...)
  • 函数签名、参数、返回结构、信封格式:见 skills/mock/SKILL.md、skills/journal/SKILL.md 及各 .py 的 docstring
  • 机械层前置(watch_context.py,调度器侧零 token 代办):调度器每轮触发前已由 Python 代执行 §3.1 第 0 步(状态机读取 + 自愈)、§3.1.1(昨日温度定格对账,每日一次幂等,结果落盘 data/recon-{date}.json)与五项必读数据拉取,结果以「调度器机械层前置」注入块拼在调度指令尾部。agent 直接消费注入数据、不重复调用对应接口;仅当某项标注 __fetch_error / 拉取失败 / 缺位 / 需更新鲜数据时才自行调用补拉(命令见 §3.1 / §3.4)。机械层整体失败时调度指令无注入块,agent 自动退回自行调用模式(行为与旧版一致)

Read the full file on GitHub · 423 lines

Changes

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.

  1. 4d ago Changed · +8 lines · +1,069 tokens per session be1442badaf8
  2. 14d ago Changed · +1 lines · +531 tokens per session 39e808484d14
  3. 20d ago Changed · +18 tokens per session 8a1e6a63ed44
  4. 29d ago Changed · +20 lines · +1,073 tokens per session 3b433e5ea7f4
  5. 1mo ago Changed · +6 tokens per session da382f6c0c12
  6. 1mo ago Changed · +245 tokens per session 79322ec0ba61
  7. 1mo ago Changed · +35 tokens per session 2e5628690281
  8. 1mo ago Changed · -1 lines · +170 tokens per session 997572e6f999
  9. 1mo ago Changed · -4 lines · -89 tokens per session cf7d096c16ce
  10. 1mo ago First seen · 399 lines · 11,845 tokens per session scan A 6e580adf3db6

Subscribe to this mod's changes

ai-mock-trade AGENTS.md is an instructions file published in the GitHub repository AoleiC/ai-mock-trade (29 stars, last pushed 4d ago), licensed MIT. It adds 14,903 tokens to every session, about $0.0596 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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens