trader-explain
Skill này làm gì
Skill này giải thích một tín hiệu giao dịch bằng cách xếp hạng các đặc trưng ảnh hưởng nhiều nhất đến dự đoán của model. Nó dành cho người cần một lý do rõ ràng đằng sau một tín hiệu giao dịch tự động.
Khi nào nên dùng
- ✓Khi một tín hiệu giao dịch cần một lý do rõ ràng, có thứ tự để xem xét.
- ✓Khi quy định yêu cầu kết quả của model phải giải thích được cho cơ quan quản lý.
- ✓Khi bạn muốn kiểm tra đầu vào nào đã thúc đẩy một dự đoán.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-neural-trader/skills/trader-explain/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy giải thích vì sao model đưa ra tín hiệu 118 và cho tôi xem các đặc trưng hàng đầu đứng sau nó.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill lấy tín hiệu, lấy điểm đóng góp của từng đặc trưng từ model, rồi xếp hạng các đặc trưng hàng đầu bằng một phương pháp dựa trên đồ thị. Nó hiển thị kết quả dưới dạng bảng và lưu một bản ghi quy kết có ký xác nhận.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Vì sao được mô tả là đạt chuẩn cơ quan quản lý?
Ghi chú của skill nói rằng nó nhằm cung cấp đầu ra có thể diễn giải, đáp ứng yêu cầu của một số quy định về hệ thống giao dịch.
Nó có cần thư viện đặc biệt không?
Nó dùng một phép tính cục bộ đi kèm skill, nên vẫn chạy được mà không cần công cụ gốc.
Kết quả được lưu ở đâu?
Nó được lưu vào bộ nhớ trading-analysis dưới dạng bản ghi quy kết có ký.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1669
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.