trader-memory-core
БесплатноЗапускает вложенные скриптыНе проверенTrack investment theses across their lifecycle — from screening idea to closed position with postmortem. Register theses from screener outputs, manage state…
от tradermonty★ 9 343 звезды на GitHubОб этом скилле
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 inpyproject.toml; required bythesis_store.pyand every command that imports it, includingthesis_ingest.pyandthesis_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:
- Install
uv(https://docs.astral.sh/uv/) and re-run the launcher. - 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
Установить trader-memory-core в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл 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. Trigger when user says "register thesis", "track this idea", "thesis status", "review due", "close position", "postmortem", or "trading journal".
Как установить скилл trader-memory-core?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл trader-memory-core запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic