Agent skill

Recipe Playground Dca Triggered

by krakenfx in krakenfx/kraken-cli

Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session.

MITAuto-check passedBackend & APIs

Install Recipe Playground Dca Triggered

skills CLI
$ npx skills add krakenfx/kraken-cli --skill recipe-playground-dca-triggered -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install krakenfx/kraken-cli recipe-playground-dca-triggered --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/krakenfx/kraken-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/recipe-playground-dca-triggered .claude/skills/recipe-playground-dca-triggered && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
recipe-playground-dca-triggered
GitHub stars
751
Token cost
~2k tokens
SKILL.md length
745 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session.

  • Tasks that involve Realtime and WebSockets
  • SKILL.md covers Important, Params, Quick Start and Start the Session, plus 3 more sections
  • Calls jq

What it does

Recipe Playground Dca Triggered is an agent skill from krakenfx/kraken-cli. Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Realtime and WebSockets. The repository describes itself as: The first AI-native CLI for trading crypto, stocks, forex, and derivatives. The licence is MIT.

When your agent uses it

  • Tasks that involve Realtime and WebSockets

Example prompts

  • “/recipe-playground-dca-triggered”

What it can do on your machine

Read from SKILL.md and the folder at commit aa56e59. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Recipe Playground Dca Triggered loads about 2k tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 745 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from krakenfx/kraken-cli at commit aa56e59, republished under its MIT licence (© krakenfx). 745 words, ~1,960 tokens.

Download SKILL.mdSave it as .claude/skills/recipe-playground-dca-triggered/SKILL.md (or your agent's skills folder).
name
recipe-playground-dca-triggered
description
Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session.
version
1.0.0

Playground: DCA (Dip-Triggered)

PREREQUISITE: Load kraken-playground, kraken-dca-strategy, and kraken-ws-streaming to run this recipe. This recipe is an example, not a boundary. Adapt the steps to your hypothesis, or write your own driver (see kraken-playground → Driving Your Own Hypothesis).

Buy the instant price dips below a short-term average, not on a fixed clock. A WebSocket ticker stream drives the loop and every qualifying tick is a candidate buy, rate-limited so buys stay spaced. Record every buy and skip into one session for later replay and P&L.

Use this skill for:

  • catching an intra-interval dip that a time-based sampler would miss
  • event-driven DCA where the trigger is a price condition, not a clock
  • recording a streamed decision loop for replay

Important

This recipe records a session. It never places a live order. Paper results may overstate live performance: fees and slippage are simulated and there are no partial fills (see kraken-paper-strategy).

The stream is the loop, not /loop. A while read over a stream is a long-lived process that holds state (the reference average, the last-buy time) in memory across events. This is a deliberate exception to the stateless-round model (see kraken-playground → Running over a Window); keep the session short and the state minimal.

The stream is blind during reconnect gaps. The CLI reconnects with paced exponential backoff (up to 12 attempts per stream lifecycle, see kraken-ws-streaming), and any dip inside that window is missed. The recorder tolerates gaps; a decision loop does not.

Params

Every number that gates a buy goes in --strategy-params:

  • dollars_per_buy: quote currency deployed per triggered buy
  • dip_threshold_pct: buy when price is at least this far below the short-term average
  • min_spacing_s: minimum seconds between buys; the rate limit on the trigger. Enforce it from the typed cursor: kraken session state set --last-action-at <now> after each buy, and skip the trigger while now - .cursor.last_action_at < min_spacing_s (kraken session state get)
  • max_buys: session length in buys; stop after this many
  • sma_refresh_s: how often to refresh the reference average from REST

Quick Start

Natural language:

Dollar-cost-average into Bitcoin. Watch the live price and buy $100 whenever
it dips more than 0.10% below the 1-hour SMA, but no more than once every
20 minutes, up to 10 buys. Record all buys and skips. At the end, show P&L.

Start the Session

Work inside a paper workspace (create one once: kraken workspace create dcatrig --capital 10000 --mode paper), then:

bash
export KRAKEN_WORKSPACE=dcatrig

kraken session start \
  --symbols BTC/USD --channels ticker,trade --to duckdb,jsonl \
  --label dcatrig-btc-$(date +%Y%m%d-%H%M%S) \
  --strategy recipe-playground-dca-triggered \
  --strategy-params '{"dollars_per_buy":100,"dip_threshold_pct":-0.10,"min_spacing_s":1200,"max_buys":10,"sma_refresh_s":300}' \
  -o json 2>/dev/null &

# The session_started stdout line carries the id: {"type":"session_started","session":"s<n>",...}

Print the session id to the user right after starting, and again in the final report — it is the handle for checking kraken session show and locating the artifacts.

Show full SKILL.md (363 more words)Show less

Stream and Decide

Subscribe to the ticker with the BBO trigger to cut noise, and act on each tick. Hold the reference average and the last-buy time in the loop; refresh the average from REST every sma_refresh_s, not on the tick rate.

Bind the gating numbers to the same --strategy-params you recorded, so the loop runs the hypothesis you started — never hardcode them into the arithmetic:

bash
DOLLARS_PER_BUY=100
DIP_THRESHOLD_PCT=-0.10
MIN_SPACING_S=1200
MAX_BUYS=10
SMA_REFRESH_S=300

# True 1h SMA: last twelve 5-minute closes. (--interval 60 would average the
# whole returned window — a multi-day mean, not 1h.)
SMA=$(kraken ohlc BTCUSD --interval 5 -o json 2>/dev/null | jq '[.candles[-12:][].close] | add/length')
SMA_TS=$(date +%s)
LAST_BUY=0
BUYS=0

kraken ws ticker BTC/USD --event-trigger bbo -o json 2>/dev/null | while read -r line; do
  PRICE=$(echo "$line" | jq -r '.data[0].last // empty'); [ -z "$PRICE" ] && continue
  NOW=$(date +%s)

  # Refresh SMA on its own cadence, not per tick
  if [ $((NOW - SMA_TS)) -ge $SMA_REFRESH_S ]; then
    SMA=$(kraken ohlc BTCUSD --interval 5 -o json 2>/dev/null | jq '[.candles[-12:][].close] | add/length')
    SMA_TS=$NOW
  fi

  # Fail loud, never fabricate: a broken READ must not gate a buy or write a reason.
  if [ -z "$PRICE" ] || [ -z "$SMA" ]; then
    kraken session note --kind alert --symbol BTC/USD \
      --reason "tick skipped: READ failed (price='$PRICE' sma='$SMA')" -o json 2>/dev/null
    continue
  fi
  VS_SMA=$(echo "scale=6; (($PRICE - $SMA) / $SMA) * 100" | bc -l)

  # THINK: dip tripped AND rate limit satisfied?
  if (( $(echo "$VS_SMA <= $DIP_THRESHOLD_PCT" | bc -l) )) && [ $((NOW - LAST_BUY)) -ge $MIN_SPACING_S ]; then
    VOL=$(echo "scale=8; $DOLLARS_PER_BUY / $PRICE" | bc -l)
    kraken order buy BTC/USD "$VOL" --type market \
      --reason "dip-triggered buy: BTC/USD at $PRICE is ${VS_SMA}% below 1h SMA $SMA (threshold ${DIP_THRESHOLD_PCT}%); deploying \$$DOLLARS_PER_BUY" \
      -o json 2>/dev/null
    LAST_BUY=$NOW
    BUYS=$((BUYS + 1))
    [ $BUYS -ge $MAX_BUYS ] && break
  fi
done

kraken session stop -o json 2>/dev/null

Notes on the decision:

  • min_spacing_s is a real rate limit on the trigger, not the sampling bookkeeping the time-gated recipe removed. It stops a sustained dip from firing on every tick.
  • Refresh the average on sma_refresh_s. Recomputing it per tick burns REST calls for a number that barely moves.
  • Log skips sparingly. A stream produces many non-qualifying ticks; noting each one floods the decision log. Note only meaningful events (a dip that was rate-limited, a wide spread), never every tick.

Stop and Review

bash
kraken session show -o json 2>/dev/null | jq '.summary'

kraken session decisions --session s<n> -o json 2>/dev/null \
  | jq -c '.decisions[] | {kind, symbol, reason}'

Report:

  • buys placed vs max_buys, and time between them
  • average fill cost vs window mean
  • how many dips were caught vs rate-limited
  • P&L, and whether the dip threshold and spacing fit the tape

Hard Rules

  • This recipe records a session. It never places a live order.
  • The stream is the loop. Do not also wrap it in /loop; that is two clocks on one decision.
  • Treat stream output as NDJSON, one object per line. Never parse it as a single document (see kraken-ws-streaming).
  • The loop is blind during reconnect gaps. Keep the session short and accept that dips inside a backoff window are missed.
  • Rate-limit buys with min_spacing_s so a sustained dip does not fire on every tick.
  • Keep every gating number in --strategy-params and the arithmetic in jq/bc.
  • The session directory (decisions.jsonl and the DuckDB/JSONL sinks) is owned by the CLI recorder. The agent only reads it, and only for the stop-time summary. Never write, edit, mkdir, or append inside it — every buy goes through kraken paper buy, so the recorder stays the single writer.
  • 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.

© krakenfx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/recipe-playground-dca-triggered of krakenfx/kraken-cli.

Open the folder on GitHubat commit aa56e59

Compare with similar skills

Recipe Playground Dca Triggered next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Recipe Playground Dca Triggered compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Recipe Playground Dca Triggered this skillkrakenfx/kraken-cli751—~2kAutomated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT
Gemini Live API Devgoogle-gemini/gemini-skills4.3k—~4.6kAutomated safety check: PassApache-2.0
Broker Integrationmarketcalls/openalgo2.8k—~4.7kAutomated safety check: NotesAGPL-3.0
Trigger.dev Realtimepapermark/papermark9.2k—~1.7kAutomated safety check: PassCustom licence

Similar skills

  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Gemini Live API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live models (2.0/2.5/3.1) to Gemini 3.8 Live.

    4.3k GitHub stars~4.6k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Broker Integration

    marketcalls/openalgo

    Integrate a new Indian broker into OpenAlgo, or modify an existing broker plugin.

    2.8k GitHub stars~4.7k tokensUpdated yesterday
    Backend & APIsAuto-check: notes
  • Trigger.dev Realtime

    papermark/papermark

    Shows how to subscribe to Trigger.dev task runs from the backend and from React for progress indicators, live dashboards, AI response streams and approval waits.

    9.2k GitHub stars~1.7k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Spider King

    aoyunyang/spider-king-skill

    Pure-web protocol reverse skill: turn hostile browser clients into browser-free Python collectors.

    509 GitHub stars~7.3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from krakenfx/kraken-cli

All 59 skills in this repo
  • Kraken Alert Patterns

    krakenfx/kraken-cli

    Price alerts, threshold monitoring, and notification triggers for agents.

    751 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Kraken Autonomy Levels

    krakenfx/kraken-cli

    Progress from manual trading to full agent autonomy with controlled risk at each level.

    751 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Kraken Basis Trading

    krakenfx/kraken-cli

    Capture the spot-futures price spread with delta-neutral basis trades.

    751 GitHub stars~802 tokensUpdated 2 mo ago
    Auto-check passed
  • Kraken Dca Strategy

    krakenfx/kraken-cli

    Dollar cost averaging with scheduled buys and performance tracking.

    751 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Kraken Earn Staking

    krakenfx/kraken-cli

    Discover staking strategies, allocate funds, and track earn positions.

    751 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Kraken Error Recovery

    krakenfx/kraken-cli

    Handle order failures, network errors, and duplicate submissions safely.

    751 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Recipe Playground Dca Triggered

What does Recipe Playground Dca Triggered do?

Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session. Recipe Playground Dca Triggered is an agent skill from krakenfx/kraken-cli. Example driver: dip-triggered dollar-cost-averaging on a live WebSocket stream, recorded to a session.

When should I use Recipe Playground Dca Triggered?

Recipe Playground Dca Triggered fits situations like: tasks that involve Realtime and WebSockets.

How do I install Recipe Playground Dca Triggered in Claude Code?

Run `npx skills add krakenfx/kraken-cli --skill recipe-playground-dca-triggered -a claude-code`. Or copy the skill folder (skills/recipe-playground-dca-triggered in krakenfx/kraken-cli) into .claude/skills/recipe-playground-dca-triggered in your project. Claude Code loads it when a task matches its description.

How do I install Recipe Playground Dca Triggered in Codex?

Run `npx skills add krakenfx/kraken-cli --skill recipe-playground-dca-triggered -a codex`. Or copy the skill folder (skills/recipe-playground-dca-triggered in krakenfx/kraken-cli) into .agents/skills/recipe-playground-dca-triggered in your project. Codex loads it when a task matches its description.

Can I use Recipe Playground Dca Triggered in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add krakenfx/kraken-cli --skill recipe-playground-dca-triggered -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/recipe-playground-dca-triggered, .gemini/skills/recipe-playground-dca-triggered, .github/skills/recipe-playground-dca-triggered and .opencode/skills/recipe-playground-dca-triggered in your project.

What does Recipe Playground Dca Triggered need to run?

Going by SKILL.md and its folder, Recipe Playground Dca Triggered needs the command-line tools its instructions call (jq).

Does Recipe Playground Dca Triggered access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Recipe Playground Dca Triggered safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Recipe Playground Dca Triggered use?

Recipe Playground Dca Triggered is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Recipe Playground Dca Triggered use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Recipe Playground Dca Triggered?

Skills that share tags, products or a category with Recipe Playground Dca Triggered: Supabase Development and Debugging (supabase/agent-skills, 2.7k stars), Use Yaak (mountain-loop/yaak, 19k stars), Gemini Live API Dev (google-gemini/gemini-skills, 4.3k stars) and Broker Integration (marketcalls/openalgo, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Recipe Playground Dca Triggered?

krakenfx (a GitHub organization) maintains it in krakenfx/kraken-cli, which has 751 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on August 7, 2026.

Source: krakenfx/kraken-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.