Skip to content
Finance
Skill

/kraken-lab-experiment

Run the Autoresearch Lab lifecycle end-to-end: freeze a hypothesis with mechanical success criteria and a sealed session plan, drive recorded and replayed paper runs, score them honestly, and read the verdict — resumable from disk at every step, designed for /loop.

From plugin
kraken-cli
81459 skills1 MCP

Claude Code

$ npx -y skills add krakenfx/kraken-cli --skill kraken-lab-experiment --agent claude-code

SKILL.md

kraken-lab-experiment.SKILL.md
name: kraken-lab-experiment
version: 2.0.0
description: "Run the Autoresearch Lab lifecycle end-to-end: freeze a hypothesis with mechanical success criteria and a sealed session plan, drive recorded and replayed paper runs, score them honestly, and read the verdict — resumable from disk at every step, designed for /loop."
metadata:
  openclaw:
    category: "lab"
    domain: "sessions"
  requires:
    bins: ["kraken", "jq"]
    skills: ["kraken-playground"]

Lab Experiment Lifecycle

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

Turn a trading hunch into a mechanical verdict: pre-register the hypothesis and its success criteria (hash-sealed, so the goalposts cannot move), run it as recorded paper runs, score each session against its own tape, and let the frozen criteria — not vibes — say pass or fail. Every step reads and writes plain files under the active scope, so the lifecycle survives kills, restarts, and context loss: **whatever step you find half-done on disk is the step you resume**.

Use this skill for:

  • driving one experiment end-to-end under `/loop` (freeze → run → score →

verdict)

  • resuming an experiment a previous context started
  • reproducing a verdict cold, from files alone

Safety rules

  • Seal and run experiments in a paper workspace (`export KRAKEN_WORKSPACE=<name>`),

where the order verbs fill on the paper account: a replay leg needs the simulator.

  • Reading and scoring also work in a live workspace, where the order verbs

trade real funds. The scorecard names the scope it came from, so live-era sessions are never mistaken for paper evidence. Before any step that places an order, confirm `kraken workspace show -o json` reports `"mode": "paper"`.

  • Never edit a frozen experiment file. The seal exists to catch exactly

that; a tampered spec fails every later step with a `parse` envelope.

  • Never report a verdict you did not obtain from `lab score --experiment`

or `lab compare` output in this session. No estimating, no "it would probably pass".

The state machine

With a sealed session plan the whole table collapses to one command — **run `kraken lab next <exp>` and do what it says**:

kraken lab next momentum-1 -o json 2>/dev/null
# state: "start"         → run the exact `command` it prints, then stop+score
# state: "running"       → drive or wait, then `kraken session stop` + `lab score`
# state: "plan_complete" → `kraken lab compare <exp>`, conclude (Step 5)

`lab next` re-derives progress from the sessions tree on every call: completed runs consume plan entries in order, aborted sessions keep their ordinals and count for nothing, and a replay entry whose tape no longer matches its sealed hash is refused outright. Stop and score a finished run *before* asking again — an unstopped run has no summary and reads as aborted.

For a plan-less experiment (registered before run plans existed), fall back to the manual table:

| State | Evidence | Next action | |-------|----------|-------------| | unregistered | `kraken lab show <exp>` → `validation` error | Step 1: freeze | | no run yet | `kraken session list` → no run stamped with the experiment | Step 2: start run | | run live | `kraken session show` → status `recording` | Step 3: drive or wait, then stop | | run stopped, unjudged | status `stopped`, no verdict recorded in your notes | Step 4: score + verdict | | judged | verdict obtained | Step 5: conclude or start run n+1 |

Step 1: Freeze the hypothesis (once)

Pick a name (path-safe segment: letters, digits, `.`, `-`, `_`) and state the falsifiable claim plus at least one mechanical criterion:

kraken lab new momentum-1 \
  --hypothesis "buying 15m strength beats sitting in cash" \
  --strategy recipe-playground-dca \
  --min-return-pct 1 --max-drawdown-pct 5 --min-fills 2 \
  --session replay:tape:jun-crash --session replay:tape:jun-chop \
  --session live:24h \
  -o json 2>/dev/null

Seal the **session plan** with the spec: repeatable `--session` entries, in execution order — `replay:<ref>` (a finalized tape from `kraken tape list`; its content hash is sealed, so a re-recorded tape can never satisfy the plan) or `live:<window>`. Replay first to screen cheaply, live last: the promotion gate requires a passing live session because replay cannot enforce lookahead. The session count is sealed too — that is the point: no running until a pass appears.

The output echoes the sealed spec with its `frozen` hash (`sha256:…`). Freezing is once-only: a second `lab new` under the same name is a `validation` error saying the spec is immutable. Verify any time with:

kraken lab show momentum-1 -o json 2>/dev/null

If `show` returns a `parse` error mentioning "modified after freezing", the file was tampered with. Stop the experiment and report it — do not re-freeze over it.

Step 2: Start a session

With a session plan, `kraken lab next <exp>` prints the exact start command — use it verbatim; adjusting `--speed` per the reaction-time note below is the one permitted edit. Runs are ordinary recorded sessions stamped with `--experiment` — the stamp is what discovery keys on; the `--label <exp>-s<n>` is the human handle:

# live entry (fill in the market to record):
kraken session start --label momentum-1-s1 --experiment momentum-1 \
  --symbols BTC/USD --channels ticker,trade \
  -o json 2>/dev/null &

# replay entry (the tape defines the market; 10x compresses the wait):
kraken session start --label momentum-1-s2 --experiment momentum-1 \
  --from tape:jun-crash --speed 10 -o json 2>/dev/null &

Replay reaction-time note: at speed N you have 1/N of live reaction time — suits slow-cadence strategies (DCA); drop to `--speed 1` for reactive ones.

(At least one `--channels` entry is required on live entries, and the recorder runs in the foreground, so background it with `&` as the playground skill does. The `session_started` stdout line carries the a

Read more
@krakenfx
Ships withkraken-cli

Trade on Kraken from your terminal, or let your AI agent trade for you. One install covers crypto, tokenized U.S. stocks and ETFs (for non-U.S. customers), forex, and futures. Every command can answer in JSON.

81459 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
814
Star history of krakenfx/kraken-cli on GitHub, a chart by star-history.com

Other skills on kraken-cli.

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…

ccxt11d45k
@ccxt@ccxtInstall Skill

Questions about kraken-lab-experiment.

Which coding agents can use kraken-lab-experiment?
kraken-lab-experiment 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.