Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 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

Полный SKILL.md на GitHub

Установить trader-memory-core в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/postmortem_template.mdreferences/field_mapping.mdreferences/thesis_lifecycle.mdrequirements.txtschemas/thesis.schema.jsonscripts/fmp_client.pyscripts/fmp_price_adapter.pyscripts/thesis_ingest.pyscripts/thesis_review.pyscripts/thesis_store.pyscripts/thesis_store_parts/lifecycle.pyscripts/thesis_store_parts/locking.pyscripts/thesis_store_parts/persistence.pyscripts/thesis_store_parts/positions_equity.pyscripts/thesis_store_parts/positions_futures.pyscripts/thesis_store_parts/queries.pyscripts/thesis_store_parts/validation.pyscripts/trader_memory_cli.py

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить trader-memory-core с