krakenfx/kraken-cli/kraken-liquidation-guard
Claude Code and agent skill by krakenfx/kraken-cli
- community
Checking that the SKILL.md file is still in the repository.
Prevent futures liquidation through margin monitoring and emergency procedures.
Install
npx vskill@latest install krakenfx/kraken-cli/kraken-liquidation-guardSKILL.md
kraken-liquidation-guard
Use this skill for:
- monitoring margin ratio to detect liquidation risk
- automated position reduction when thresholds are breached
- emergency flatten procedures
- proactive margin top-up patterns
Margin Health Check
Key fields of the multi-collateral account, under .accounts.flex:
marginEquity: account value that counts as margin, unrealized P&L includedinitialMargin: margin held for positionsmaintenanceMargin: minimum margin before liquidationavailableMargin: free margin for new positions
Margin ratio = .accounts.flex.maintenanceMargin / .accounts.flex.marginEquity. Liquidation approaches as this ratio nears 1.0. A single-collateral account (.accounts.fi_*) reports maintenance margin, portfolio value and available funds as marginRequirements.mm, auxiliary.pv and auxiliary.af.
Alert Thresholds
| Ratio | Status | Action | |
|---|---|---|---|
| < 0.3 | Healthy | Normal operation | |
| 0.3 - 0.5 | Caution | Reduce position or add margin | |
| 0.5 - 0.7 | Warning | Reduce position immediately | |
| > 0.7 | Critical | Emergency flatten |
Monitoring Loop
Or poll periodically:
Unwind Queue Check
If a position enters the unwind queue, liquidation is imminent:
Any result here requires immediate action.
Emergency Flatten
Cancel all open orders, then close all positions:
Margin Top-Up
Transfer funds from spot wallet to futures to increase margin:
Or from main account:
Leverage Reduction
Lower leverage to reduce margin requirements:
Dead Man's Switch
Always run a dead man's switch during futures sessions:
If the agent crashes, orders auto-cancel, preventing further margin consumption.
Hard Rules
- Monitor margin ratio continuously during any futures session.
- Alert at 0.5 ratio; act at 0.7. Do not wait for the exchange to liquidate.
- Emergency flatten requires human approval unless the agent operates at autonomy level 4+.
- Margin top-ups move funds:
futures transferandwallet-transferare flagged dangerous and need human approval. - Never increase position size when margin ratio is above 0.3.
futures set-leverageis flagged dangerous: it changes the margin requirement on open positions, so de-risking with it needs the same human approval as flattening.- 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.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kraken-liquidation-guard/SKILL.md
Popularity
- Repository stars
- 74
- Repository forks
- 10
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/krakenfx/kraken-cli/kraken-liquidation-guard)