Logo van Recipe Session Post Mortem

Recipe Session Post Mortem

Organisatie
krakenfx
recipe-session-post-mortem

Narrate a recorded session's post-mortem: replay the window, explain the P&L decomposition in plain terms, and deliver a presentation-ready summary.

Overzicht

Uitgeverkrakenfx
Repositorykraken-cli
Skillnaamrecipe-session-post-mortem
Sterren
754
Forks
104
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door krakenfx op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Recipe Session Post Mortem in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/krakenfx/kraken-cli/tree/main/skills/recipe-session-post-mortem
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/krakenfx/kraken-cli.git /tmp/kraken-cli
mkdir -p .claude/skills
cp -r /tmp/kraken-cli/skills/recipe-session-post-mortem .claude/skills/recipe-session-post-mortem
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Recipe Session Post Mortem in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Recipe Session Post Mortem automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Recipe Session Post Mortem niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Session Post-Mortem

PREREQUISITE: Load kraken-playground to understand what a session is and where it lives.

Turn a stopped, recorded session into a story a non-trader can follow: what the market did, what the agent did, where every dollar of P&L went, and what to change next session. The CLI supplies the deterministic facts (kraken explain pnl, kraken replay); this recipe is the interpretive layer on top. The output is good enough to paste into a board deck.

Use this skill for:

  • reviewing a session after it stops
  • explaining a P&L number component-by-component in plain language
  • producing an executive-ready one-pager from a recorded session

Important

The session must be stopped (kraken session stop). explain pnl decomposes a stopped session's window against its recorded tape; on a recording session, stop it first.

The CLI stays deterministic; the narrative is yours. Every dollar figure, percentage, and count in the narrative must come from the command output — never estimate, extrapolate, or invent a number the JSON does not contain.

Step 1: Pull the P&L Decomposition

bash
kraken explain pnl --session "$SESSION_ID" -o json 2>/dev/null   # --session defaults to latest

One JSON object. The parts that drive the narrative:

  • anchor: starting_balance, final_value, total_pnl, currency — the headline numbers.
  • components[]: the waterfall. Each entry has kind, amount, and a ready-made plain-terms explanation:
    • price_movement — position changes valued at mid-market, before any costs
    • fees — what the fee rate took across all fills
    • spread — the half-spread paid by market fills (and limit-fill timing)
    • slippage — simulated slippage on market fills
    • residual — the reconciliation gap; components + residual always sum to total_pnl
  • trades[]: per-fill attribution (side, volume, price, notional, fees, spread, price_movement) plus the recorded reason — the agent's own words for why it traded.
  • window.symbols[]: what the market did (first_mid, last_mid, move_pct, avg_spread, frames).
  • caveats[] and missed_fills: honest unknowns. If either is non-empty, the narrative must mention them.

Useful digests:

bash
# Headline + waterfall
kraken explain pnl --session "$SESSION_ID" -o json 2>/dev/null \
  | jq '{anchor, waterfall: [.components[] | {kind, amount}]}'

# Cost per trade, with the agent's stated reason
kraken explain pnl --session "$SESSION_ID" -o json 2>/dev/null \
  | jq -r '.trades[] | [.side, .volume, .price, .fees, .reason] | @tsv'

Step 2: Replay the Timeline

bash
kraken replay --session "$SESSION_ID" --speed 1000 -o json 2>/dev/null

NDJSON, one event per line, in recorded order. --speed is a multiplier (0.01–1000, default 1 = real time with recorded gaps reproduced); for analysis always use --speed 1000 so the tape flushes as fast as pacing allows. Three record families interleave on the same clock:

  • Market frames — {channel, type: "snapshot"|"update", data: [...]}: the price tape.
  • Account events — {event: "initialized"|"order_filled"|"command", ...}: balances, fills with reference_quote, and command outcomes.
  • Decisions — {kind, symbol, reason, order_id}: the why behind each action, including skips.

Digest it rather than reading every tick:

bash
REPLAY=$(kraken replay --session "$SESSION_ID" --speed 1000 -o json 2>/dev/null)

# The action beats: every fill and every decision, in order
echo "$REPLAY" | jq -c 'select(.event == "order_filled" or .kind != null)'

# The price path: first, last, low, high of the recorded mids
echo "$REPLAY" | jq -s '[.[] | select(.channel == "ticker") | .data[0].last] |
  {first: .[0], last: .[-1], low: min, high: max}'

Step 3: Narrate

Weave both outputs into one story, in this order:

  1. Headline — one sentence: outcome and dominant cause, citing total_pnl and the largest component. "The session lost $20.70 on a flat market: $20.18 of it was fees from churning three fills through an 0.02% move."
  2. What the market did — from window.symbols and the replay price path: direction, size of the move, spread conditions.
  3. What the agent did — from the replay beats: each decision with its recorded reason, and whether the fill helped or hurt (per-trade price_movement vs fees + spread).
  4. Where the money went — the waterfall, every component, summing to the total. Name the dominant cost in plain terms.
  5. Patterns — call out what the numbers show: churning a flat market and paying the spread N times, buying strength that faded, skips that saved money, fees exceeding gross edge.
  6. Next steps — concrete, tied to the evidence: fewer/larger fills to cut the fee bill, limit orders to earn the spread instead of paying it, a wider trigger threshold, a different window.

Honesty rules:

  • Quote figures exactly (round for prose: dollars to cents, percentages to two decimals).
  • If caveats or missed_fills.orders are non-empty, state them plainly — they bound what the decomposition can claim.
  • Never attribute intent the decision log doesn't record. The reason fields are the only source for "why".

Zero-Trade Sessions

A session with no fills is a valid post-mortem, not an error: trades is [] and every component is zero. Say so directly — "no trades were placed, so the balance is unchanged" — then narrate what the market did over the window and, if decisions were logged (skips with reasons), whether staying out was the right call given the tape.

Presenting to an Executive Audience

When the post-mortem is for a demo or leadership review, format the same content as a one-pager:

  • Lead with the headline sentence, then the waterfall as a small table: component, signed dollar amount, one plain-terms phrase each (crib from the explanation fields).
  • Follow with 3–6 timeline beats (time, action, reason, effect) — not the full tape.
  • Close with the next-step list.
  • No jargon in the top half: "cost of crossing the bid-ask gap" beats "half-spread on taker fills".
  • If the environment can render documents or artifacts, a single page with the waterfall as the centerpiece chart lands best; the narrative text stands alone if not.

The pitch this demonstrates: every automated trading session is fully auditable after the fact — the tape, the decisions, and the P&L reconcile to the cent, and an agent can explain it in plain language on demand.

Hard Rules

  • Read-only. This recipe never places orders, never starts or stops sessions (except telling the user to stop a recording one), and never writes into the session directory.
  • Every number in the narrative traces to a field in explain pnl or replay output.
  • The waterfall must be presented complete — components plus residual sum to the total; do not drop a component because it is small or unflattering.
  • Surface caveats and missed_fills whenever they are non-empty. A polished story that hides a caveat is wrong, not polished.
  • If you hit a mismatch between what you are trying to do and the CLI's interface or responses — including a mismatch between this skill and the installed CLI version's contract — feel free to submit feedback with kraken feedback.

Veelgestelde vragen

Wat doet de AI-skill Recipe Session Post Mortem?

Narrate a recorded session's post-mortem: replay the window, explain the P&L decomposition in plain terms, and deliver a presentation-ready summary.

Waarom Recipe Session Post Mortem gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Recipe Session Post Mortem bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Recipe Session Post Mortem in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/krakenfx/kraken-cli/tree/main/skills/recipe-session-post-mortem. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Recipe Session Post Mortem gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Recipe Session Post Mortem gebruiken?

Zoveel als je wilt. Je kunt Recipe Session Post Mortem gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Recipe Session Post Mortem gratis?

Ja. Deze skill is door krakenfx op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇