iFinD投研-公司公告信息搜索
v1.0.2通过问句语义化搜索A股、基金、港美股相关公告信息(年报、半年报、季报、临时公告、招股说明书等),返回与问句相关的公告片段信息。当需要检索上市公司公告、财务报告、监管公告等信息时,使用此 skill。
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The skill name/description describe semantic search of company announcements and the included Python script implements that: it constructs a query, sends it to a repilot.51ifind.com open API endpoint, and returns JSON results. Required binary is only python3 and no unrelated credentials or binaries are requested.
Instruction Scope
SKILL.md instructs the agent to call the bundled script and to configure an auth token obtained from the repilot platform; this aligns with the purpose. Note: the script supports a --set-url option that lets the stored base_url be changed from the default (repilot.51ifind.com) — if misused this could redirect requests (and the auth token) to another endpoint. The instructions themselves do not require reading unrelated files or environment variables.
Install Mechanism
No install spec; the skill is instruction-only with one Python script. Nothing is downloaded or written by an installer. Execution risk is limited to running the provided script.
Credentials
No environment variables or external credentials are declared, but the script requires an auth_token stored in ~/.config/ifind-repilot/config.json. Requiring a single service token is proportionate to the stated API usage. Minor concerns: the token is stored in plaintext under the user's home directory and the script will send that token in an Authorization header to the configured base_url — ensure the token is not reused for other services and that the base_url is trusted.
Persistence & Privilege
always is false and the skill does not request system-wide changes. It writes only to its own config path under the user's home (~/.config/ifind-repilot/config.json), which is expected for storing the token. The skill does not modify other skills or global agent settings.
Scan Findings in Context
[network_http_request_via_urllib] expected: The script performs HTTP(S) requests (urllib.request.urlopen) to an API to fetch announcement data; this is expected for a remote-search skill.
[writes_config_file_in_home] expected: The script creates/updates ~/.config/ifind-repilot/config.json to store auth_token and base_url. Storing a token locally is expected, but note it is plaintext JSON in the user's home directory.
[configurable_base_url] expected: The script exposes --set-url to change the API base URL. This is useful for testing or private deployments but could be misused to direct tokens/requests to arbitrary endpoints, so only set to trusted URLs.
Assessment
This skill appears to do what it claims: it runs a bundled Python script that queries iFinD/Repilot announcement APIs. Before installing or using it: 1) Only supply a token you obtained from the stated repilot/ifind platform and avoid reusing high-privilege or cross-service tokens. 2) Verify the base_url in ~/.config/ifind-repilot/config.json remains the expected repilot.51ifind.com; do not run --set-url unless you trust the target. 3) Be aware the token is stored in plaintext JSON under your home directory—if you need stronger protection, restrict file permissions or use a different secret storage. 4) Review the script yourself if you have doubts; it performs network calls and will send the stored auth token in the Authorization header. 5) Do not run the script with elevated privileges; run it under your normal user account.Like a lobster shell, security has layers — review code before you run it.
Runtime requirements
📰︎ Clawdis
Binspython3
latest
概述
此 skill 通过自然语言问句查询(向量检索)全市场公司公告信息。它调用封装好的 Python 脚本,向同花顺数据接口发送请求,返回与问句相关的公告列表信息。支持按照时间范围查询。
前置要求
环境依赖
- Python 3.x
- 标准库:
json,urllib,pathlib - 无需安装第三方库
- 注1:若
python3命令不可用(常见于 Windows),请改用python - 注2:
<skill_dir>为当前 skill 所在目录的完整路径,请根据当前上下文自动获取。
首次配置
首次使用 skill 前,需要先配置认证 token。
- 提示用户先从飞研平台获取 token。平台地址: https://repilot.51ifind.com/ ,菜单路径:业务管理 -> Skills技能库。
- 用户提供token后,运行以下命令配置 token:
python3 <skill_dir>/scripts/fetch_data.py --set-token <your_auth_token>
- 检查 token 是否已配置:
python3 <skill_dir>/scripts/fetch_data.py --check-token
注:配置文件位于:~/.config/ifind-repilot/config.json
使用方式
基本查询
python3 <skill_dir>/scripts/fetch_data.py "<查询语句>"
带时间范围查询
python3 <skill_dir>/scripts/fetch_data.py "<查询语句>" --start-date <开始日期> --end-date <结束日期>
日期格式:YYYY-MM-DDTHH:MM:SS,例如 2025-01-01T00:00:00
日期参数可以放在查询语句之前或之后:
# 方式一:日期参数在前
python3 <skill_dir>/scripts/fetch_data.py --start-date 2025-01-01T00:00:00 --end-date 2026-01-01T00:00:00 "同花顺公告"
# 方式二:日期参数在后
python3 <skill_dir>/scripts/fetch_data.py "同花顺公告" --start-date 2025-01-01T00:00:00 --end-date 2026-01-01T00:00:00
查询示例
| 查询内容 | 命令 |
|---|---|
| 同花顺公告 | python3 <skill_dir>/scripts/fetch_data.py "同花顺公告" |
| 贵州茅台临时公告 | python3 <skill_dir>/scripts/fetch_data.py "贵州茅台临时公告" |
| 2025年同花顺公告 | python3 <skill_dir>/scripts/fetch_data.py "同花顺公告" --start-date 2025-01-01T00:00:00 --end-date 2025-12-31T23:59:59 |
返回格式
脚本直接返回查询结果的 JSON 数据,包含以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
total | int | 检索到的公告总数 |
status_code | int | 状态码,0表示成功 |
status_msg | string | 状态信息 |
data | array | 公告列表 |
每条公告包含以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 公告标题 |
summary | string | 公告摘要 |
url | string | 公告原文链接 |
channel | string | 频道类型 |
publish_time | int | 发布时间(Unix时间戳) |
publish_date | string | 发布时间(格式:YYYY-MM-DD HH:MM:SS) |
score | float | 相关性评分 |
stock_infos | array | 关联股票信息列表,每项包含 code 和 name |
extra | object | 扩展信息 |
返回示例:
{
"total": 4,
"status_code": 0,
"data": [
{
"title": "同花顺:关于股票交易异常波动公告",
"summary": "证券代码:300033 证券简称:同花顺 公告编号:2024-029\n浙江核新同花顺网络信息股份有限公司关于股票交易异常波动公告...",
"url": "http://static.cninfo.com.cn/finalpage/2024-09-30/1221332134.PDF",
"channel": "announcement",
"publish_time": 1727625600,
"publish_date": "2024-09-30 00:00:00",
"score": 0.108995356,
"stock_infos": [
{"code": "A00627"},
{"code": "300033", "name": "同花顺"}
],
"extra": {}
}
],
"status_msg": "OK"
}
错误处理
| 错误信息 | 原因 | 解决方法 |
|---|---|---|
请先配置 auth_token | 未设置 token | 提示用户获取并发送token,收到token后,运行 --set-token 配置 |
API HTTP 错误 | 请求失败 | 检查网络或 API 地址 |
网络错误 | 无法连接 | 检查网络连接 |
API 返回失败 | 接口返回错误 | 查看具体错误信息 |
API HTTP 错误: 429 | 触发当日请求限制 | 提醒用户到飞研平台检查用量信息 |
API HTTP 错误: 401 | 缺失token或者token无效 | 提醒用户检查token是否正确 |
API HTTP 错误: 403 | 没有权限访问接口 | 没有权限访问接口 |
执行规则
- 先判断用户请求或任务是否需要公司公告检索。
- 若需要公司公告检索,根据用户请求内容与思考,生成一个合适的自然语言查询语句作为参数调用脚本。
- 若请求返回未检索到数据、或者返回的数据不符合期望,可以尝试生成一个新的自然语言查询语句重新查询。
- 不要编造任何公告信息。若脚本失败或返回空结果,应明确说明失败原因或未检索到数据。
- 将脚本输出中的信息重新组织和提炼;保留公告标题、关联股票和摘要中的重要数据。
- 当出现401、403、429错误时,请勿再重试,直接提醒用户skill返回的错误内容。
Comments
Loading comments...
