← 返回 Skills 市场
🔌

Datayes 宏观指标

作者 Datayes · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
91
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install datayes-macro
功能描述
查询 Datayes/通联的宏观与行业指标数据。用户询问 GDP、CPI、PPI、PMI、M2、社融、利率、就业、贸易、产量、价格等宏观或行业时间序列时使用。优先通过仓库内 Python 脚本搜索候选指标并拉取明细,不要手写 HTTP 请求。
使用说明 (SKILL.md)

Datayes 宏观指标

前提条件

1. 获取 Datayes Token

访问 https://r.datayes.com/auth/login 登录 Datayes 账号,并在 Datayes 控制台获取可撤销的 API token。

2. 配置 Token

macOS / Linux:

export DATAYES_TOKEN='your-token'

Windows PowerShell:

$env:DATAYES_TOKEN = "your-token"

Windows CMD:

set DATAYES_TOKEN=your-token

直接使用

  • 只用 python3 scripts/datayes_macro.py 发请求。
  • 只用 Python 标准库;不要额外安装依赖。
  • 从环境变量 DATAYES_TOKEN 读取 token。脚本会自动带上 Authorization: Bearer \x3Ctoken>
  • 真实业务接口的 httpUrl 会先校验主机名,只允许 Datayes 受信任域名,避免把 token 发送到非 Datayes 地址。

最小流程

  1. 先搜候选指标。
python3 scripts/datayes_macro.py search "M2同比" --top 5 --json
  1. 结果明确时,直接一步查数据。
python3 scripts/datayes_macro.py query "M2同比" --begin-date 20240101 --limit 12 --json
  1. 需要精确控制时,按 id 查明细。
python3 scripts/datayes_macro.py detail 1070000009 --begin-date 20240101 --limit 12 --json

选择规则

  • 优先名称与用户问题最贴近的指标。
  • 用户没说地区时,优先中国或全国口径。
  • 用户没说频率时,优先月度,其次季度,再次年度。
  • 搜索结果噪声大时,先缩短关键词再重试,例如去掉地区词或 同比/环比 修饰词。

输出要求

  • 明确写出指标名称、频率、单位、来源、最新值和最近若干期数据。
  • 命中多个合理口径时,先列候选再确认,不要混合不同指标。
安全使用建议
This skill appears to do what it says: run the included Python script which uses DATAYES_TOKEN to call Datayes APIs. Before installing, confirm that you are comfortable providing DATAYES_TOKEN to this code and that the token is revocable/limited in scope. Review the allowed host list in scripts/datayes_macro.py — it includes api.wmcloud.com in addition to Datayes domains; if you only want Datayes domains to ever receive the token, ask the author to remove or justify that host. Run the bundled tests locally and use a scoped or revocable token (not a long-lived high-privilege credential). If you share your environment or CI with others, avoid placing the token in a globally persistent env variable.
功能分析
Type: OpenClaw Skill Name: datayes-macro Version: 1.0.0 The skill is a legitimate tool for querying financial macro indicators from Datayes. It includes a security-conscious implementation in `scripts/datayes_macro.py` that validates API endpoints against a hardcoded allowlist of trusted domains (`ALLOWED_HTTP_HOSTS`) before transmitting the sensitive `DATAYES_TOKEN`. The code uses only the Python standard library and lacks any indicators of malicious intent, such as data exfiltration to unauthorized endpoints or arbitrary command execution.
能力评估
Purpose & Capability
Name/description match the code and runtime requirements: the skill is a Datayes macro-indicator fetcher, requires only python3 and DATAYES_TOKEN, and its code calls Datayes API endpoints. There are no unrelated credentials, binaries, or config paths requested.
Instruction Scope
SKILL.md instructs running the bundled Python script and to read DATAYES_TOKEN from the environment (matches the code). One minor inconsistency: the docs state that only Datayes trusted domains are allowed, but the code's ALLOWED_HTTP_HOSTS also includes api.wmcloud.com (a non-datayes domain). This may be intentional (a data source/datayes partner), but you should confirm whether that host is acceptable for your token to be sent to.
Install Mechanism
No install spec; this is instruction-plus-scripts only. The code is run directly with python3 and nothing is downloaded or written by an installer.
Credentials
The skill requires a single environment variable (DATAYES_TOKEN) which is appropriate for calling Datayes APIs. The script reads only DATAYES_TOKEN for authorization and does not request other secrets.
Persistence & Privilege
always is false, the skill is user-invocable, and it doesn't request persistent system-wide configuration or modify other skills. It does not require elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install datayes-macro
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /datayes-macro 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Macro & industry data skill, replaces previous stock-oriented version - Supports querying macroeconomic and industry indicators (e.g., GDP, CPI, M2, PMI) via Python scripts. - New script datayes_macro.py for searching and retrieving indicator details and time series. - Usage focused on Datayes macro API: search, query, and detail commands. - Stock-specific scripts and documentation removed; only macro-related functionality retained. - Updated documentation to reflect new command examples, selection, and output requirements.
元数据
Slug datayes-macro
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Datayes 宏观指标 是什么?

查询 Datayes/通联的宏观与行业指标数据。用户询问 GDP、CPI、PPI、PMI、M2、社融、利率、就业、贸易、产量、价格等宏观或行业时间序列时使用。优先通过仓库内 Python 脚本搜索候选指标并拉取明细,不要手写 HTTP 请求。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 91 次。

如何安装 Datayes 宏观指标?

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

Datayes 宏观指标 是免费的吗?

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

Datayes 宏观指标 支持哪些平台?

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

谁开发了 Datayes 宏观指标?

由 Datayes(@datayes)开发并维护,当前版本 v1.0.0。

💬 留言讨论