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 11,845 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 11,845 This file is loaded in full into every session.
When invoked 11,845 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.11845 $0.11845
Opus 5 $0.05922 $0.05922
Sonnet 5 $0.02369 $0.02369
Haiku 4.5 $0.01184 $0.01184

Measured today against content hash 6e580adf3db6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 today.

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 · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 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.mdskills/journal/SKILL.md 及各 .py 的 docstring

3.1 每轮必读 5 项数据(强约束)

每轮盯盘 / 复盘触发后,第一件事是依次调用下列 5 项,取齐本轮决策的基础数据(第 0 项状态机置于最前,本地读取、不依赖网络)。任一缺失 → 本轮决策依据不全,按 §九 错误处理:

Read the full file on GitHub · 399 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. today Changed · -58 lines · +103 tokens per session 6e580adf3db6
  2. 8d ago First seen · 457 lines · 11,742 tokens per session scan A 767b3ed419bb

Subscribe to this mod's changes

ai-mock-trade AGENTS.md is an instructions file published in the GitHub repository AoleiC/ai-mock-trade (21 stars, last pushed today), licensed MIT. It adds 11,845 tokens to every session, about $0.0592 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 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,296 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,469 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens