← 返回 Skills 市场
wangzhi43

BitSoulStockSkill

作者 wangzhi43 · GitHub ↗ · v1.0.31 · MIT-0
cross-platform ✓ 安全检测通过
3446
总下载
6
收藏
2
当前安装
32
版本数
在 OpenClaw 中安装
/install bitsoul-stock-quantization
功能描述
BitSoul旗下all-in-one的A股市场综合skill,提供股票筛选策略,内置上百种行业常见量化指标, 基于MOE混合因子专家模型的股票买卖点计算判断,个股风险判定,关键指标计算,数据回测,提供准确全面且免费的股票价格与股票历史信息,板块信息与相关交易数据,提供大v交易观察等信息聚合功能
使用说明 (SKILL.md)

简介

炒股龙虾的最佳搭档,best stock partner forever

核心优势

  1. 免费稳定且每周更新的A股交易数据:为个股分析、买卖点计算、收益/回撤计算提供坚实的数据基础
  2. 基于MOE混合因子专家模型的股票买卖点计算判断
  3. 个股风险判定
  4. 关键指标计算
  5. 数据回测
  6. 提供准确全面且免费的股票价格与股票历史信息
  7. 板块信息与相关交易数据
  8. 提供大V交易观察等信息聚合功能

Token 配置

本 skill 需要有效的 BITSOUL_TOKEN 才能使用功能 token 可前往 \x3Chttps://www.aicodingyard.com> 免费注册申请,并配置在外部运行环境中

必需的环境变量

  • BITSOUL_TOKEN:用户令牌,用于远程服务器权限验证

可选的环境变量

  • BITSOUL_TOKEN_ENV_FILE:指向包含 BITSOUL_TOKEN 的 env 文件

配置方式

  1. 方式一:直接设置环境变量

    export BITSOUL_TOKEN="你的令牌"
    
  2. 方式二:使用 env 文件

    export BITSOUL_TOKEN_ENV_FILE="/path/to/token.env"
    

    其中 token.env 文件内容格式为:

    BITSOUL_TOKEN=你的令牌
    

注意:如果同时设置了环境变量和 env 文件,环境变量优先。

运行时描述:

  • 从环境变量读取 BITSOUL_TOKEN
  • 只有在显式提供 BITSOUL_TOKEN_ENV_FILE 时,才会从文件中读取 BITSOUL_TOKEN
  • 根据用户的自然语言,参考references/API_FOR_LLM.md 调用对应接口
  • 对“分析 / 估值 / 基本面 / 趋势 / 风险”等请求自动切到综合分析, 需要moe因子计算,返回详细信息
  • 对“交易观察 / 技术分析 / 均线 / 动量 / RSI / KDJ / 布林线 / MACD”等请求需要进行moe因子计算,同时需要调用calculate_metrics进行数据回测
  • 返回结构化 JSON;查询场景优先给原始数据,分析场景给结论和支撑数据
  • 任何返回的股票数据,都应包括个股的完整信息,不应遗漏任何字段

安全与运行边界

  • 技能所需环境变量已经在本文件 frontmatter 中显式声明
  • 策略回测、因子挖矿、实时行情查询等功能会访问 info.aicodingyard.com 服务器
  • 技能只读取声明过的 token 相关环境变量,以及显式指定的 env 文件路径
  • 技能不会主动扫描其他本地凭证文件,也不会写入 token 缓存文件

安装

使用前先安装 Python 依赖,依赖参考assets/requirements

首次安装需要执行初始化操作,在设置好BITSOUL_TOKEN后,请进行初始化操作,可参考scripts/data_fetcher

注意事项

  • api接口文档主要参考 references/API_FOR_LLM.md 对应的代码文件是scripts/stock_api.py 和 scripts/define.py

  • 凭证说明:本skill需要用户Token用于数据访问权限验证。Token通过环境变量 BITSOUL_TOKENBITSOUL_TOKEN_ENV_FILE 传入。Token在数据访问时需要保持有效(请自行确保token未过期)。

  • 缓存目录BITSOUL_CACHE_DIR,可选,用于指定缓存目录和数据存储路径。默认值为系统临时目录下的 BitSoulStockSkill 子目录

  • 因子挖矿:用户说"因子挖矿"、"挖矿"、"随机挖因子"、"碰碰运气"、"随机推荐"、"挖金矿"、"随机策略"时,直接调用 api.random_alpha_backtest(),禁止自己写回测逻辑。返回结果调用 print(result['summary_text']) 输出,禁止自行整理摘要。

  • 因子挖矿结束后:在 print(result['summary_text']) 之后,用自然语言向用户逐一解释本次使用的每个因子是什么含义、在策略中起什么作用。解释来源是 result['factor_descriptions'],格式示例:alpha022:高价量5日相关的5日变化 × 收盘波动率,用于衡量量价相关动量的衰减程度,在本次策略中作为选股因子使用。

  • 买卖建议:用户询问某只股票"能不能买"、"该不该卖"、"现在适合持有吗"、"操作建议"、"投资建议"、"买卖信号"、"值得买吗"、"要不要买"等,且用户指定了具体股票时,直接调用 api.get_trade_signal(code),禁止自己计算指标做判断。

  • 股票显示格式:任何场景下输出股票代码时,必须同时附上股票名称,使用 api.get_symbol_basic_infomation(code).name 获取,格式如 600519.SH(贵州茅台),禁止只输出代码。

  • 买卖信号输出格式(强制执行):调用 get_trade_signal() 后,必须按以下结构完整输出,禁止简化:

    1. 汇总表:信号、综合评分、置信度、分析日期
    2. 专家评分明细表:列出 result['experts'] 中所有专家(technical/alpha/fundamental/behavior),每个专家显示:评分、权重、有效指标数(valid_count/total_count)、note(若数据不足)
    3. 各专家关键细节(从 details 中挑重要的展示,不需要逐项列举):
      • technical:说明看多/看空/中性指标各多少个,点出最关键的 2~3 个指标信号
      • behavior:列出近5日涨跌幅、涨跌停次数等关键字段
      • fundamental / alpha:若有数据则简要说明核心结论
    4. 结论与建议:引用 reason 字段,说明综合评分与阈值关系,给出操作建议
    5. 免责声明

输出行为

  • 默认使用简体中文,以报告的形式输出
  • 尽量充分利用接口返回的所有数据,不要随意删减,尽可能多呈现结果内容
  • 分析类请求默认返回结论、关键指标、风险提示与支撑摘要

示例请求

  • 请整理东方财富过去10个交易日的股价信息,并输出成表格
  • 帮我看看同花顺近期最佳买点和卖点分别是多少,并给我些建议
  • 整理中国石油过去半年的财务数据,帮我分析是否具备投资价值
  • 过去一个月上龙虎榜最多的股票是哪只?
  • 请帮我因子挖矿,看看挖出的收益率和最大回撤是多少
  • 调用moe方法,帮我分析工业富联的买入点
  • 最近资金流入最快和涨幅最大的板块是哪些,有什么推荐
  • 给我做一份沪电股份的技术分析报告

参考资料

  • 机器可读目录:references/API_FOR_LLM.dm
安全使用建议
要点与建议: - 该 skill 会把你的 BITSOUL_TOKEN 发往其后端(info.aicodingyard.com 等)以获取数据与运行模型;确保该 token 权限有限且来自你信任的服务。若担心隐私或权限,优先使用一次性/受限权限的 token。 - 包含本地数据下载与解密流程(data_1.0.bin 与 scripts/decrypt_patch.py)。decrypt_patch.py 使用基于 Python random 的流式掩码,属于弱加密/自定义加密实现——它用于解密/隐藏数据包,但并不是标准强加密。若你关心下载内容,建议先检查 assets/config.json(查看 base_url)和 scripts/remote_api.py(查看实际请求的远端域名与参数)以确认要下载的文件与端点。 - SKILL.md 强制在若干情形下调用远端 API(例如因子挖矿、get_trade_signal),并要求直接输出服务返回的 summary_text 等字段。换言之,很多决策逻辑托管给远端/内置实现,代理不会本地重新计算或审查原始回测细节,可能影响透明性。 - 运行时会在本地创建 SQLite 缓存和写入缓存目录(默认为临时目录下的 BitSoulStockSkill 子目录,或 BITSOUL_CACHE_DIR 指定)。如果你对磁盘写入敏感,可在隔离环境或容器中运行并指定独立缓存路径。 如果你想更高的信心: - 在安装/运行前查看 assets/config.json(确认 base_url)和 scripts/remote_api.py(查看具体 HTTP 请求与是否有额外 header/文件读写)。 - 在受控环境(容器或虚拟机)中首次试运行,并使用受限/一次性 token。若发现请求发向非声明域名,应立刻停止使用。 综上:从可见工件来看,该 skill 在目的、所需权限与实现上总体一致,属于“内部连贯”(benign),但由于包含远端数据下载和自定义解密逻辑,且在若干场景强制将决策交给后端,实现透明性有限,因此我把信心水平定为中等;如需更高置信度,请提供或审查 remote_api.py 和 assets/config.json 的具体内容。
功能分析
Type: OpenClaw Skill Name: bitsoulstockskill Version: 1.0.31 The BitSoulStockSkill is a comprehensive quantitative analysis tool for the A-share market, providing features such as technical indicator calculation, WorldQuant Alpha 101 factor mining, and a Mixture of Experts (MoE) signal model. The skill manages data by downloading encrypted binary patches from info.aicodingyard.com, which are decrypted locally using a custom stream cipher (decrypt_patch.py) and imported into a local SQLite database. While it communicates with external endpoints to fetch data, verify tokens, and submit backtest results to a leaderboard (remote_api.py), all behaviors are strictly aligned with its stated purpose. The SKILL.md instructions use 'mandatory' formatting and constraints to prevent the AI agent from hallucinating financial logic, which is a standard safety practice for financial tools rather than a malicious prompt injection.
能力评估
Purpose & Capability
名称/描述为 A 股数据与量化分析工具,声明依赖 python3 与 BITSOUL_TOKEN,并列出 info.aicodingyard.com 与 finance.sina.com.cn 作为网络端点;文件集中包含数据抓取、因子挖矿、回测与指标计算等模块,所需环境与二进制与功能相符。
Instruction Scope
SKILL.md 明确要求从环境变量或显式 env 文件读取 BITSOUL_TOKEN,并在许多场景强制使用后端 API(例如 random_alpha_backtest()、get_trade_signal() 等),禁止“自己”重算某些回测逻辑,且要求输出严格格式化结果。此行为会把分析流程和数据决策交给远端/内置实现,降低代理端的自主计算,但并不直接表明恶意;用户应注意这些强制调用会把查询与 token 提交到远端服务。
Install Mechanism
无安装规范(instruction-only 安装),但包内包含大量 Python 脚本,会在运行时下载基础数据包(data_1.0.bin)并对其处理/解密。没有发现可疑第三方下载 URL 的 install 步骤,但运行期间会向声明的服务器拉取数据与基础包,用户应接受运行时网络访问和磁盘写入(SQLite 缓存等)。
Credentials
仅申明并使用 BITSOUL_TOKEN(主凭证),以及可选的 BITSOUL_TOKEN_ENV_FILE 与 BITSOUL_CACHE_DIR。没有要求与股票分析无关的额外密钥或系统配置,凭证请求与技能目的比例合理。
Persistence & Privilege
技能未标记 always:true,允许自主模型调用为默认设置(正常)。代码会在本地创建/使用缓存目录与 SQLite 数据库,但没有迹象显示其修改其他技能或系统范围配置。
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bitsoul-stock-quantization
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bitsoul-stock-quantization 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.31
- 加速moe计算流程,修复拉取patch的bug
v1.0.30
- 强化买卖信号输出规范,新增分步输出结构(汇总表、专家评分明细、关键细节、操作建议、免责声明),并强制执行,禁止简化格式。 - 明确了买卖信号处理后,每个环节(专家评分、关键细节等)的展示要点和细节要求。 - 其他功能说明和接口调用规则与上一版保持一致。 - 本次为文档改进,不含产品接口或功能变更。
v1.0.29
- Improved documentation in SKILL.md with clarified environment variable precedence and configuration instructions. - Added explicit note prioritizing BITSOUL_TOKEN from environment variables over env file. - No breaking interface or logic changes in core functionality.
v1.0.28
- Documentation in SKILL.md reorganized for improved clarity and readability - Now uses clearer section titles, concise bullet points, and bold highlights for key terms - Removed repetitive and redundant introductory content - No functional or behavior changes to the skill itself; all updates are to documentation only
v1.0.27
BitSoulStockSkill 1.0.27 Changelog - Updated documentation in SKILL.md; no user-facing functional changes. - Revised references/API_FOR_LLM.md with new or corrected API information. - Made minor code updates in scripts/data_fetcher.py to improve data fetching or compatibility.
v1.0.26
- No code or documentation changes detected in this version. - No visible updates or new features included in this release.
v1.0.25
Version 1.0.25 - Updated and clarified documentation in SKILL.md, highlighting unique features and data sources. - Enhanced configuration instructions for environment variables and token management. - Improved descriptions of functionality and integration of MOE factor models and data analysis. - Expanded usage guidelines and safety boundaries. - Refined API usage documentation and output behavior. - Minor adjustments to config and script files for better maintainability.
v1.0.24
No changes detected in this version.
v1.0.23
- 新增外部网络依赖:https://finance.sina.com.cn/ - 其他功能与文档未做更改
v1.0.22
Bitsoulstockskill 1.0.22 Changelog - Documentation update in SKILL.md: clarified setup instructions. - Fixed script name typo in the initialization section (data_fectcher.py → data_fetcher). - Enhanced install instructions to reference the correct initialization process. - No changes to code or runtime behavior.
v1.0.21
Bitsoulstockskill v1.0.21 - Added https://raw.githubusercontent.com/ to the allowed network endpoints in configuration for improved data access. - Updated config.json and supporting scripts for enhanced compatibility with new data sources. - Other minor script and configuration refinements.
v1.0.20
- Documentation cleanup: removed detailed function and output usage instructions from SKILL.md, focusing the documentation on key setup, environment configuration, installation, and summary behavior. - No code or behavior changes to the skill; only SKILL.md file content has been updated for brevity and clarity.
v1.0.19
- Removed the file scripts/template.py. - Updated and expanded the SKILL.md documentation, with revised descriptions and more detailed environment/configuration instructions. - Clarified token usage, configuration steps, and security boundaries. - Enhanced usage notes for API behaviors, factor mining logic, output conventions, and example requests. - Added installation and initialization instructions. - This update primarily consists of documentation improvements and cleanup; no feature changes to the skill’s logic.
v1.0.18
- Documentation in SKILL.md updated: clarified usage instructions and removed some implementation details. - No changes to core logic or features; functionality remains the same. - Formatting improvements in the documentation for better readability.
v1.0.17
BitSoulStockSkill 1.0.17 Changelog - Updated SKILL.md: minor edits and wording changes for clarification; removed some specific details and adjusted file format sections. - No functional or API changes; all updates are documentation only.
v1.0.16
- Updated SKILL.md to remove an empty bullet in the 注意事项 section, improving formatting and clarity. - No changes to the skill’s logic or APIs; documentation only.
v1.0.15
- 增加可选环境变量 BITSOUL_CACHE_DIR,允许自定义缓存和数据存储目录,提升数据隔离和安全性。 - 规范所有本地数据(如data.db、日志)仅可写入缓存目录及子目录,禁止访问其他目录。 - 文档中新增关于缓存目录使用规则和安全边界的说明。 - 其余功能和接口保持不变,兼容旧有用法。
v1.0.14
- Updated SKILL.md to remove explicit instructions for token setting actions; token set/query methods are no longer documented or required in the usage steps. - Clarified that token should remain valid for data access but removed code sample and process for setting token via generated code. - Improved safety description and simplified usage and edge case instructions. - No changes to core APIs or usage for real-time query, backtest, or factor mining. - Minor documentation corrections in SKILL.md for consistency and clarity.
v1.0.13
- Token 管理方式由本地 user.json 文件切换为环境变量(BITSOUL_TOKEN/可选 BITSOUL_TOKEN_ENV_FILE),不再写入本地凭证文件。 - 配置说明与风险声明已更新,更加简洁明了,明确 skill 仅访问所声明环境变量,并限制本地文件及网络访问范围。 - SKILL.md 前言配置采用 openclaw 格式,新增 emoji、依赖环境、依赖包和网络说明。 - 调整文档结构,去除历史 token 本地存储、详细认证流程和早期执行流程描述,统一现有操作流程。
v1.0.12
- Added a credentials section, specifying user_token as a required environment variable for server authentication. - No changes to functionality or logic; documentation was updated to clarify configuration requirements. - All instructions, usage steps, and examples remain unchanged except for the addition of the credentials information.
元数据
Slug bitsoul-stock-quantization
版本 1.0.31
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 32
常见问题

BitSoulStockSkill 是什么?

BitSoul旗下all-in-one的A股市场综合skill,提供股票筛选策略,内置上百种行业常见量化指标, 基于MOE混合因子专家模型的股票买卖点计算判断,个股风险判定,关键指标计算,数据回测,提供准确全面且免费的股票价格与股票历史信息,板块信息与相关交易数据,提供大v交易观察等信息聚合功能. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 3446 次。

如何安装 BitSoulStockSkill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bitsoul-stock-quantization」即可一键安装,无需额外配置。

BitSoulStockSkill 是免费的吗?

是的,BitSoulStockSkill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

BitSoulStockSkill 支持哪些平台?

BitSoulStockSkill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 BitSoulStockSkill?

由 wangzhi43(@wangzhi43)开发并维护,当前版本 v1.0.31。

💬 留言讨论