Risk Guard
A hard-veto risk gate that validates signals against drawdown and policy limits before execution — the final safety layer of the AIMM agentic hedge fund OS.
risk_guard is framed as a hard pre-execution risk veto with no outward sending, no credential access, and blocking-by-default intent; but the SKILL.md/persona never describe data minimization, degraded behavior on failure, rollback/recovery, or user confirmation, hence the deduction.
Interface signatures, query params and the JSON output contract are self-consistent; the repo has CI (ruff + pytest) and fixtures, yet no tests targeting risk_guard key paths were shown and error feedback is only sketched — static review cannot exceed 10.
Scenario is clear (risk gating of trade signals), trigger position and upstream/downstream dependencies are stated, output format given; but non-fit boundaries, input validation details, Chinese-language and mainland-China reachability are entirely undiscussed.
SKILL.md is concise and readable, dependencies are listed, AGPL-3.0 is explicit, and SECURITY.md gives a reporting channel; but no versioning, changelog, known-limitations disclosure, or stated maintenance ownership for the skill itself.
The hard-gate design offers genuine marginal value and the output schema is directly consumable; however static review cannot verify that validate() or the query endpoint works as claimed, and README backtest returns are not evidence for this skill.
The repo contains a real CI workflow, pytest suite, and hash-manifested pinned data — auditable primary material; but no test coverage evidence for the risk gate itself and no third-party corroboration of claims, so capped below the ceiling.
- The skill file is an interface description only; no implementation or targeted tests were shown, and the risk-gate behavior is execution-unverified.
- Failure modes are undefined (e.g., whether the gate fails open or closed when portfolio state or dependencies are missing) — verify independently before relying on it.
- Publisher identity is unverified; do not trust safety claims for real-capital deployments without your own testing.
- Core function depends on overseas LLM APIs (OpenAI/AtlasCloud) and Binance Testnet; reachability from mainland-China networks is unconfirmed.
- No Chinese documentation and no per-skill versioning or changelog; upgrade compatibility is not guaranteed.
What does this skill do, and when should you use it?
Risk Guard is a governance skill inside AI Market Maker (AIMM), a multi-agent crypto trading system, located at src/agents/governance/risk_guard/. It acts as the mandatory hard-veto layer before execution: every trade signal must pass validate(signal, portfolio_state) before it can proceed. It reads portfolio state from portfolio_management, fund-level risk limits from config/fund_policy.py, and runtime PnL from the execution engine. The skill ships with the full AIMM repository under AGPL-3.0 and depends on the repository's Python runtime and sibling agent modules.
It reads current portfolio state (from portfolio_management), fund-level risk policy (config/fund_policy.py), and live PnL from the execution engine. It runs validate(signal, portfolio_state) to produce a risk gate result for a proposed trade. It supports direct natural-language queries such as "What's my current drawdown?" and "Is it safe to open a new BTC position?". Via its query interface — /risk_guard?ticker=BTC/USDT&side=long&size=0.5 — it returns an approved/blocked verdict plus per-gate flags.
- A quant trader running AIMM who wants trades automatically blocked before execution when they breach fund-level risk limits
- Real-time drawdown monitoring of a multi-asset portfolio, halting new positions once policy thresholds are hit
- Pre-trade verification of a specific proposed position (e.g., a 0.5-size BTC/USDT long) against each risk gate
- Enforcing a hard governance checkpoint in a LangGraph-orchestrated multi-agent trading workflow
What are this skill's strengths and limitations?
- Has real veto power, not just logging — the README explicitly highlights this as genuine risk governance
- Clear, traceable inputs: portfolio state, a policy file, and runtime PnL
- Transparent, auditable verdicts with per-gate flags returned by the query interface
- Ships with a full open-source system including backtesting and a test suite, verifiable on Binance Testnet
- Cannot be used apart from the AIMM repo; depends on portfolio_management and fund_policy internals
- SKILL.md does not disclose which gates exist or their thresholds, so default conservatism cannot be verified from docs alone
- Primarily crypto-focused (Binance Testnet); whether the Futu stock adapter routes through Risk Guard is undocumented
- AGPL-3.0 imposes source-disclosure obligations if run as a network service
How do you install this skill?
Risk Guard is not installed standalone; it ships with the whole AIMM repo: git clone https://github.com/olaxbt/ai-market-maker.git && cd ai-market-maker; pip install uv; install the TA-Lib C library first (recommended: conda install -y ta-lib -c conda-forge); then run uv sync --extra dev and uv run pre-commit install; configure .env (Binance Testnet and OpenAI keys). For OpenClaw use, run claw install https://github.com/olaxbt/ai-market-maker. The skill lives at src/agents/governance/risk_guard/.
How do you use this skill?
Within the AIMM workflow, signals from portfolio management flow into Risk Guard automatically; only approved trades execute. You can also query it directly: /risk_guard?ticker=BTC/USDT&side=long&size=0.5 returns approved/blocked plus per-gate flags. Or ask in natural language: "What's my current drawdown?" or "Is it safe to open a new BTC position?". Risk limits are configured in config/fund_policy.py.
How does this skill compare with similar options?
The README contrasts Risk Guard with risk modules that only log, emphasizing its hard veto authority; no specific third-party competitors are named.