Every new agent session starts with an empty context window. It doesn’t remember what you told it last time unless that lives in a file it reads on start-up. So instead of retyping your rules, you write them into a Markdown file in the project folder, and the agent reads it before your first question.
Which file each agent reads
AGENTS.md is an open format, now stewarded by the Agentic AI Foundation under
the Linux Foundation. Codex and Antigravity read it directly. Claude Code uses
its own name, CLAUDE.md, but a single line @AGENTS.md in CLAUDE.md pulls the
whole of AGENTS.md in (an import). Recent Claude Code versions also read
AGENTS.md when there is no CLAUDE.md, but keeping the import is safer: it works
in every version and doesn’t load the file twice. Write the content once, in
AGENTS.md; edit one place, every agent reads it.
When there are several files (personal, project, subfolder), their contents are combined, usually with the file closest to the working folder read last. If two lines contradict each other the agent may follow either, so don’t let them. A direct instruction in the chat takes priority over the files.
| Claude Code | Codex | Antigravity CLI (agy) | |
|---|---|---|---|
| Project file read | CLAUDE.md or .claude/CLAUDE.md. From 2.1.277, AGENTS.md if there’s no CLAUDE.md or CLAUDE.local.md |
AGENTS.md (or AGENTS.override.md) in each folder from the project root down to the working folder; at most one per folder |
Both AGENTS.md and GEMINI.md, in the working folder and parents up to the repo root; not subfolders |
| Personal file for all projects | ~/.claude/CLAUDE.md |
~/.codex/AGENTS.md |
~/.gemini/AGENTS.md or ~/.gemini/GEMINI.md |
| Size | Keep each file under ~200 lines; long files are followed less reliably | Stops loading at 32 KiB in total (project_doc_max_bytes) |
Max 24,000 bytes per file; the rest is cut |
| Check what loaded | /context all (Memory files) or /memory |
Ask: “Summarize the current instructions.” | Ask the agent to list the rules in force |
| Project skills | .claude/skills/<name>/SKILL.md |
.agents/skills/<name>/SKILL.md |
.agents/skills/<name>/SKILL.md |
| Hard blocks | deny rules and hooks in .claude/settings.json |
Sandbox and approval modes | Hooks in .agents/hooks.json |
If you still use Gemini CLI on an enterprise licence or a paid API key, its
default file is GEMINI.md; set context.fileName in .gemini/settings.json to
make it read AGENTS.md.
Step 1 · Write AGENTS.md and a one-line CLAUDE.md
trading-agent-lab/
├── AGENTS.md # user profile, risk rules, data rules
├── CLAUDE.md # exactly one line: @AGENTS.md
├── .claude/
│ ├── settings.json # deny rules, defaultMode
│ ├── skills/trade-journal/SKILL.md
│ └── agents/
│ ├── lookahead-check.md # Read, Grep, Glob only
│ └── backtest-check.md # reviews 4 backtest errors
├── .agents/skills/trade-journal/SKILL.md # only for Codex, agy
├── config/thresholds.json # risk thresholds; deny stops the agent editing it
├── journal/2026-11.csv # written by the skill, one file per month
└── src/
├── htf_bad.pine, htf_good.pine # samples for lookahead-check
└── bt_bad.py, bt_good.py # samples for backtest-checkOpen a terminal in the project folder (Windows 11: right-click in File
Explorer → Open in Terminal; the prompt must read PS C:\trading-agent-lab>),
then create the two files:
cd C:\trading-agent-lab
notepad AGENTS.md
notepad CLAUDE.md
dircd ~/trading-agent-lab
touch AGENTS.md CLAUDE.md
open -e AGENTS.md
open -e CLAUDE.md
lsEvery line in AGENTS.md should be a checkable rule. “Trade carefully” can’t be checked; “max risk per trade is 1% of balance” can. Never put passwords, API keys or account numbers in it: the file is committed and every agent reads it.
# Project: personal trading tools (Pine Script v6 + MQL5 + Python)
## Purpose
Indicators, strategies and scripts for LEARNING and BACKTESTING. DEMO accounts only. The agent never places orders.
## User profile (edit to match you)
- Markets: gold (XAUUSD) and forex (EURUSD), H1 and H4, MT5 demo account.
- Level: beginner. In conversation the agent only explains and describes; it doesn't pick trades,
doesn't advise buy, sell or wait, and gives no entry, SL, TP or lot for a trade I'm about to take.
- When I ask "should I enter?": explain the conditions in my plan and point out missing data;
never answer buy, sell or wait.
- Exception: when a project prompt or script asks for a decision in a fixed JSON template for code to
check, return exactly that template (data for code, not advice; no lot filled in, no order sent).
Computing or checking a lot per the risk rules is allowed when I give the balance and stop distance.
- I change the Level line myself, only after I've passed the human-approval and kill-switch stage; the agent never raises it.
## Risk rules (mandatory in all code and analysis)
- Max risk per trade 1% of balance; compute the lot and ROUND DOWN to 0.01.
- Below 0.01 lot: no trade; never round up.
- Conventions: XAUUSD 1 lot = 100 oz; EURUSD 1 pip = 10 USD per lot; BTCUSD CFD 1 lot = 1 BTC.
- Every trade has a stop. No martingale, no adding to losers.
## Data rules
- No future data: signals are computed on closed candles only.
- Pine: request.security on a higher timeframe uses an [1] offset together with lookahead = barmerge.lookahead_on.
- Never invent numbers. Missing data: write "not enough data".
- No price predictions; describe conditions and scenarios only.
- data/*.csv: the time column is UTC.
## Code conventions
- Pine Script v6 (//@version=6). MQL5 uses CTrade (#include <Trade\Trade.mqh>).
- On Windows run Python as .venv\Scripts\python in UTF-8 mode (PYTHONUTF8=1). If a command fails with
UnicodeEncodeError 'charmap', don't edit the script: rerun the same command with -X utf8 after python, then tell me.
- New code: open(), read_text(), write_text() and subprocess.run(..., text=True) always pass encoding="utf-8".
## Secrets and accounts
- Never read .env; never ask for passwords, API keys or account numbers.
- MT5 demo only. No order-sending calls outside src/send_demo_order.py.
- Never edit AGENTS.md, CLAUDE.md or config/thresholds.json; propose changes for me to make.
## Checks before reporting done
- Pine: compiles without errors; strategies declare commission_type and commission_value.
- MQL5: compiles with 0 errors; Strategy Tester in "Every tick based on real ticks".
- Python: run python -m pytest -q and paste the result; never delete or edit tests to make them pass.CLAUDE.md, exactly one line, flush left:
@AGENTS.mdDon’t wrap it in backticks: Claude Code ignores imports inside code spans. If
you ran /init earlier, CLAUDE.md has generated content: move any lines that
are still right into AGENTS.md first, then replace CLAUDE.md with the import.
The user profile tells every session what you trade and your level, so the answers stay at the right depth. “Explain only, no buy/sell advice” keeps the conversation at the lowest rungs of the autonomy ladder. The exception line is there for later prompts that ask for a decision as a fixed JSON template for code to check; without it, the agent gets two contradictory instructions and may follow either. These lines are still only instructions. The real lock on orders is a code-level check, an approval flow and a kill switch.
On Windows, prefer the import to a symlink: creating symlinks needs admin rights or Developer Mode, and Git may turn a symlink into a one-line text file on clone.
Step 2 · Check the agent loaded the rules
After every change to an instructions file, open a new session in the
right folder; a running session may not have the new content. In Claude Code,
/context all shows CLAUDE.md under Memory files (/memory lists them too).
For any agent, ask:
List the user profile, risk rules and data rules you are applying in this
project, quoted verbatim, with the file name.It passes when the answer covers five points: (1) a beginner gets explanations
only, no buy/sell advice (except the JSON template); (2) 1% risk; (3) round
down to 0.01; (4) below 0.01 lot, no trade; (5) the [1] offset for
higher-timeframe data.
Quoting the rules correctly doesn’t mean always following them. Instruction files are context, not enforced configuration: the agent reads them and tries to comply, but can misread or skip a rule, especially in a long file or one with contradictions. Step 6 covers the hard locks.
| Symptom | Usual cause | Fix |
|---|---|---|
| The agent sees no rules | Started in the wrong folder | Exit, cd into the project, start again |
dir shows AGENTS.md.txt |
Saved as a text document | ren AGENTS.md.txt AGENTS.md (macOS: mv) |
| Accented characters are garbled | Not saved as UTF-8 | Save As with Encoding UTF-8 (not “with BOM”) |
| CLAUDE.md mentions AGENTS.md but Claude Code doesn’t know the rules | Written as prose (“please read AGENTS.md”) or wrapped in backticks | A bare @AGENTS.md line on its own |
| Claude Code forgot AGENTS.md after you added CLAUDE.local.md | With a CLAUDE.md or CLAUDE.local.md present it doesn’t auto-read AGENTS.md | Keep CLAUDE.md with the import |
| Codex drops the end of your instructions | Files total more than 32 KiB | Shorten, or split into subfolder AGENTS.md files |
| The agent quotes old rules | A leftover AGENTS.override.md (Codex) or old GEMINI.md (agy reads both) |
Merge into AGENTS.md and delete the old file |
Step 3 · A skill for the trade journal
A skill is a folder with a SKILL.md file describing a repeatable procedure.
Its frontmatter (between two --- lines) holds a name and a description.
At start-up the agent reads only the descriptions; when your request matches
one, it loads the full instructions. You can also call it directly with
/trade-journal at the start of a message, and whatever follows is passed in.
So the description must say when to use it. “Helps with trading” is too
vague to trigger; “use when the user pastes the details of a demo trade that
just closed” is clear. Keep SKILL.md under ~500 lines and put long reference
material in extra files in the same folder. The first --- must be line 1 of
the file: with a blank line above it, Claude Code treats the whole file as
plain content and never sees the description.
mkdir .claude\skills\trade-journal
notepad .claude\skills\trade-journal\SKILL.md---
name: trade-journal
description: Log a demo trade in the trading journal and score plan compliance. Use when the user pastes the details of a demo trade that just closed.
---
Goal: log correctly, check the lot, score plan compliance. Never score by profit or loss, never predict price.
1. Ask for anything missing: symbol, side, entry time (UTC), entry, SL, TP, lot taken, balance at entry,
result in USD, reason for the trade.
2. Check the lot. Allowed risk = 1% of balance. Loss per lot = stop distance × value: XAUUSD 100 USD per
1 USD of price; EURUSD 10 USD per pip; BTCUSD CFD 1 USD per 1 USD of price. Correct lot = allowed risk ÷
loss per lot, ROUNDED DOWN to 0.01. Below 0.01: write "not eligible to trade". Show the working.
3. Compute the real risk of the lot taken. Above 1% of balance: write "RISK EXCEEDED".
4. Append one row to journal/YYYY-MM.csv for the entry month (e.g. journal/2026-11.csv); create it with a header if missing:
time_utc,symbol,side,entry,sl,tp,lot_taken,lot_correct,risk_usd,result_usd,reason,plan_score,lesson
Decimals use a point (0.05); text containing commas goes in double quotes.
5. Score 0–5 for "followed the plan" and give 1 lesson. No "it would have won".
6. Missing data: write "not enough data"; never fill it in.Type /skills to see it listed (Esc closes the list; Enter or Space on a skill
changes how it’s displayed). If .claude/skills was created after the session
started, run /reload-skills or start a new session. Then try:
/trade-journal XAUUSD BUY, demo balance 1000 USD, stop 6 USD from entry, took 0.05 lotThe correct result: 10 USD allowed ÷ 600 USD per lot = 0.0166, so 0.01 lot; 0.05 lot risked 30 USD, which is RISK EXCEEDED.
This skill only writes to your own journal file, so letting the agent load it
by itself is acceptable; in Manual mode it still asks before writing. A skill
that acts on the outside world (sending a Telegram message, running a demo
order script) gets disable-model-invocation: true in its frontmatter, so it
runs only when you type the command. Codex and Antigravity read the same
SKILL.md format from .agents/skills/<name>/SKILL.md; copy the folder there
and keep both copies in sync.
Step 4 · A read-only subagent that hunts look-ahead
A subagent is a helper that runs in its own context window. It doesn’t see the main conversation; it gets one task and returns a summary. Long logs stay out of your main session, and the reviewer isn’t swayed by the reasoning that produced the code. Delegating doesn’t make answers smarter: what you get is an independent pair of eyes, for extra tokens.
Subagent files are Markdown with frontmatter in .claude/agents/ (this
project) or ~/.claude/agents/ (all projects); name and description are
required. tools: Read, Grep, Glob lets it read files and search, nothing
else: no edits, no commands. Claude Code enforces that, regardless of
instructions. Leave tools out and the subagent inherits every tool,
including write access. By default it still loads the project CLAUDE.md, so
it knows your rules.
---
name: lookahead-check
description: Review Pine Script and MQL5 code for future-data leaks and repainting. Use after writing or editing an indicator, strategy or EA.
tools: Read, Grep, Glob
---
You are a read-only reviewer. Don't edit files, don't run commands.
For each file you are given:
- Find request.security calls using lookahead_on whose expression has no [1] offset.
- Find signals or alerts using an unclosed candle's price without barstate.isconfirmed.
- MQL5: find entry decisions using bar index 0 when the spec says "wait for the close".
Return a table: file | line | issue | fix. If nothing is found, write "not detected".
Never call code "safe" or "profitable"; report only what you checked.Two sample files to test it, src/htf_bad.pine:
//@version=6
indicator("H4 close - WRONG", overlay = true)
htfClose = request.security(syminfo.tickerid, "240", close, lookahead = barmerge.lookahead_on)
plot(htfClose, "H4 close", color.red)and src/htf_good.pine:
//@version=6
indicator("H4 close - RIGHT", overlay = true)
htfClose = request.security(syminfo.tickerid, "240", close[1], lookahead = barmerge.lookahead_on)
plot(htfClose, "H4 close", color.teal)After creating .claude/agents for the first time, exit and restart Claude
Code; later edits are picked up within seconds. Call it in words (“use the
lookahead-check subagent on the two Pine files in src”) or explicitly:
@"lookahead-check (agent)" review src/htf_bad.pine and src/htf_good.pineExpected: htf_bad.pine line 3 looks ahead, fix close to close[1];
htf_good.pine “not detected”. If the subagent says something else, reread
the files yourself; don’t trust the table blindly.
Step 5 · A subagent that checks four backtest errors
A backtest report can look good because of errors rather than the method. Four are common:
- Look-ahead: a decision uses data that didn’t exist yet. In Python, a typical form is multiplying a bar’s signal by that same bar’s move.
- Overfitting: trying many parameters or versions and keeping the best. Standard defences such as a hold-out set are often unreliable for investment backtests, because they ignore how many trials were run and the hold-out gets looked at repeatedly while choosing. A separate out-of-sample period is the bare minimum: record the number of trials and look at the out-of-sample part once.
- Survivorship bias: looking only at the symbols, funds, EAs or accounts that still exist today. A sample truncated this way can create the illusion that past performance predicts future performance.
- Missing costs: no spread, commission or slippage. A TradingView strategy with no declared commission pays none, and slippage defaults to 0.
---
name: backtest-check
description: Review backtest code and reports for 4 errors that make results look better than reality (look-ahead, overfitting, survivorship, missing costs). Use before trusting or sharing a backtest result.
tools: Read, Grep, Glob
---
You are a read-only reviewer. Don't edit files, don't run commands, don't judge whether the method is good.
For each code file or report you are given, check exactly 4 errors:
1. Look-ahead: a decision uses data not yet available. Python: a signal multiplied by the move of the
same bar that produced it, a missing shift(1), any shift(-1). Pine: request.security with lookahead_on
and no [1] offset. MQL5: bar index 0 used when the spec says wait for the close.
2. Overfitting: many parameters or versions searched and the best kept; no out-of-sample period; number of trials not recorded.
3. Survivorship: a list of symbols, EAs or accounts containing only those that exist or look good today.
One symbol on one continuous file: write "not applicable" and ask why that symbol was chosen.
4. Missing costs: no spread, commission or slippage; zero costs without a stated reason.
Return a table: file | line | error (1–4) | quoted code line as evidence | fix.
If an error isn't present write "not detected"; if information is missing write "not enough data".
Don't rewrite code, don't run backtests, never say the result will win or lose in live trading.src/bt_bad.py has three errors planted on purpose:
# bt_bad.py: deliberately WRONG so backtest-check can find the errors. Not for trading.
import sys
import pandas as pd
def run(path):
bars = pd.read_csv(path)
best = None
for fast in range(5, 55, 5):
for slow in range(60, 260, 20):
ema_f = bars["close"].ewm(span=fast, adjust=False).mean()
ema_s = bars["close"].ewm(span=slow, adjust=False).mean()
pos = (ema_f > ema_s).astype(int)
pnl = (pos * bars["close"].diff()).sum() # USD for 0.01 lot (1 oz)
if best is None or pnl > best[0]:
best = (pnl, fast, slow)
return best
if __name__ == "__main__":
sys.stdout.reconfigure(encoding="utf-8")
pnl, fast, slow = run(sys.argv[1] if len(sys.argv) > 1 else "data/xauusd_h1_backtest.csv")
print(f"Best: EMA {fast}/{slow}, profit {pnl:.2f} USD for 0.01 lot")src/bt_good.py shifts the signal one bar, fixes the parameters in the spec,
splits off an out-of-sample period and charges the spread on every entry:
# bt_good.py: fixes the errors in bt_bad.py. Simulation on history, not investment advice.
import sys
import pandas as pd
FAST, SLOW = 20, 50 # fixed in the spec before running; 1 pair tried, no search on the data
CUT = "2026-01-01" # before: in-sample; from here: out-of-sample, looked at once
POINT = 0.01 # spread column is in points; 2 digits -> 0.01, 3 digits -> 0.001
def run(path):
bars = pd.read_csv(path, parse_dates=["time"])
ema_f = bars["close"].ewm(span=FAST, adjust=False).mean()
ema_s = bars["close"].ewm(span=SLOW, adjust=False).mean()
pos = (ema_f > ema_s).astype(int).shift(1).fillna(0) # decide on the closed bar, hold from the next
entry = pos.diff().fillna(pos) == 1 # bar where a long starts
cost = entry * bars["spread"] * POINT # bid prices: each long pays one spread at entry
pnl = pos * bars["close"].diff().fillna(0) - cost # USD for 0.01 lot (1 oz)
out = []
for name, part in (("in-sample", bars["time"] < CUT), ("out-of-sample", bars["time"] >= CUT)):
out.append((name, int(entry[part].sum()), pnl[part].sum(), cost[part].sum()))
return out
if __name__ == "__main__":
sys.stdout.reconfigure(encoding="utf-8")
for name, trades, pnl, cost in run(sys.argv[1] if len(sys.argv) > 1 else "data/xauusd_h1_backtest.csv"):
print(f"{name}: {trades} trades, P&L {pnl:.2f} USD for 0.01 lot, spread charged {cost:.2f} USD")@"backtest-check (agent)" review src/bt_bad.py and src/bt_good.py for the 4 errors| File | Line | Error | Fix |
|---|---|---|---|
| bt_bad.py | 13–14 | 1 · Look-ahead: the signal from bar t’s close is multiplied by bar t’s own move | Shift the signal one bar: .shift(1) |
| bt_bad.py | 9–10, 15–16 | 2 · Overfitting: 100 pairs searched on all the data, the best kept, no out-of-sample, trials not recorded | Fix the parameters in the spec; if you search, search in-sample only, record “100 pairs tried”, look at out-of-sample once |
| bt_bad.py | — | 3 · Survivorship: not applicable (one symbol, one continuous file) | Record why XAUUSD was chosen |
| bt_bad.py | 14 | 4 · Missing costs: no spread although the file has a spread column | Charge the spread per entry; state a slippage assumption |
| bt_good.py | — | 1 not detected; 2 not detected with “1 pair tried” recorded; 3 not applicable | — |
| bt_good.py | 8, 16 | 4 · Spread charged (line 8: POINT must match the broker’s digits), no slippage or commission yet | Add a slippage assumption; add commission if your account has one |
You don’t need to run the files for the review. To run them you need about two
years of H1 candles with a spread column and candles on both sides of
2026-01-01; a short file (a few weeks) falls entirely after the cut and gives
zero in-sample trades. Set POINT from the symbol’s digits first, or the
spread cost is off by a factor of ten.
Run on a sample XAUUSD H1 file (January 2025 to October 2026, all figures for 0.01 lot), each fix shrinks the “profit”:
bt_bad.pyprints a profit of 5,390.36 USD: 181 trades, no costs.- Fixing only the look-ahead, the best of the same 100 pairs makes 1,783.82 USD over 43 trades, still no costs.
bt_good.py(20/50 fixed in advance): 103 trades, +1,076.62 USD before costs, +1,009.49 USD after 67.13 USD of spread.- Buy and hold over the same period: +1,368.24 USD (no spread).
Split in two, next to buy and hold:
- In-sample (2025): 49 trades, +1,402.55 USD after 28.94 USD of spread; buy and hold +1,695.12 USD.
- Out-of-sample (January to October 2026): 54 trades, −393.06 USD after 38.19 USD of spread; buy and hold −326.88 USD (from the last 2025 close).
Your numbers will differ with a different price source and period; compare the direction of change as each error is fixed, not the exact amounts. This is a simulation on history, not advice.
With Codex or Antigravity, open a read-only session (codex --sandbox read-only, or agy in default refusing every edit or command), paste the
body of backtest-check.md from “You are a read-only reviewer” down as the
prompt, and hand it the two files.
Step 6 · Hard limits: deny rules, and what hooks are for
AGENTS.md, CLAUDE.md and skills are all context: the agent reads them and decides. Anything that must always or never happen belongs in a hook, a deny rule or managed settings. Instructions are guidance the agent may decide don’t apply, and writing IMPORTANT or using capitals doesn’t turn them into a lock.
Deny rules live in .claude/settings.json. Claude Code evaluates them every
time the agent is about to use a tool, in the order deny, ask, allow, and deny
holds in every permission mode, including auto. That matters: from 2.1.283,
new sessions in the terminal and VS Code start in auto mode when the account
supports it, where a classifier approves actions for you.
{
"permissions": {
"defaultMode": "default",
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Edit(./config/thresholds.json)",
"Edit(./AGENTS.md)",
"Edit(./CLAUDE.md)"
]
}
}If the file already exists, edit it and keep any env block; don’t create a
second one. default is Manual mode, which asks before every edit or command
and suits journal work; keep plan if you prefer every session to open in Plan.
Neither is auto. The agent can still read the threshold and rules files, it
just can’t change them: it proposes, you edit. /permissions shows the rules,
/status the loaded files. JSON is strict (no //, no trailing commas); on
macOS paste rather than type, because TextEdit may turn straight quotes into
curly ones.
Know the limits. Read and Edit rules block the agent’s file tools and
familiar commands such as cat, but not a Python script that opens the file
itself. Rules for shell commands match the command text only and are not a
security boundary. So a script that sends demo orders must check the account
type itself and wait for human approval.
When you hand over a “make the tests pass” job, stop the agent from editing the tests:
claude --disallowedTools "Edit(./tests/**)"A hook is your own command that runs automatically at a fixed point. A
PreToolUse hook runs before every tool call, and exiting with code 2 blocks
the action; /hooks lists them. Writing hooks means writing scripts, so get
comfortable with deny rules first. Antigravity keeps hooks in
.agents/hooks.json; Codex relies on its sandbox and approval modes.
| Need | Use | Example in a trading project |
|---|---|---|
| A rule true for every task | AGENTS.md, imported by CLAUDE.md | 1% risk, round down, [1] offset |
| A multi-step procedure you repeat | Skill | Logging each demo trade, the weekly review |
| Context-heavy work or independent eyes | Read-only subagent | Look-ahead review of src/, the four backtest errors, reading long logs |
| Something with no exceptions | Deny rule or hook | Never read .env, never edit thresholds or rule files |
| Whether to trade | You | You approve each proposal, on demo only |
Try it: sort your rules into context, skill or lock
Use Plan mode if your tool has it; read only. Don't edit or create any file.
Context: [PROJECT FOLDER] is a trading learning project, demo accounts only.
My tool: [Claude Code / Codex / Antigravity CLI].
1: Read AGENTS.md and CLAUDE.md (if present). Quote every risk rule and data rule you
are applying, with line numbers.
2: Put each line in one group: (a) keep in AGENTS.md because it holds for every task;
(b) turn into a skill because it's a multi-step procedure; (c) must be a hard block
(deny rule or hook) because it allows no exceptions. One sentence of reason each.
3: Point out vague lines that can't be checked (e.g. "trade carefully") and rewrite them
as checkable rules; point out pairs of contradictory lines.
4: For group (c), propose .claude/settings.json content using only syntax from the official
docs; where unsure, write "check the docs".
Constraints: don't read .env; don't ask for passwords, API keys or account numbers; don't
propose connecting a live account; the new AGENTS.md stays under [200] lines; keep the
conventions XAUUSD 1 lot = 100 oz, EURUSD 1 pip = 10 USD per lot, BTCUSD CFD 1 lot = 1 BTC,
lot rounded down to 0.01.
Output: a table line | group | reason; the lines to rewrite; then a proposed AGENTS.md
for me to read and paste myself.Key takeaways
- Keep AGENTS.md short (under ~200 lines), one checkable rule per line;
CLAUDE.md holds only a bare
@AGENTS.md, not in backticks. - A skill’s description must say when to use it; skills that act on the outside
world get
disable-model-invocation: true. - A subagent limited to
Read, Grep, Globcan’t edit files; leavingtoolsout gives it write access too. - Before trusting a backtest, check look-ahead, overfitting, survivorship and costs. Each fix shrinks the profit.
- Instructions are context; only deny rules and hooks are enforced.
Comments