Agent skill

Trader Backtest

by ruvnet in ruvnet/ruflo

Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)

MITAuto-check: notesBusiness, Finance & HR

Install Trader Backtest

skills CLI
$ npx skills add ruvnet/ruflo --skill trader-backtest -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo trader-backtest --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ruflo-neural-trader/skills/trader-backtest .claude/skills/trader-backtest && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trader-backtest
GitHub stars
74k
Token cost
~1.4k tokens
SKILL.md length
485 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)

  • Works in 9 steps: Ensure neural-trader is available → Check for saved strategy config → Run backtest via neural-trader CLI → …
  • Tasks that involve Trading and backtesting
  • Calls npx, npm and node; needs OLD_KEY
  • Tasks that involve Architecture decision records

What it does

Trader Backtest is an agent skill from ruvnet/ruflo. Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Trading and backtesting and Architecture decision records. It works with Rust and Model Context Protocol. The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.

When your agent uses it

  • Tasks that involve Trading and backtesting
  • Tasks that involve Architecture decision records

Example prompts

  • “/trader-backtest”

Requirements

  • Node.js
  • A credential in OLD_KEY
  • Pre-approved tools (allowed-tools): Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_search, mcp__plugin_ruflo-core_ruflo__memory_delete, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Ensure neural-trader is available
  2. Check for saved strategy config
  3. Run backtest via neural-trader CLI
  4. Capture performance metrics from output: total return, annualized return, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit…
  5. Dedup prior backtests for the same (strategyId, paramsHash) before storing the fresh one (ADR-125 lifecycle / ADR-126 Phase 2…
  6. Sign the artifact (ADR-126 Phase 4)
  7. Store the (possibly signed) artifact to the canonical trading-backtests namespace
  8. If Sharpe > 1.5, store as successful pattern
  9. Train SONA on the outcome

What it can do on your machine

Read from SKILL.md and the folder at commit de590e1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • mcp__plugin_ruflo-core_ruflo__memory_store
    • mcp__plugin_ruflo-core_ruflo__memory_retrieve
    • mcp__plugin_ruflo-core_ruflo__memory_search
    • mcp__plugin_ruflo-core_ruflo__memory_delete
    • mcp__plugin_ruflo-core_ruflo__neural_train
    • mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OLD_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trader Backtest loads about 1.4k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 485 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__plugin_ruflo-core_ruflo__memory_retriev

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit de590e1, republished under its MIT licence (© ruvnet). 485 words, ~1,371 tokens.

Download SKILL.mdSave it as .claude/skills/trader-backtest/SKILL.md (or your agent's skills folder).
name
trader-backtest
description
Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)
allowed-tools
Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_search, mcp__plugin_ruflo-core_ruflo__memory_delete, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store
argument-hint
<strategy-name> --symbol <TICKER> [--period 2020-2024]

Run a historical backtest using the neural-trader Rust/NAPI engine, then Ed25519-sign the result so the paper→live promotion gate has cryptographic tamper evidence (ADR-126 Phase 4 + CWE-347 pattern).

Steps:

  1. Ensure neural-trader is available: npm ls neural-trader 2>/dev/null || npm install --ignore-scripts neural-trader
  2. Check for saved strategy config: mcp__plugin_ruflo-core_ruflo__memory_retrieve({ key: "strategy-STRATEGY_NAME", namespace: "trading-strategies" }) If not found, list available: mcp__plugin_ruflo-core_ruflo__memory_search({ query: "strategy", namespace: "trading-strategies", limit: 10 })
  3. Run backtest via neural-trader CLI:
    bash
    npx neural-trader --backtest --strategy <name> --symbol <TICKER> --period <range> --walk-forward
    For multi-indicator strategies:
    bash
    npx neural-trader --backtest --strategy multi-indicator --position-sizing kelly --symbol SPY --period 2020-2024
  4. Capture performance metrics from output: total return, annualized return, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit factor, number of trades.
  5. Dedup prior backtests for the same (strategyId, paramsHash) before storing the fresh one (ADR-125 lifecycle / ADR-126 Phase 2 — keep-newest semantics):
    • Search: mcp__plugin_ruflo-core_ruflo__memory_search({ query: "backtest STRATEGY paramsHash:PARAMS_HASH", namespace: "trading-backtests", limit: 10 })
    • For each hit whose key matches backtest-STRATEGY-* AND whose stored paramsHash equals the current run's hash, delete it: mcp__plugin_ruflo-core_ruflo__memory_delete({ key: "OLD_KEY", namespace: "trading-backtests" })
    • (Note: even without this proactive step, the MemoryConsolidator.dedup('keep-newest') background pass introduced in @claude-flow/memory@3.0.0-alpha.18 runs every 6h and will eventually converge. Doing it inline keeps memory_search results deterministic immediately after a re-run.)
  6. Sign the artifact (ADR-126 Phase 4):
    • Build the SignedBacktestArtifact body — { strategyId, paramsHash, dataRange: {from,to}, metrics, runsHash, generatedAt } — where paramsHash = sha256(canonical params JSON), runsHash = sha256(canonical runs array JSON), and generatedAt = new Date().toISOString().
    • Resolve the witness signing key. The skill reads the key path in this order; the FIRST that resolves wins:
      1. RUFLO_WITNESS_KEY_PATH env var — points to a JSON file with { "privateKey": "<hex>" }.
      2. verification/witness-key.json (the ADR-103 default path, if present).
    • If the key resolves: call signBacktestArtifact(body, privateKeyHex) from plugins/ruflo-neural-trader/src/signed-artifact.mjs. The returned value is a SignedBacktestArtifact with schema, witnessPublicKey: "ed25519:<hex>", and witnessSignature: "<hex>" populated.
    • If NEITHER path resolves: log a loud warning — "[WARN] ruflo-neural-trader: no witness signing key found (RUFLO_WITNESS_KEY_PATH unset, verification/witness-key.json missing) — storing backtest artifact in UNSIGNED degraded mode. paper→live promotion will be refused by trader-cloud-backtest until a signed artifact replaces this one." — and store the body unsigned. NEVER silently fall back.
  7. Store the (possibly signed) artifact to the canonical trading-backtests namespace: mcp__plugin_ruflo-core_ruflo__memory_store({ key: "backtest-STRATEGY-TIMESTAMP", value: JSON.stringify(signedArtifact), namespace: "trading-backtests" }) The stored value contains witnessSignature + witnessPublicKey when signed; downstream consumers (trader-cloud-backtest) MUST call verifyBacktestArtifact(artifact, trustedPublicKey) before promoting any artifact to live.
  8. If Sharpe > 1.5, store as successful pattern: mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store({ pattern: "profitable-STRATEGY_TYPE", data: "PARAMS_AND_RESULTS" })
  9. Train SONA on the outcome: mcp__plugin_ruflo-core_ruflo__neural_train({ patternType: "trading-strategy", epochs: 10 })
Show full SKILL.md (98 more words)Show less
Key sourcing & key rotation (ADR-103)
  • The witness key is a 32-byte Ed25519 private key, stored as { "privateKey": "<64-hex-chars>" } in a JSON file referenced by RUFLO_WITNESS_KEY_PATH. Keep it OUT of the repo. For local development, generate one once with node -e "import('@noble/ed25519').then(async ed=>{const sk=crypto.getRandomValues(new Uint8Array(32));console.log(Buffer.from(sk).toString('hex'))})" and write it to ~/.ruflo/witness-key.json.
  • Production deployments pin the corresponding PUBLIC key in project config and supply it as trustedPublicKey to verifyBacktestArtifact(...) — never trust the witnessPublicKey field on the artifact itself (CWE-347 / #1922).
  • Key rotation: re-sign existing backtest entries with the new key OR explicitly mark pre-rotation artifacts as non-promotable. Same pattern as ADR-103.

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/ruflo-neural-trader/skills/trader-backtest of ruvnet/ruflo.

Open the folder on GitHubat commit de590e1

Compare with similar skills

Trader Backtest next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trader Backtest compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trader Backtest this skillruvnet/ruflo74k—~1.4kAutomated safety check: NotesMIT
Tradingview MCPatilaahmettaner/tradingview-mcp4.9k—~1.3kAutomated safety check: PassMIT
Dr Manhattanguzus/dr-manhattan204—~2kAutomated safety check: PassApache-2.0
Agentic Trading DeskOft3r/agentic-trading-desk306—~5.1kAutomated safety check: PassMIT
Okx Cex Marketdex-original/okx-agent-trade-kit1101 repos~2.7kAutomated safety check: PassMIT
Rsigmatimescale/rsigma157—~1.2kAutomated safety check: PassMIT

Similar skills

  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    4.9k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Dr Manhattan

    guzus/dr-manhattan

    Trade prediction markets (Polymarket, Kalshi, Opinion, Limitless, Predict.fun) using a unified CCXT-style API.

    204 GitHub stars~2k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Agentic Trading Desk

    Oft3r/agentic-trading-desk

    Personal trading desk for short-term technical analysis on stocks/ETFs via Robinhood MCP.

    306 GitHub stars~5.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Okx Cex Market

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…

    110 GitHub starsUsed in 1 repo~2.7k tokens
    Business, Finance & HRAuto-check passed
  • Rsigma

    timescale/rsigma

    Use the rsigma CLI and MCP server: engine eval, engine daemon, rule lint, rule draft, rule tune, rule backtest, backend convert, mcp serve.

    157 GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Polymarket Tennis

    livetennisapi/livetennisapi-mcp

    Build observe-only Polymarket and Kalshi tennis market tooling on the polymarket-tennis Python package (MIT) plus the Live Tennis API free tier.

    152 GitHub stars~3k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from ruvnet/ruflo

All 264 skills in this repo
  • Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

    74k GitHub starsUsed in 2 repos~830 tokens
    Auto-check passed
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed

Questions about Trader Backtest

What does Trader Backtest do?

Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4). Trader Backtest is an agent skill from ruvnet/ruflo.

When should I use Trader Backtest?

Trader Backtest fits situations like: tasks that involve Trading and backtesting; tasks that involve Architecture decision records.

How do I install Trader Backtest in Claude Code?

Run `npx skills add ruvnet/ruflo --skill trader-backtest -a claude-code`. Or copy the skill folder (plugins/ruflo-neural-trader/skills/trader-backtest in ruvnet/ruflo) into .claude/skills/trader-backtest in your project. Claude Code loads it when a task matches its description.

How do I install Trader Backtest in Codex?

Run `npx skills add ruvnet/ruflo --skill trader-backtest -a codex`. Or copy the skill folder (plugins/ruflo-neural-trader/skills/trader-backtest in ruvnet/ruflo) into .agents/skills/trader-backtest in your project. Codex loads it when a task matches its description.

Can I use Trader Backtest in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill trader-backtest -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trader-backtest, .gemini/skills/trader-backtest, .github/skills/trader-backtest and .opencode/skills/trader-backtest in your project.

What does Trader Backtest need to run?

Going by SKILL.md and its folder, Trader Backtest needs the command-line tools its instructions call (npx, npm and node) and credentials named OLD_KEY. Our summary lists: Node.js; A credential in OLD_KEY. Its frontmatter pre-approves these tools: Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_search, mcp__plugin_ruflo-core_ruflo__memory_delete, mcp__plugin_ruflo-core_ruflo__neural_train, mcp__plugin_ruflo-core_ruflo__agentdb_pattern-store.

Does Trader Backtest access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Trader Backtest safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Trader Backtest use?

Trader Backtest is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trader Backtest use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trader Backtest?

Skills that share tags, products or a category with Trader Backtest: Tradingview MCP (atilaahmettaner/tradingview-mcp, 4.9k stars), Dr Manhattan (guzus/dr-manhattan, 204 stars), Agentic Trading Desk (Oft3r/agentic-trading-desk, 306 stars) and Okx Cex Market (dex-original/okx-agent-trade-kit, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trader Backtest?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,012 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 7, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.