.claude/skills/validate-risk/SKILL.md
Validate risk governor checks and risk configuration changes. Use when modifying risk parameters, adding new risk checks, or reviewing risk logic.
npx skillsauth add HadiAlizade77/poly validate-riskInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validate risk check: $ARGUMENTS
packages/backend/src/services/risk/governor.tspackages/backend/src/services/risk/checks/packages/backend/tests/unit/risk/global_enabled — system on/offpaper_trade_mode — log but don't executekill_switch — manual or auto kill triggereddaily_drawdown — today's loss vs limitconsecutive_losses — loss streak vs limitmax_exposure — total exposure vs limitmax_position_market — per-market position sizemax_position_category — per-category exposuremin_edge — edge > min_edge_multiple x costmin_liquidity — market liquidity thresholdmax_spread — bid-ask spread thresholdcooldown — time since last losslatency — API latency thresholdtrade_rate — trades per hour limitcategory_enabled — category trading allowedstrategy_enabled — strategy enabledrisk_eventsrisk_config table (not hardcoded)cd packages/backend && npx vitest run tests/unit/risk/ --reporter=verbose
The risk governor is safety-critical code. Every change must have:
development
Wire up a new WebSocket event channel between backend and frontend. Use when adding real-time events like price updates, order fills, alerts, regime changes, etc.
development
Scaffold a new backend service/process for the Polymarket platform. Use when creating a new PM2-managed service like market-scanner, data-ingestion, strategy-runner, etc.
testing
Run tests for the Polymarket platform. Supports unit, integration, and E2E tests. Use after implementing features or fixing bugs.
development
Create a new frontend page/view for the Polymarket trading dashboard. Use when building pages like Dashboard, Markets, Strategies, Signals, Trades, Positions, Risk, AI, Analytics, Backtest, Alerts, Settings, Health.