Desk Risk Limits & Trade Sizing
A Risk Manager skill that writes the desk's risk-limits file, sizes every Hyperliquid trade from live account state, and issues PASS/REJECT tickets with exact fields.
AutomationAdvanced★ 602⑂ 134AI score 8/10Last updated: Nov 22, 2026
What it does
- Interviews the user one question at a time and writes a versioned
risk-limits.md(risk per trade, max leverage, daily loss stop, allowed markets, cluster limits). - Sizes from the stop, not from desired profit or available margin: stop slippage plus taker fees produce a
stressed_distance, and size is always rounded down toszDecimals. - Enforces Hyperliquid's real constraints on top — per-market tiered max leverage from
marginTables, 10 USD minimum notional, mandatory exchange-resting stops. - Reserves capacity for pending entries and unknown send outcomes (
pending_risk,pending_margin) so two parallel proposals can't spend the same free margin. - Answers "how's the book": equity, free margin, margin ratio, distance to
liquidationPx, unprotected positions, orphan orders, day PnL vs the daily loss stop. - Supports optional standing mandates, validated each time via
scripts/standing_mandate.py.
Who it's for
- Traders running Hyperliquid perps through an agentic or automated pipeline.
- Anyone who wants position-sizing discipline encoded as hard gates rather than vibes.
- Teams using a multi-agent desk flow: proposal → risk review → execution.
Examples
- "Set limits: 0.5% per trade, 3x max, testnet" → guided interview, then a dated v1 limits file.
- "ETH long 3,000, stop 2,900, equity $10,200" → PASS showing 0.4827 ETH, $51.00 assumed loss, the margin tier applied, and the exact ticket fields.
- "How's the book?" → timestamped report flagging any position without a resting reduce-only stop as an incident.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/galleonlabs/hypergrok-trading-desk/HEAD/skills/desk-risk-limits/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/desk-risk-limits folder from the GitHub repo galleonlabs/hypergrok-trading-desk into my ~/.claude/skills/desk-risk-limits/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/galleonlabs/hypergrok-trading-desk.git && mkdir -p ~/.claude/skills && cp -r hypergrok-trading-desk/skills/desk-risk-limits ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/galleonlabs/hypergrok-trading-desk.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r hypergrok-trading-desk/skills/desk-risk-limits ~/.claude/skills/ - This skill references sibling skills (
hyperliquid-account,hyperliquid-market-data),agents/risk-manager.mdandscripts/standing_mandate.py, so run Claude Code from inside the cloned repo for full functionality. - Restart Claude Code and ask it to "set up my risk limits" or "size this trade".
- Start with
network: testnetand verify the arithmetic before touching a mainnet account.
View source on GitHub ↗License: MIT