Agent skill

Kraken Error Recovery

by krakenfx in krakenfx/kraken-cli

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

MITAuto-check passedBackend & APIs

Install Kraken Error Recovery

skills CLI
$ npx skills add krakenfx/kraken-cli --skill kraken-error-recovery -a claude-code

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

GitHub CLI
$ gh skill install krakenfx/kraken-cli kraken-error-recovery --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/kraken-error-recovery .claude/skills/kraken-error-recovery && 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
kraken-error-recovery
GitHub stars
751
Token cost
~1.1k tokens
SKILL.md length
431 words
Files
1
Skills in repo
59
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 4 steps: Read the suggestion field for specific… → Read the docs_url field for the relevant… → Decide whether to retry (and when),… → …
  • Tasks that involve Rate limiting
  • SKILL.md covers Error Categories, Duplicate Order Prevention, Client Order ID for Idempotency and Network Error Recovery Pattern, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Kraken Error Recovery is an agent skill from krakenfx/kraken-cli. Handle order failures, network errors, and duplicate submissions safely.

Its SKILL.md is about 1.1k 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 Rate limiting. 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 Rate limiting

Example prompts

  • “/kraken-error-recovery”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the suggestion field for specific guidance on what limit was hit and how to adapt.
  2. Read the docs_url field for the relevant Kraken documentation.
  3. Decide whether to retry (and when), reduce request frequency, or switch to WebSocket streaming for real-time data.
  4. Resume with a single test call before continuing the loop.

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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    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

Kraken Error Recovery loads about 1.1k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 431 words of instructions outside code blocks.

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

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). 431 words, ~1,114 tokens.

Download SKILL.mdSave it as .claude/skills/kraken-error-recovery/SKILL.md (or your agent's skills folder).
name
kraken-error-recovery
description
Handle order failures, network errors, and duplicate submissions safely.
version
1.0.0

kraken-error-recovery

Use this skill for:

  • recovering from failed order submissions
  • preventing duplicate orders after network errors
  • handling partial fills and stuck states
  • building resilient agent loops

Error Categories

Parse the .error field from the JSON response:

CategoryMeaningRecovery
authCredentials invalid or expiredRe-authenticate, do not retry
rate_limitToo many requestsRead suggestion and docs_url fields, adapt strategy
networkConnection failedRetry with exponential backoff
validationInvalid request parametersFix inputs, do not retry unchanged
apiExchange-side rejectionInspect error message, adjust request

Duplicate Order Prevention

After a network error during order submission, the order may or may not have reached the exchange. Check before resubmitting:

bash
kraken open-orders -o json 2>/dev/null

If the order appears in open-orders, do not resubmit. If absent:

bash
kraken trades-history -o json 2>/dev/null

If the order filled immediately, it appears in trades. Only resubmit if the order is absent from both.

Client Order ID for Idempotency

Use --cl-ord-id to tag orders with a unique identifier:

bash
kraken order buy BTCUSD 0.001 --type limit --price 50000 --cl-ord-id "dca-2024-01-15-001" -o json 2>/dev/null

If the submission fails, query by client order ID to check if it reached the exchange:

bash
kraken open-orders --cl-ord-id "dca-2024-01-15-001" -o json 2>/dev/null

Cancel by client order ID if needed:

bash
kraken order cancel --cl-ord-id "dca-2024-01-15-001" -o json 2>/dev/null

Network Error Recovery Pattern

1. Submit order (capture exit code and response)
2. If exit code != 0 and error == "network":
   a. Wait 2 seconds
   b. Check open-orders for the order (by cl-ord-id or recent orders)
   c. If found → order succeeded, proceed
   d. If not found → check trades-history
   e. If in trades → order filled, proceed
   f. If absent from both → safe to retry
3. Retry with same cl-ord-id

Rate Limit Recovery

The CLI returns rate limit errors immediately with no internal retry. The error includes actionable fields for the agent to decide next steps.

On rate_limit error:

  1. Read the suggestion field for specific guidance on what limit was hit and how to adapt.
  2. Read the docs_url field for the relevant Kraken documentation.
  3. Decide whether to retry (and when), reduce request frequency, or switch to WebSocket streaming for real-time data.
  4. Resume with a single test call before continuing the loop.
bash
# { "error": "rate_limit", "suggestion": "...", "docs_url": "...", "retryable": true }
kraken status -o json 2>/dev/null

If status succeeds, the rate limit has cleared.

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

Partial Fill Handling

Limit orders may partially fill. Check order status:

bash
kraken query-orders <TXID> -o json 2>/dev/null

Fields: vol (requested volume), vol_exec (filled volume), status (open, closed, canceled) — query-orders returns Kraken's raw wire fields, unlike open-orders/closed-orders which use the CLI schema (volume, volume_executed).

If partially filled and the remaining volume is needed, amend or place a new order for the remaining amount.

Stuck Order Resolution

An order stuck in open state that should have filled or been canceled:

  1. Check the order:
    bash
    kraken query-orders <TXID> -o json 2>/dev/null
  2. If still open, cancel:
    bash
    kraken order cancel <TXID> -o json 2>/dev/null
  3. Verify cancellation:
    bash
    kraken open-orders -o json 2>/dev/null

Hard Rules

  • Never blind-retry an order after a network error; always check state first.
  • Use --cl-ord-id for all orders in automated loops.
  • On auth errors, stop all activity and re-authenticate.
  • Log every error and recovery action for post-session audit.
  • 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/kraken-error-recovery of krakenfx/kraken-cli.

Open the folder on GitHubat commit aa56e59

Compare with similar skills

Kraken Error Recovery 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.

Kraken Error Recovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kraken Error Recovery this skillkrakenfx/kraken-cli751—~1.1kAutomated safety check: PassMIT
Add Hosted Keysimstudioai/sim30k—~3.6kAutomated safety check: PassApache-2.0
Upstash Ratelimit TSupstash/ratelimit-js2k—~313Automated safety check: PassMIT
Repo2skillzhangyanxs/repo2skill246—~3.6kAutomated safety check: PassNone
Better Auth Security Best PracticesEpicenterHQ/epicenter4.8k—~896Automated safety check: PassCustom licence
Dload Fetch Toolphp-internal/dload105—~1.1kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Add Hosted Key

    simstudioai/sim

    Add hosted API key support to a tool so Sim provides the key (metered and billed to the workspace) when a user has not brought their own.

    30k GitHub stars~3.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Upstash Ratelimit TS

    upstash/ratelimit-js

    Official

    Lightweight guidance for using the Redis Rate Limit TypeScript SDK, including setup steps, basic usage, and pointers to advanced algorithm, features, pricing, and traffic‑protection docs.

    2k GitHub stars~313 tokensUpdated 16 days ago
    Backend & APIsAuto-check passed
  • Repo2skill

    zhangyanxs/repo2skill

    Convert GitHub/GitLab/Gitee repositories into comprehensive OpenCode Skills using embedded LLM calls with multiple mirrors and rate limit handling

    246 GitHub stars~3.6k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Better Auth security hardening: rate limits, secrets, CSRF, trusted origins, cookies, sessions, OAuth tokens, and audit logging.

    4.8k GitHub stars~896 tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • Dload Fetch Tool

    php-internal/dload

    Get a CLI tool — native binary or PHAR — from a GitHub release into a project folder with dload (vendor/bin/dload).

    105 GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Gateway

    itsmostafa/aws-agent-skills

    AWS API Gateway for REST and HTTP API management. An agent skill from itsmostafa/aws-agent-skills.

    1.2k GitHub stars~2.2k tokensUpdated 5 days 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 Fee Optimization

    krakenfx/kraken-cli

    Minimize trading fees through maker orders, volume tiers, and fee-aware execution.

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

Categories

Questions about Kraken Error Recovery

What does Kraken Error Recovery do?

Handle order failures, network errors, and duplicate submissions safely. Kraken Error Recovery is an agent skill from krakenfx/kraken-cli. Handle order failures, network errors, and duplicate submissions safely.

When should I use Kraken Error Recovery?

Kraken Error Recovery fits situations like: tasks that involve Rate limiting.

How do I install Kraken Error Recovery in Claude Code?

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

How do I install Kraken Error Recovery in Codex?

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

Can I use Kraken Error Recovery 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 kraken-error-recovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kraken-error-recovery, .gemini/skills/kraken-error-recovery, .github/skills/kraken-error-recovery and .opencode/skills/kraken-error-recovery in your project.

What does Kraken Error Recovery need to run?

SKILL.md names no scripts, command-line tools or credentials: Kraken Error Recovery is instructions for the agent only.

Does Kraken Error Recovery 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 Kraken Error Recovery 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 Kraken Error Recovery use?

Kraken Error Recovery 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 Kraken Error Recovery use?

About 1.1k tokens (SKILL.md is roughly 4.5k 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 Kraken Error Recovery?

Skills that share tags, products or a category with Kraken Error Recovery: Add Hosted Key (simstudioai/sim, 30k stars), Upstash Ratelimit TS (upstash/ratelimit-js, 2k stars), Repo2skill (zhangyanxs/repo2skill, 246 stars) and Better Auth Security Best Practices (EpicenterHQ/epicenter, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kraken Error Recovery?

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.