Skills

Ifind Repilot News Search

通过问句语义化搜索全市场金融资讯(新闻、舆情、市场动态等),返回与问句相关的新闻片段信息。当需要检索金融新闻、市场资讯、行业动态、公司舆情等信息时,使用此 skill。

Install

npx skills add hsliuping/TradingAgents-CN --skill ifind-repilot-news-search -g -a claude-code -y
Category
Engineering
Updated
1mo ago
License
See repository
Context cost
Lightabout 795 tokens
Runs scripts
Yes, review before use

What it does

通过问句语义化搜索全市场金融资讯(新闻、舆情、市场动态等),返回与问句相关的新闻片段信息。当需要检索金融新闻、市场资讯、行业动态、公司舆情等信息时,使用此 skill。

概述

此 skill 通过自然语言问句查询(向量检索)全市场金融资讯。它调用封装好的 Python 脚本,向同花顺数据接口发送请求,返回与问句相关的新闻列表信息。支持按照时间范围查询。

前置要求

环境依赖

  • Python 3.x
  • 标准库:json, urllib, pathlib
  • 无需安装第三方库
  • 注1:若 python3 命令不可用(常见于 Windows),请改用 python
  • 注2:<skill_dir> 为当前 skill 所在目录的完整路径,请根据当前上下文自动获取。

首次配置

首次使用 skill 前,需要先配置认证 token。

  1. 提示用户先从飞研平台获取 token。平台地址: https://repilot.51ifind.com/ ,菜单路径:业务管理 -> Skills技能库。
  2. 用户提供token后,运行以下命令配置 token:
python3 <skill_dir>/scripts/fetch_data.py --set-token <your_auth_token>
  1. 检查 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 数据,包含以下字段:

字段类型说明
totalint检索到的新闻总数
status_codeint状态码,0表示成功
status_msgstring状态信息
dataarray新闻列表

每条新闻包含以下字段:

Read the whole SKILL.md on GitHub

More in Engineering