trader-explain
O que ela faz
Esta skill explica um sinal de trading ranqueando as variáveis que mais influenciaram a previsão do modelo. Ela é para quem precisa de um motivo claro por trás de um sinal automatizado de trading.
Quando usar
- ✓Quando um sinal de trading precisa de um motivo claro e ranqueado para revisão.
- ✓Quando regras exigem que a saída do modelo possa ser explicada a um regulador.
- ✓Quando você quer verificar quais entradas levaram a uma previsão.
Link da skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-explain/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Explique por que o modelo gerou o sinal 118 e mostre as principais variáveis por trás dele.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill busca o sinal, obtém as pontuações de contribuição de cada variável no modelo e ranqueia as principais com um método baseado em grafo. Ela mostra o ranking em uma tabela e salva um registro assinado do resultado.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
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-entryonce that tool is registered in the runtime — until then, the local power-iteration kernel ships insigned-attribution.mjsand produces the same ordering (seeded mulberry32).
Steps:
Retrieve the signal from the canonical
trading-signalsnamespace (ADR-126 Phase 1 + Phase 2 lifecycle):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.Extract per-feature contribution scores from the model:
npx neural-trader --predict --signal "$SIGNAL_ID" --explain --jsonThe expected output shape:
{ 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
--explainis not shipped on the installedneural-traderbuild (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 taggedattribution_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.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 bycontribution_i. When attention co-occurrence data is available, also add edges between feature nodes weighted bycooccur— 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).
- Nodes: one node per feature + one source node
Run single-entry PageRank — preferred path when
mcp__ruflo-sublinear__page-rank-entryis registered: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 (
localSingleEntryPageRankinplugins/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).Build the top-K
AttributionFeature[]viatopKFeatures(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.Sign the artifact (reuses the Phase 4 signing primitives — same Ed25519 + canonicalization):
- Build the
SignedAttributionArtifactbody:{ 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:
RUFLO_WITNESS_KEY_PATHenv var — JSON file with{ "privateKey": "<hex>" }.verification/witness-key.json(the ADR-103 default path).
- If a key resolves: `signAttributionArtifact(
- Build the
Perguntas frequentes
Por que é descrita como de nível regulatório?
As notas da skill dizem que ela busca dar a saída interpretável que algumas regras para sistemas de trading exigem.
Ela precisa de uma biblioteca especial?
Ela usa um cálculo local incluído na skill, então funciona mesmo sem uma ferramenta nativa.
Onde o resultado é salvo?
Ele é salvo na memória de análise de trading como um registro de atribuição assinado.
Detalhes
Descrição original do autor
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)
repo: ruvnet/ruflo
Popularidade
- Estrelas no GitHub
- 81 mil
- Posição no ranking
- #1669
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-adaptive-coordinator
81 milAjuda seu agente a dividir e rebalancear um grupo de agentes de IA conforme a carga de trabalho muda, escolhendo um layout adequado à tarefa.
agent-agent
81 milEnsina seu agente a transformar um grande objetivo em um plano ordenado de ações e a replanejar quando as condições mudarem.
agent-agentic-payments
81 milAjuda seu agente a gerenciar mandatos de gasto para compras com IA, com tetos de valor, janelas de tempo, regras de lojistas e aprovações assinadas.
agent-analyze-code-quality
81 milAjuda seu agente a revisar código quanto à qualidade, encontrando code smells, dívida técnica e ideias de refatoração sem alterar os arquivos.
Skills parecidas
gitcrawl
394 milPermite que seu agente pesquise um arquivo salvo de issues e pull requests do GitHub, agrupe os duplicados e verifique o status atual deles no GitHub.
slacrawl
394 milPermite que seu agente pesquise e conte mensagens em um arquivo local do Slack, verifique quão atualizado ele está e o atualize quando necessário.
goplaces
394 milAjuda seu agente a buscar lugares, obter detalhes e avaliações e identificar nomes de lugares usando o Google Places, com saída em JSON para scripts.