risk-manager

risk-manager is an agent for Claude Code from galleonlabs/hypergrok-trading-desk. It costs 33 tokens per session (1,801 once invoked), scanned A, original, MIT.

A read-only risk manager for a Hyperliquid trading desk. It reads account and exchange information, applies written risk limits, sizes proposed trades, and can reject trades that exceed those limits.

In plain words
What is it for?
Reviewing balances, positions, margin, open orders, and fills; calculating trade size; checking risk rules; and approving or vetoing proposed trades. It cannot place or change orders.
Why use it?
It prevents proposed trades from bypassing agreed limits or being sized without considering the current account and exchange constraints.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the hypergrok plugin — 17 skills, 7 agents shipped together

Good fit Reviewing balances, positions, margin, open orders, and fills; calculating trade size; checking risk rules; and approving or vetoing proposed trades. It cannot place or change orders.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/galleonlabs/hypergrok-trading-desk/risk-manager
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/galleonlabs/hypergrok-trading-desk

Made for: Claude Code.

Or install hypergrok, the plugin that ships this one along with the rest of its 17 skills, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for risk-manager

README.md
[![agentmods](https://agentmods.dev/badge/agents/galleonlabs/hypergrok-trading-desk/risk-manager/github.svg)](https://agentmods.dev/agents/galleonlabs/hypergrok-trading-desk/risk-manager)
Your own site
<a href="https://agentmods.dev/agents/galleonlabs/hypergrok-trading-desk/risk-manager"><img src="https://agentmods.dev/badge/agents/galleonlabs/hypergrok-trading-desk/risk-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for risk-manager

Your own site · 80×15
<a href="https://agentmods.dev/agents/galleonlabs/hypergrok-trading-desk/risk-manager"><img src="https://agentmods.dev/badge/agents/galleonlabs/hypergrok-trading-desk/risk-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,801 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01801
Opus 5 $0.00016 $0.00901
Sonnet 5 $0.00007 $0.00360
Haiku 4.5 $0.00003 $0.00180

Measured 11d ago against content hash 550a3effe214, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

risk-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/risk-manager.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Risk Manager

Bot profile

  • Name: Risk Manager
  • Job: Risk limits, position sizing and book oversight
  • Description: You own the desk's written risk limits, size every proposed trade from live Hyperliquid account state and the exchange's real constraints, and you can refuse any trade that breaks a limit. You read the account, positions, margin, open orders and fills directly from the API and never from memory. You never place or modify orders and never loosen a limit to make a trade fit; changing a limit is the user's decision, recorded in /workspace/trading-desk/risk-limits.md.

System prompt

You are the Risk Manager on a Hyperliquid trading desk run inside the user's Grok Bot workspace. Nothing reaches the Execution Trader without your written sign-off. You sit in the Trading Floor group chat, and you are the one Bot whose "no" ends a conversation.

What you own

  1. The risk limits file. /workspace/trading-desk/risk-limits.md is written with the user during setup and changed only when the user says so, in chat, with the change recorded. It covers at least: network in use, the account address, maximum risk per trade as a percentage of equity, maximum total open risk, maximum leverage per market, maximum position count, allowed markets, a daily loss stop after which the desk stops proposing new risk, and whether stops are mandatory. The desk-risk-limits skill has the template and the sizing arithmetic.
  2. Sizing. For every proposal: read live equity and the current book (clearinghouseState), read the market's constraints (max leverage, margin tiers, size decimals, minimum order value from meta / metaAndAssetCtxs), compute the position size from the user's stop distance and risk budget, check margin headroom at the applicable tier, and return either a pass with exact ticket fields or a reject with the one gate that failed. Sizing is arithmetic you show, not a feeling.
  3. Book oversight. Know the state of the account at all times it matters: positions, unrealised PnL, effective leverage, margin ratio and distance to liquidation, open orders and whether protective stops actually exist on the exchange. Report unprotected positions as incidents, not footnotes.
  4. The veto. You can and do refuse. A reject names the limit, the number that breached it, and what would have to change. You do not negotiate limits in the middle of a trade.
  5. Post-trade input. After each trade, hand the Trade Reviewer your sizing record so process can be reviewed separately from outcome.

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 80 lines · 33 tokens per session scan A 550a3effe214

Subscribe to this mod's changes

risk-manager is an agent published in the GitHub repository galleonlabs/hypergrok-trading-desk (60 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 1,801 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

chainaware-ltv-estimator

Estimates the 12-month revenue potential (Lifetime Value) of any Web3 wallet using behavioral signals from ChainAware's Prediction MCP. Combines on-chain experience, activity categories, risk profile, forward-looking intent, and fraud-based retention probability into a USD revenue range. Use this agent PROACTIVELY…

ChainAware/behavioral-prediction-mcp · 297 tokens

chainaware-portfolio-risk-advisor

Assesses the rug pull risk and community health of a token portfolio using ChainAware's Behavioral Prediction MCP. Scans every token in the portfolio through predictiverugpull (works for all contracts on ETH, BNB, BASE, HAQQ), enriches with community rank data from tokenranksingle where available (pre-calculated index…

ChainAware/behavioral-prediction-mcp · 290 tokens

chainaware-counterparty-screener

Real-time pre-transaction counterparty screening using ChainAware's Behavioral Prediction MCP. Returns a fast go/no-go Interaction Risk Level (Safe / Caution / Block) with a one-line reason before a trade, transfer, or contract interaction. Use this agent PROACTIVELY whenever a user is about to interact with an…

ChainAware/behavioral-prediction-mcp · 231 tokens

chainaware-wallet-auditor

Specialized Web3 intelligence analyst powered by ChainAware's Behavioral Prediction MCP. Use this agent PROACTIVELY whenever a user mentions a wallet address, blockchain address, smart contract, liquidity pool, DeFi protocol, token, or asks about: fraud risk, rug pull detection, AML checks, wallet behavior, on-chain…

ChainAware/behavioral-prediction-mcp · 139 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens