Agent skill

Trader Explain

by ruvnet in ruvnet/ruflo

Regulator-grade feature attribution for any LSTM/Transformer signal — single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR)

MITAuto-check: notesDevelopment

Install Trader Explain

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

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

GitHub CLI
$ gh skill install ruvnet/ruflo trader-explain --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-explain .claude/skills/trader-explain && 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-explain
GitHub stars
74k
Token cost
~2k tokens
SKILL.md length
688 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Regulator-grade feature attribution for any LSTM/Transformer signal — single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR)

  • Works in 8 steps: Retrieve the signal from the canonical… → Extract per-feature contribution scores… → Build the feature-contribution graph → …
  • Tasks that involve Architecture decision records
  • Calls npx

What it does

Trader Explain is an agent skill from ruvnet/ruflo. Regulator-grade feature attribution for any LSTM/Transformer signal — single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR)

Its SKILL.md is about 2k 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 Development, covering Architecture decision records. 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 Architecture decision records

Example prompts

  • “/trader-explain”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__ruflo-sublinear__page-rank-entry

Workflow steps

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

  1. Retrieve the signal from the canonical trading-signals namespace (ADR-126 Phase 1 + Phase 2 lifecycle)
  2. Extract per-feature contribution scores from the model
  3. Build the feature-contribution graph
  4. Run single-entry PageRank — preferred path when mcpruflo-sublinearpage-rank-entry is registered
  5. Build the top-K AttributionFeature[] via topKFeatures(graph, scores, k=10, excludeIndex=0) — excludes the source node from the ranked…
  6. Sign the artifact (reuses the Phase 4 signing primitives — same Ed25519 + canonicalization)
  7. Store the (possibly signed) artifact to the canonical trading-analysis namespace (ADR-126 Phase 1)
  8. Return the markdown summary to the agent. Suggested format

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_retrieve
    • mcp__plugin_ruflo-core_ruflo__memory_store
    • mcp__ruflo-sublinear__page-rank-entry

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npx, 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 no API keys, tokens, secrets or passwords.

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

Context cost

Trader Explain loads about 2k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 688 words of instructions outside code blocks.

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

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_retrieve, mcp__plugin_ruflo-core_ruflo__memory_stor

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). 688 words, ~2,009 tokens.

Download SKILL.mdSave it as .claude/skills/trader-explain/SKILL.md (or your agent's skills folder).
name
trader-explain
description
Regulator-grade feature attribution for any LSTM/Transformer signal — single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR)
allowed-tools
Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__ruflo-sublinear__page-rank-entry
argument-hint
<signalId> [--top-k 10] [--seed 42]

Explain a trading signal by building a feature-contribution graph and running single-entry forward-push PageRank from the signal output node. Top-K ranked features are returned as a markdown table AND persisted to trading-analysis as a SignedAttributionArtifact (ADR-126 Phase 6).

Why this skill matters:

  • EU AI Act + SEC Reg-AI guidance require interpretable model output for any algorithmic trading system that touches retail capital. This is the regulator-grade attribution path the rest of the substrate has been waiting for.
  • The same call site picks up the full native-WASM PageRank from mcp__ruflo-sublinear__page-rank-entry once that tool is registered in the runtime — until then, the local power-iteration kernel ships in signed-attribution.mjs and produces the same ordering (seeded mulberry32).

Steps:

  1. Retrieve the signal from the canonical trading-signals namespace (ADR-126 Phase 1 + Phase 2 lifecycle):

    text
    mcp__plugin_ruflo-core_ruflo__memory_retrieve({
      key: "SIGNAL_ID",
      namespace: "trading-signals"
    })

    The signal entry includes modelId, prediction, and the feature vector at the time of inference.

  2. Extract per-feature contribution scores from the model:

    bash
    npx neural-trader --predict --signal "$SIGNAL_ID" --explain --json

    The expected output shape:

    ts
    {
      features: Array<{ name: string; contribution: number }>;
      // for Transformers, also includes per-head attention co-occurrence:
      attention?: Array<{ head: string; cooccur: Array<[number, number, number]> }>;
    }

    Fallback path — if --explain is not shipped on the installed neural-trader build (older versions; the flag was scoped for a follow-up upstream PR), the skill degrades to a deterministic feature-importance heuristic over the signal's input vector: contribution_i = |input_i - μ_i| / σ_i (z-score magnitude). This is a known proxy — not as faithful as attention/SHAP — and the resulting artifact is tagged attribution_method: "input-zscore-fallback" so downstream consumers can filter it out for regulator filings. Document the fallback path in the resulting markdown summary so the agent surfaces it to the user.

  3. Build the feature-contribution graph:

    • Nodes: one node per feature + one source node __signal_output__ for the prediction.
    • Edges: outgoing edges from __signal_output__ to each feature node, weighted by contribution_i. When attention co-occurrence data is available, also add edges between feature nodes weighted by cooccur — this is what makes the PageRank single-entry rather than degenerating to plain top-K.
    • Source: __signal_output__ (index 0 by convention so the smoke can assert reproducibility).
  4. Run single-entry PageRank — preferred path when mcp__ruflo-sublinear__page-rank-entry is registered:

    text
    mcp__ruflo-sublinear__page-rank-entry({
      nodes: GRAPH_NODES,
      edges: GRAPH_EDGES,
      sourceIndex: 0,
      damping: 0.85,
      maxIterations: 100,
      tolerance: 1e-8,
      seed: 42
    })

    The local fallback (localSingleEntryPageRank in plugins/ruflo-neural-trader/src/signed-attribution.mjs) runs ~30 LOC of seeded power-iteration when the MCP tool is not available — same math, same result up to floating-point tolerance, same ordering for the same seed (the Phase 6 smoke asserts this).

  5. Build the top-K AttributionFeature[] via topKFeatures(graph, scores, k=10, excludeIndex=0) — excludes the source node from the ranked output. Ties broken by node index (lower index wins) so the ranking is deterministic.

  6. Sign the artifact (reuses the Phase 4 signing primitives — same Ed25519 + canonicalization):

    • Build the SignedAttributionArtifact body:
      ts
      {
        signalId: SIGNAL_ID,
        modelId: SIGNAL.modelId,
        features: TOP_K_FEATURES,             // from step 5
        graphMetadata: {
          nodeCount: GRAPH.nodes.length,
          edgeCount: COUNT_EDGES,
          pageRankIterations: PR_RESULT.iterations,
          seed: SEED                          // load-bearing for reproducibility
        },
        generatedAt: NEW_DATE_ISO
      }
    • Resolve the witness signing key — same lookup order as Phase 4:
      1. RUFLO_WITNESS_KEY_PATH env var — JSON file with { "privateKey": "<hex>" }.
      2. verification/witness-key.json (the ADR-103 default path).
    • If a key resolves: signAttributionArtifact(body, privateKeyHex) from plugins/ruflo-neural-trader/src/signed-attribution.mjs.
    • If NEITHER path resolves: log "[WARN] ruflo-neural-trader: no witness signing key found — storing attribution artifact in UNSIGNED degraded mode. Regulator filings will reject UNSIGNED artifacts." and store the body unsigned. NEVER silently fall back.
  7. Store the (possibly signed) artifact to the canonical trading-analysis namespace (ADR-126 Phase 1):

    text
    mcp__plugin_ruflo-core_ruflo__memory_store({
      key: "attribution-SIGNAL_ID-TIMESTAMP",
      namespace: "trading-analysis",
      value: JSON.stringify(signedArtifact)
    })

    The trading-analysis namespace is the canonical home for model-analysis output (regime classifications, technical-indicator summaries, model-training results — and now attribution rankings). Long-lived — no TTL — because the audit trail is the deliverable.

  8. Return the markdown summary to the agent. Suggested format:

    ## Feature attribution for signal `SIGNAL_ID` (model: MODEL_ID)
    
    | Rank | Feature | Score |
    |------|---------|-------|
    | 1    | NAME    | 0.42  |
    | 2    | NAME    | 0.18  |
    | …    | …       | …     |
    
    - PageRank iterations: N
    - Graph: nodeCount nodes, edgeCount edges
    - Seed: 42 (reproducible — same seed → same ordering)
    - Path: mcp | local
    - Signature: ed25519:abcd… (or UNSIGNED — degraded warning above)
Show full SKILL.md (134 more words)Show less
Verification

Downstream consumers verify the artifact before any regulator-facing report or paper→live promotion:

ts
import { verifyAttributionArtifact } from 'plugins/ruflo-neural-trader/src/signed-attribution.mjs';

const ok = await verifyAttributionArtifact(artifact, trustedPublicKey);
if (!ok) {
  // [ERROR] attribution verification failed — refuse to publish.
  // Pin to trustedPublicKey from project config; do NOT trust the
  // artifact.witnessPublicKey field (CWE-347 / #1922 — attacker-controllable).
  return;
}

Acceptance criteria (ADR-126 Phase 6):

  • trader-explain <signalId> returns a ranked feature list whose top-3 features overlap the model's attention argmax (when --explain available; documented tolerance).
  • Reproducibility: two runs with the same signalId + same --seed produce byte-identical rank ordering (asserted by scripts/smoke-neural-trader-feature-attribution.mjs).
  • Signed artifact verifies under the trusted pubkey; tampering any feature score or graphMetadata.seed invalidates the signature.
  • Fallback paths engage cleanly: when MCP unavailable, local kernel runs; when --explain flag missing, z-score heuristic runs and the artifact is tagged.

Refs:

  • ADR-126 Phase 6 (this skill's authoring ADR)
  • ADR-126 Phase 4 (the signing scheme this reuses)
  • ADR-123 (single-entry PageRank substrate; the same family that Phase 3 leverages for portfolio CG)
  • plugins/ruflo-neural-trader/src/signed-attribution.ts (the typed contract)
  • plugins/ruflo-neural-trader/src/signed-attribution.mjs (the runtime mirror)
  • scripts/smoke-neural-trader-feature-attribution.mjs (the regression smoke)

© 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-explain of ruvnet/ruflo.

Open the folder on GitHubat commit de590e1

Compare with similar skills

Trader Explain 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 Explain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trader Explain this skillruvnet/ruflo74k—~2kAutomated safety check: NotesMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
Cto AdvisorIbrahim-3d/orchestrator-supaconductor3804 repos~2.4kAutomated safety check: PassMIT
Improve Codebase Architectureywwynm/EverythingDone14415 repos~1.3kAutomated safety check: PassGPL-3.0
Domain Modelingbrim-borium/spotify_sdk1665 repos~806Automated safety check: PassApache-2.0
Design Doc MermaidSpillwaveSolutions/design-doc-mermaid1751 repos~5.6kAutomated safety check: PassNone

Similar skills

  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Cto Advisor

    Ibrahim-3d/orchestrator-supaconductor

    Technical leadership guidance for engineering teams, architecture decisions, and technology strategy.

    380 GitHub starsUsed in 4 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Improve Codebase Architecture

    ywwynm/EverythingDone

    Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/.

    144 GitHub starsUsed in 15 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Domain Modeling

    brim-borium/spotify_sdk

    Build and sharpen a project's domain model. An agent skill from brim-borium/spotify_sdk.

    166 GitHub starsUsed in 5 repos~806 tokens
    DevelopmentAuto-check passed
  • Design Doc Mermaid

    SpillwaveSolutions/design-doc-mermaid

    Create Mermaid diagrams (flowchart, sequence, class, ER, state, C4, architecture) from text or source code.

    175 GitHub starsUsed in 1 repo~5.6k tokens
    DevelopmentAuto-check passed
  • Learning Opportunities

    DrCatHicks/learning-opportunities

    Facilitates deliberate skill development during AI-assisted coding.

    2.5k GitHub stars~2.5k tokensUpdated 1 mo ago
    DevelopmentAuto-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

Categories

Questions about Trader Explain

What does Trader Explain do?

Regulator-grade feature attribution for any LSTM/Transformer signal — single-entry PageRank ranks the top-K features that drove the prediction (ADR-126 Phase 6, ADR-123 single-entry PR). Trader Explain is an agent skill from ruvnet/ruflo.

When should I use Trader Explain?

Trader Explain fits situations like: tasks that involve Architecture decision records.

How do I install Trader Explain in Claude Code?

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

How do I install Trader Explain in Codex?

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

Can I use Trader Explain 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-explain -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-explain, .gemini/skills/trader-explain, .github/skills/trader-explain and .opencode/skills/trader-explain in your project.

What does Trader Explain need to run?

Going by SKILL.md and its folder, Trader Explain needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash, Read, mcp__plugin_ruflo-core_ruflo__memory_retrieve, mcp__plugin_ruflo-core_ruflo__memory_store, mcp__ruflo-sublinear__page-rank-entry.

Does Trader Explain access the network?

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

Is Trader Explain 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 Explain use?

Trader Explain 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 Explain use?

About 2k tokens (SKILL.md is roughly 8k 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 Explain?

Skills that share tags, products or a category with Trader Explain: PR Design Doc (OpenHands/OpenHands, 90k stars), Cto Advisor (Ibrahim-3d/orchestrator-supaconductor, 380 stars), Improve Codebase Architecture (ywwynm/EverythingDone, 144 stars) and Domain Modeling (brim-borium/spotify_sdk, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trader Explain?

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.