Skip to content
Finance
Skill

/trader-memory-core

Track investment theses across their lifecycle — from screening idea to closed position with postmortem. Register theses from screener outputs, manage state transitions, attach position sizing, review due dates, and generate postmortem reports with P&L and MAE/MFE analysis.

From plugin
claude-trading-skills
6.9k74 skills2 agents2 commands

Claude Code

$ npx -y skills add tradermonty/claude-trading-skills --skill trader-memory-core --agent claude-code

SKILL.md

trader-memory-core.SKILL.md
name: trader-memory-core
description: Track investment theses across their lifecycle — from screening idea to closed position with postmortem. Register theses from screener outputs, manage state transitions, attach position sizing, review due dates, and generate postmortem reports with P&L and MAE/MFE analysis. Trigger when user says "register thesis", "track this idea", "thesis status", "review due", "close position", "postmortem", or "trading journal".

Trader Memory Core

Overview

Persistent state layer that bundles screening → analysis → position sizing → portfolio management outputs into a single "thesis object" per investment idea. Tracks what you thought, what happened, and what you learned — across conversations.

Phase 1 supports single-ticker theses: dividend_income, growth_momentum, mean_reversion, earnings_drift, pivot_breakout.

When to Use

  • After a screener (kanchi, earnings-trade-analyzer, vcp, pead, canslim, edge-candidate-agent) produces candidates
  • When transitioning a thesis from IDEA → ENTRY_READY → ACTIVE → CLOSED
  • When attaching position-sizer output to a thesis
  • When checking which theses are due for review
  • When closing a position and generating a postmortem with lessons learned

Prerequisites

  • Python 3.10+
  • `pyyaml` (already in project dependencies)
  • `jsonschema` (already in `pyproject.toml`; required by `thesis_store.py` and every command that imports it, including `thesis_ingest.py` and `thesis_review.py`)
  • FMP API key (optional, only for MAE/MFE calculation in postmortem)

How to invoke the CLI

Use the stdlib-only launcher `trader_memory_cli.py` for all CLI work. It transparently routes through `uv run --project <repo>` when `uv` is available, so the repo's pinned `jsonschema` is reachable even from a foreign cwd or from `python3` with no global `jsonschema` (e.g. cron / Hermes profile runs):

# From inside the repo
python3 skills/trader-memory-core/scripts/trader_memory_cli.py store --state-dir state/theses list

# From any other cwd (cron, profile, distribution runner) — point the launcher at the repo
export CLAUDE_TRADING_SKILLS_REPO=/path/to/claude-trading-skills
python3 "$CLAUDE_TRADING_SKILLS_REPO/skills/trader-memory-core/scripts/trader_memory_cli.py" \
  store --state-dir /path/to/state/theses list

Subcommands: `store` → `thesis_store.py`, `ingest` → `thesis_ingest.py`, `review` → `thesis_review.py`. Everything after the subcommand is forwarded verbatim, so existing argument flags (`--state-dir`, `transition`, `open-position`, etc.) work unchanged.

If the launcher reports that `jsonschema` is not importable AND `uv` is not on `PATH`, the actionable fixes (in priority order) are:

1. Install `uv` (https://docs.astral.sh/uv/) and re-run the launcher. 2. Install the project's dependencies into the current interpreter:

   uv pip install -e /path/to/claude-trading-skills
   # or, as a last resort:
   python3 -m pip install jsonschema

Do **not** treat the thesis store as unavailable and do **not** mutate `state/theses/*.yaml` by hand to work around a missing dependency — schema validation is part of thesis state integrity.

Equity accounting is long-only. Do not ingest parabolic-short plans or record short-equity trades through `manual`; there is no adapter for those plans. Explicit SHORT directions are rejected before they can be discarded by raw registration, manual ingest, equity opening or shares-report attachment. Generic registration does not import a raw position: use validated futures attachment or `open-position --contracts` for futures LONG/SHORT.

When both initial prices are supplied, they must be finite numeric/non-bool values. Positive initial stop > positive entry is rejected at manual ingest, shares-report attachment and default equity activation (using the actual fill). Absent optional pairs and existing finite nonpositive-price behavior remain compatible. Do not apply this initial-entry rule to an ACTIVE/PARTIALLY_CLOSED long's stop: a profitable long may update its stop above original entry. Manual source prices remain provenance only; authoritative fills still come from `open-position`. For a backfill with a profit-protecting stop, open the long with its initial stop, then update the current stop after activation.

For a real long that gaps and fills below its planned stop, keep the default refusal unless explicitly acknowledging the actual fill with `open-position --allow-gap-fill` (API: `allow_gap_fill=True`). This opt-in only bypasses the positive fill-below-positive-stop geometry guard for equity; SHORT intent, invalid prices/quantities/state and all ingest/attachment validation still refuse. Futures reject this equity-only option. A normal/equal fill adds no gap annotation. The flag must be a Python bool in API calls. The acknowledgement still requires a share count: pass `--shares` or attach a sized position.

Preserve the target, planned stop, sizing audit fields and provenance. Store the actual fill and append a `gap fill acknowledged` entry to the protected ACTIVE `status_history.reason`, including exact actual fill and stop values. A supplied reason must remain a string. This audit survives later stop changes; inspect status history when reviewing the gap. Closing/trimming uses the actual fill for long-side P&L. This records a fill that already occurred, not approval to open a new trade or retain a breached stop. Planned sizing fields are not recalculated by this acknowledgement.

python3 skills/trader-memory-core/scripts/trader_memory_cli.py store \
  --state-dir state/theses/ open-position <id> \
  --actual-price 88 --actual-date 2026-11-01 --shares 10 \
  --allow-gap-fill --reason "record actual broker fill"

Explicit legacy short equity records (a SHORT word or a bare SELL, such as SELL_SHORT, Short position or SELL; labels such as Sell to close stay long) are refused before new accounting or MAE/MFE calculations. CLOSED/INVALIDATED legacy short

Read more
@tradermonty
Ships withclaude-trading-skills

Data handling: Privacy policy · Security policy Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.

6.9k74 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
6.9k
Star history of tradermonty/claude-trading-skills on GitHub, a chart by star-history.com

Other skills on claude-trading-skills.

More skills from other plugins.

ccxt-cli

ccxt-cli

CCXT command-line interface (ccxt-cli) for interacting with 100+ cryptocurrency exchanges directly from the terminal — no code…

ccxt10d45k
@ccxt@ccxtInstall Skill

Questions about trader-memory-core.

Which coding agents can use trader-memory-core?
trader-memory-core installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.