trader-regime — Claude Code skill: market regime detection
The skill asks neural-trader which market regime is running and suggests a strategy type to match. Handy before a backtest or a signal.
npx skills add ruvnet/ruflo --skill trader-regime -a claude-codeWhat trader-regime does
The skill calls npx neural-trader --regime --symbol TICKER and sorts the answer into bull, bear, ranging or volatile. Then the agent runs a SONA prediction through the ruflo-core MCP tools, picks a strategy type, and searches memory for past conditions that look alike. The finished write-up goes back to memory under a regime-DATE key.
Before the first run it checks whether the package is present and installs neural-trader through npm with --ignore-scripts if not. One ticker per call: the CLI answers "Unknown command" to --symbols and --regime-detect.
Watch the version. In 2.8.11 --regime classifies a built-in sample price series and says so in the output: "Synthetic prices used for demo". You get the shape of the report, not a reading on TICKER. Real bars come from --backtest --live with the yahoo-finance source. Indicator flags are gone in that release (--indicators is rejected), so RSI and SMA are library calls, nt.calculateRsi and nt.calculateSma, run over those bars.
What it helps with
- See which regime the market is in before picking a strategy
- Get a suggested strategy type for present conditions
- Find earlier periods with a similar regime in memory
- Store the analysis under a
regime-DATEkey for later checks - Check the regime before a backtest or a signal
Example prompts for the agent
- What regime is SPY in right now? Run the trader-regime skill.
- trader-regime --symbol AAPL: classify the regime and tell me which strategy fits.
- Before the backtest, run trader-regime on MSFT and save the analysis to memory.
How to install trader-regime
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-regime -a claude-code2Manually: put the files in place
~/.claude/skills/trader-regime/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/trader-regime/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-regime -a codex2Manually: put the files in place
.agents/skills/trader-regime/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-regime -a cursor2Manually: put the files in place
.cursor/skills/trader-regime/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo trader-regime2Manually: put the files in place
.github/skills/trader-regime/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-regime -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-neural-trader/skills/trader-regimeManually: put the files in place
.devin/skills/trader-regime/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill trader-regime -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about trader-regime
How do I install trader-regime in Claude Code?
Run npx skills add ruvnet/ruflo --skill trader-regime -a claude-code. The skill lands at ~/.claude/skills/trader-regime/SKILL.md.
What does trader-regime do?
It classifies the market regime with npx neural-trader, recommends a strategy type for it, and keeps the result in ruflo-core memory so later questions can reuse it.
Why does `--regime` return synthetic prices?
In 2.8.11 the flag classifies a built-in demo series, and the output states it. For real bars use --backtest --live with the yahoo-finance source, then compute indicators with nt.calculateRsi and nt.calculateSma.
Source text
SKILL.md · MIT
---
name: trader-regime
description: Detect current market regime using npx neural-trader — bull/bear/ranging/volatile classification with recommended strategy. Use when the user asks about market conditions, wants to pick a strategy for current conditions, or before running a backtest/signal that should be regime-aware.
allowed-tools: Bash Read mcp__plugin_ruflo-core_ruflo__memory_store mcp__plugin_ruflo-core_ruflo__memory_search mcp__plugin_ruflo-core_ruflo__neural_predict
argument-hint: "[--symbol SPY] [--symbols AAPL,MSFT]"
---
Detect the current market regime using neural-trader's regime detection engine.
Steps:
1. Ensure neural-trader is available:
`npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader`
2. Run regime detection:
```bash
npx neural-trader --regime --symbol TICKER
```
One symbol per call (`--regime-detect` and `--symbols` are not recognised; the CLI answers "Unknown command"). In 2.8.11 this classifies a built-in sample price series (the result says "Synthetic prices used for demo"), so it is a demo of the output shape, not a read on TICKER. Say so in the report. For a real read, get the symbol's bars with `--backtest --live` (`dataSource: "yahoo-finance"`) and classify from those.
3. Technical indicators have no standalone CLI flag in 2.8.11 (`--indicators` is rejected). Use the `nt.calculateRsi` / `nt.calculateSma` library functions on real bars, or the `multi-indicator` strategy inside a backtest.
4. Use SONA for regime prediction:
`mcp__plugin_ruflo-core_ruflo__neural_predict({ input: "indicators: RSI=X, ADX=Y, VIX=Z" })`
5. Search for similar historical regimes:
`mcp__plugin_ruflo-core_ruflo__memory_search({ query: "regime similar to CURRENT", namespace: "trading-analysis" })`
6. Present: regime classification, confidence, recommended strategy type, historical precedents. If step 2 returned the synthetic sample, present only the output shape and state that no regime was measured.
7. Store analysis:
`mcp__plugin_ruflo-core_ruflo__memory_store({ key: "regime-DATE", value: "REGIME_ANALYSIS", namespace: "trading-analysis" })`
© ruvnet · MIT · ruvnet/ruflo