# Ifind Repilot News Search

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

- Repository: https://github.com/hsliuping/TradingAgents-CN (32756 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-09-22
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add hsliuping/TradingAgents-CN --skill ifind-repilot-news-search -g -a claude-code -y`
Codex: `npx skills add hsliuping/TradingAgents-CN --skill ifind-repilot-news-search -g -a codex -y`
Cursor: `npx skills add hsliuping/TradingAgents-CN --skill ifind-repilot-news-search -g -a cursor -y`
Gemini CLI: `npx skills add hsliuping/TradingAgents-CN --skill ifind-repilot-news-search -g -a gemini-cli -y`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## 概述

此 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：
```bash
python3 <skill_dir>/scripts/fetch_data.py --set-token <your_auth_token>
```
3. 检查 token 是否已配置：
```bash
python3 <skill_dir>/scripts/fetch_data.py --check-token
```

注：配置文件位于：`~/.config/ifind-repilot/config.json`

## 使用方式

### 基本查询

```bash
python3 <skill_dir>/scripts/fetch_data.py "<自然语言查询语句>"
```

### 带时间范围查询

```bash
python3 <skill_dir>/scripts/fetch_data.py "<自然语言查询语句>" --start-date <开始日期> --end-date <结束日期>
```

日期格式：`YYYY-MM-DDTHH:MM:SS`，例如 `2025-01-01T00:00:00`

日期参数可以放在查询语句之前或之后：

```bash
# 方式一：日期参数在前
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 | 新闻列表 |

每条新闻包含以下字段：

The rest: https://github.com/hsliuping/TradingAgents-CN/blob/HEAD/skills/ifind-repilot-news-search/SKILL.md
