record-trade

record-trade is a command for Claude Code from mnemox-ai/tradememory-protocol. It costs 11 tokens per session (469 once invoked), scanned A, original, MIT.

A command for saving a completed financial trade, including its prices, result, strategy, market conditions, and personal notes, in several types of long-term memory.

In plain words
What is it for?
Use it after trades in markets such as foreign exchange or cryptocurrency to keep a structured history for later review and reflection.
Why use it?
It prevents trade details and lessons from being scattered or forgotten. The recorded context can also update patterns about trading behaviour.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the tradememory-plugin plugin — 3 skills, 5 commands, 1 MCP server shipped together

Good fit Use it after trades in markets such as foreign exchange or cryptocurrency to keep a structured history for later review and reflection.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mnemox-ai/tradememory-protocol/record-trade
About the project

TradeMemory is a memory and audit layer for AI trading agents that records trading decisions, outcomes, and context in a tamper-evident history. It is for traders and automated trading systems that need agents to recall past decisions and document their reasoning. Catalogue add-ons provide skills, commands, MCP tools, and related workflow components for using it.

mnemox-ai/tradememory-protocol · 1,416 stars · on GitHub · mnemox.ai

Install

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.

Clone the repo
git clone --depth 1 https://github.com/mnemox-ai/tradememory-protocol

Made for: Claude Code.

Or install tradememory-plugin, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 1 MCP server.

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 record-trade

README.md
[![agentmods](https://agentmods.dev/badge/commands/mnemox-ai/tradememory-protocol/record-trade/github.svg)](https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/record-trade)
Your own site
<a href="https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/record-trade"><img src="https://agentmods.dev/badge/commands/mnemox-ai/tradememory-protocol/record-trade/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 record-trade

Your own site · 80×15
<a href="https://agentmods.dev/commands/mnemox-ai/tradememory-protocol/record-trade"><img src="https://agentmods.dev/badge/commands/mnemox-ai/tradememory-protocol/record-trade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 469 The whole file, excluding the scripts and references it only reads on demand.
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.00011 $0.00469
Opus 5 $0.00005 $0.00234
Sonnet 5 $0.00002 $0.00094
Haiku 4.5 $0.00001 $0.00047

Measured 9d ago against content hash ac832ee5b15e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

record-trade 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 9d 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.

tradememory-plugin/commands/record-trade.md · 58 lines

What it actually says

Record Trade

Store a completed trade into TradeMemory with full context. This writes to all 5 OWM memory layers (episodic, semantic, procedural, affective, prospective) and updates behavioral baselines.

Workflow

Step 1: Gather Trade Details

If trade details are provided in the argument, parse them. Otherwise ask for:

  • Symbol: e.g., XAUUSD, BTCUSDT, EURUSD
  • Direction: long or short
  • Entry price and Exit price
  • Lot size (optional, defaults to strategy default)
  • P&L in dollars

Step 2: Gather Context

Ask for or infer:

  • Strategy: Which strategy triggered this trade (e.g., VolBreakout, IntradayMomentum)
  • Market context: Session (London/NY/Asian), volatility regime, trend state
  • Reflection: Why did you enter? What was the signal? Would you take it again?
  • Confidence: 0.0-1.0, how confident were you at entry?

Step 3: Store via MCP

Use the remember_trade MCP tool to store across all OWM layers:

remember_trade({
  symbol, direction, entry_price, exit_price, pnl,
  strategy, lot_size, market_context, reflection, confidence
})

This automatically:

  1. Creates an episodic memory (the raw trade event)
  2. Updates semantic memory (strategy knowledge base)
  3. Adjusts procedural memory (hold times, lot sizing patterns)
  4. Updates affective state (confidence, drawdown, streak tracking)
  5. Evaluates active prospective plans

Step 4: Confirm and Summarize

Report back:

  • Trade stored successfully
  • Updated affective state (new confidence level, streak)
  • Any active trading plans that were affected
  • Similar past trades (top 3 by OWM score) for quick comparison

Example

User: /record-trade XAUUSD long 5180 5210 +$150
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. 9d ago First seen · 58 lines · 11 tokens per session scan A ac832ee5b15e

Subscribe to this mod's changes

record-trade is a command published in the GitHub repository mnemox-ai/tradememory-protocol (1,416 stars, last pushed 28d ago), licensed MIT. It adds 11 tokens to every session and 469 once invoked, about $0.0001 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.