trader-explain
Что он делает
Этот скилл объясняет торговый сигнал, ранжируя признаки, которые сильнее всего повлияли на прогноз модели. Он нужен тем, кому требуется понятная причина автоматического торгового сигнала.
Когда использовать
- ✓Когда торговый сигнал нужно проверить с понятным ранжированным обоснованием.
- ✓Когда правила требуют, чтобы результат модели можно было объяснить регулятору.
- ✓Когда вы хотите узнать, какие входные данные повлияли на прогноз.
Ссылка на скилл
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-explain/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Объясни, почему модель выдала сигнал 118, и покажи главные признаки, которые за ним стоят.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл получает сигнал, берёт вклад каждого признака из модели и ранжирует главные признаки графовым методом. Результат показывается в виде таблицы, а подписанная запись сохраняется.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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
Частые вопросы
Почему его называют уровнем регулятора?
В заметках скилла сказано, что он даёт интерпретируемый результат, который требуют некоторые правила для торговых систем.
Нужна ли особая библиотека?
Он использует локальный расчёт, входящий в скилл, поэтому работает и без нативного инструмента.
Где сохраняется результат?
Он сохраняется в памяти торгового анализа как подписанная запись атрибуции.
Подробности
Оригинальное описание автора
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
Популярность
- Звёзды на GitHub
- 81k
- Место в рейтинге
- #1669
- Лицензия
- MIT
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
agent-adaptive-coordinator
81kПомогает агенту делить и перераспределять группу ИИ-агентов по мере изменения нагрузки, выбирая схему, подходящую задаче.
agent-agent
81kУчит агента превращать большую цель в упорядоченный план действий и перепланировать его, когда условия меняются.
agent-agentic-payments
81kПомогает агенту управлять мандатами на траты при покупках с ИИ: лимиты расходов, временные окна, правила продавцов и подписанные подтверждения.
agent-analyze-code-quality
81kПомогает агенту проверять качество кода, находить запахи кода, технический долг и идеи для рефакторинга, не меняя файлы.
Похожие скиллы
gitcrawl
394kПозволяет агенту искать в сохраненном архиве задач и запросов на слияние GitHub, объединять дубликаты и проверять их текущий статус на GitHub.
slacrawl
394kПозволяет агенту искать и считать сообщения в локальном архиве Slack, проверять его свежесть и при необходимости обновлять архив.
goplaces
394kПомогает агенту искать места, получать их подробности и отзывы и определять названия мест через Google Places, с выводом в JSON для скриптов.