trader-risk — Claude Code skill: what it does, how to install
Evaluates portfolio VaR, CVaR, drawdown limits, and circuit breaker status using the neural-trader risk engine.
npx skills add ruvnet/ruflo --skill trader-risk -a claude-codeWhat trader-risk does
The skill evaluates market risk through the neural-trader engine. The agent checks for the npm package via npm ls neural-trader and installs it with npm install --ignore-scripts neural-trader when needed. The core calculation runs through npx neural-trader --risk assess.
The --risk assess command processes figures strictly from the --returns flag. The CLI ignores --symbol and --portfolio. Running the command without explicit returns is misleading because the tool silently analyzes a seven-point demo sample. Returns must be extracted first from historical bars or backtests. Standalone flags like --var or --position-sizing fail with an Unknown command error.
Kelly position sizing works only during backtest runs with --position-sizing kelly. The skill monitors circuit breakers including a 3% daily loss, a 5% weekly loss, single-asset concentration over 10%, and volatility spikes where VIX exceeds 2x. It stores the final metrics in mcp__plugin_ruflo-core_ruflo__memory_store under the trading-risk namespace.
What it helps with
- calculate portfolio VaR and CVaR from return series
- check daily and weekly loss circuit breakers
- monitor single-name concentration above 10 percent
- save risk assessment metrics to ruflo persistent memory
Example prompts for the agent
- Assess portfolio risk for returns 0.01,-0.005,0.012,-0.02 with portfolio value 100000
- Check circuit breaker status for daily and weekly drawdown limits
- Run historical VaR assessment at 0.95 confidence level on the returns series
How to install trader-risk
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-risk -a claude-code2Manually: put the files in place
~/.claude/skills/trader-risk/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/trader-risk/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-risk -a codex2Manually: put the files in place
.agents/skills/trader-risk/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-risk -a cursor2Manually: put the files in place
.cursor/skills/trader-risk/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo trader-risk2Manually: put the files in place
.github/skills/trader-risk/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-risk -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-neural-trader/skills/trader-riskManually: put the files in place
.devin/skills/trader-risk/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-risk -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about trader-risk
How to install trader-risk in Claude Code?
Run npx skills add ruvnet/ruflo --skill trader-risk -a claude-code in your terminal. The file is placed in ~/.claude/skills/trader-risk/SKILL.md.
What does trader-risk do?
It runs the neural-trader risk engine to calculate historical VaR and CVaR, checks loss breaker thresholds, and saves metrics to persistent memory.
Why does trader-risk require an explicit returns series?
The CLI flag --risk assess only reads from --returns, ignoring --symbol and --portfolio. Omitting returns forces a 7-value mock sample rather than actual portfolio data.
Source text
SKILL.md · MIT
---
name: trader-risk
description: Assess portfolio risk using npx neural-trader — VaR, CVaR, Sharpe, position sizing, circuit breaker status
allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search
argument-hint: "[--symbol TICKER] [--portfolio NAME]"
---
Assess portfolio and position risk using neural-trader's risk engine.
Steps:
1. Ensure neural-trader is available:
`npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader`
2. Run risk assessment:
```bash
# VaR, CVaR and drawdown from a returns series YOU supply (daily returns as decimals)
npx neural-trader --risk assess --returns 0.01,-0.005,0.012,-0.02 --portfolio-value 100000 --confidence-level 0.95 --method historical
```
`--risk assess` computes from `--returns` only. `--symbol` and `--portfolio` are ignored, and with no `--returns` it uses a built-in 7-value sample (`inputs.returnsCount: 7`), which is a demo, not a risk read on anything. Derive the returns from real bars first (a `--backtest --live` run with `dataSource: "yahoo-finance"`, or the user's own history). `--var`, `--correlation`, `--risk-tolerance` and `--position-sizing` as standalone flags are rejected by the CLI ("Unknown command").
3. Position sizing: Kelly sizing exists only inside a backtest (`--backtest ... --position-sizing kelly`). For a standalone figure, compute it from the win rate and payoff in the backtest output and state the assumptions; do not present it as an instruction to trade.
4. Check circuit breaker status:
- Daily loss limit (3%), weekly loss limit (5%)
- Correlation spike (>0.85), volatility regime (VIX > 2x)
- Max positions, single-name concentration (>10%)
5. Present: risk metrics, position sizing recommendation, active breakers, alerts
6. Store assessment:
`mcp__plugin_ruflo-core_ruflo__memory_store({ key: "risk-TICKER-DATE", value: "RISK_METRICS", namespace: "trading-risk" })`
© ruvnet · MIT · ruvnet/ruflo