mcpField
E
edge-hint-extractor

edge-hint-extractor

github.com/tradermonty数据与数据库3.4k3.3k 次安装2 天前更新
代码仓库

关于 edge-hint-extractor

将市场摘要、异常和新闻反应转为结构化边缘提示的技能,供后续概念综合或自动检测使用。支持规则生成,并可选择加入 LLM 生成的想法。

主要功能

  1. 01从观测文件生成 hints.yaml
  2. 02规则式确定性提示生成
  3. 03通过外部 CLI 或 YAML 加入 LLM 想法

适用场景

  1. 01将每日市场观测整理为可复用提示
  2. 02为概念综合准备 hints.yaml

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tradermonty/claude-trading-skills --skill edge-hint-extractor

安装后在 Claude Code 中输入/edge-hint-extractor确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

requirements.txt
agents/
openai.yaml
references/
hints_schema.md
scripts/
build_hints.py
scripts/tests/
conftest.py
test_build_hints.py

详细介绍

边缘提示提取器

概述

将原始观测信号(market_summary、anomalies、news reactions)转换为结构化的边缘提示。 此技能是拆分工作流的第一阶段:observe -> abstract -> design -> pipeline。

使用场景

  • 想要将每日市场观测转化为可复用的提示对象。
  • 想要限制大模型生成的创意,使其符合当前异常和新闻背景。
  • 需要为概念合成或自动检测提供干净的 hints.yaml 输入。

前置条件

  • Python 3.9+
  • PyYAML
  • 可选的检测器运行输入:
    • market_summary.json
    • anomalies.json
    • news_reactions.csv 或 news_reactions.json

输出

  • 包含以下内容的 hints.yaml:
    • hints 列表
    • 生成元数据
    • 规则提示和大模型提示数量

工作流

  1. 收集观测文件(market_summary、anomalies、可选的新闻反应)。
  2. 运行 scripts/build_hints.py 以生成确定性提示。
  3. 可通过以下两种方式之一,使用大模型创意增强提示:
    • a. --llm-ideas-cmd — 将数据通过管道传递给外部大模型 CLI(子进程)。
    • b. --llm-ideas-file PATH — 从 YAML 文件加载预先编写的提示(适用于 Claude Code 工作流,由 Claude 自行生成提示)。
  4. 将 hints.yaml 传入概念合成或自动检测。

注意:--llm-ideas-cmd 和 --llm-ideas-file 不能同时使用。

快速命令

仅使用基于规则的方法(默认输出到 reports/edge_hint_extractor/hints.yaml):

python3 skills/edge-hint-extractor/scripts/build_hints.py \
  --market-summary /tmp/edge-auto/market_summary.json \
  --anomalies /tmp/edge-auto/anomalies.json \
  --news-reactions /tmp/news_reactions.csv \
  --as-of 2026-02-20 \
  --output-dir reports/

规则 + 大模型增强(外部 CLI):

python3 skills/edge-hint-extractor/scripts/build_hints.py \
  --market-summary /tmp/edge-auto/market_summary.json \
  --anomalies /tmp/edge-auto/anomalies.json \
  --llm-ideas-cmd "python3 /path/to/llm_ideas_cli.py" \
  --output-dir reports/

规则 + 大模型增强(预先编写的文件,适用于 Claude Code):

python3 skills/edge-hint-extractor/scripts/build_hints.py \
  --market-summary /tmp/edge-auto/market_summary.json \
  --anomalies /tmp/edge-auto/anomalies.json \
  --llm-ideas-file /tmp/llm_hints.yaml \
  --output-dir reports/

资源

  • skills/edge-hint-extractor/scripts/build_hints.py
  • references/hints_schema.md

评论

支持 Markdown