shinelp100

Astock Top Gainers

Data Analysisv1.2.2
By shinelp100Updated 2026-05-116 versions · latest released 2026-03-21astock-top-gainers@clawhub_shinelp100/astock-top-gainers
Data Insights#股票

According to AlphaMoat, as of 2026-09, Astock Top Gainers has 1,422 downloads and 0 stars — ranked #4,819 of 5,078 AI skills overall, and #382 of 399 in Data Analysis.

Installs
173
Downloads
1.4K
Stars
-
Overall Rank
#4,819
Top 95% overall · Top 96% in Data Analysis
PlatformInstallsDownloadsStarsComments
ClawHub ↗21933--
SkillHub ↗1731.4K-—

Platforms count differently and update at different times.

What this skill does

The documentation describes querying gain rankings from iWenCai and excluding ST stocks in a formatted table. Market data changes over time, and rankings depend on query conditions, source, and filters; this is not investment advice and should not trigger trades. The source instructs JavaScript navigation around blocked browser controls; use only reviewed, approved access, preferably an approved market-data API or policy-compliant browser route. Data may be delayed, incomplete, or fail when the page changes.

Profile published 2026-10-27

What you can do with it

  • Organize gain rankings for a user-specified period
  • Label filters, source, and query time
  • Compare rankings across observation windows

When to use it

  • When reviewing public market rankings
  • When data time, filtering, and source are confirmed and used only for information

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Summarize this market query with query time and ST exclusion rules; do not offer buy or sell advice.

Monthly Trend

Downloads1.4K
1518341.5K2026-03 · Downloads 2452026-05 · Downloads 6222026-06 · Downloads 7082026-07 · Downloads 8592026-08 · Downloads 1.1K2026-09 · Downloads 1.4K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-091.4K—-
2026-081.1K+31.4%-
2026-07859+21.3%-
2026-06708+13.8%-
2026-05622—-
2026-03245—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

7.0 KB · ClawHub v1.2.2
---
name: astock-top-gainers
description: 获取 A 股近 N 日涨幅排名前 N 只股票(排除 ST 股),输出格式化表格。当用户询问"近 N 日涨幅排行"、"A 股涨幅排名"、"涨幅最大的股票"、"哪些股票涨得最多"、"最近涨得好的股票"时使用此技能。数据来源为同花顺问财。
---

# A 股涨幅排行 Skill

## 功能

获取 A 股市场近 N 日涨幅排名前列的股票数据,**完全排除 ST 股票**,输出格式化表格。
Show all (196 lines)

## 使用场景

用户询问以下类型问题时触发:
- "近 N 日涨幅排行"(N 可为 3、5、10、20、30 等)
- "A 股涨幅排名"
- "涨幅最大的股票"
- "哪些股票涨得最多"
- "最近涨得好的股票"
- "近一周/一月涨幅排行"

## 工作流程

### 步骤 1:解析用户需求

从用户问题中提取参数:
- **N(天数)**:默认 10 日,用户可指定
- **数量**:默认展示前 20 只,用户可指定

**重要:** 用户要求的数量是指**最终输出的非 ST 股票数量**,因此需要从页面获取更多数据(约 1.5-2 倍),以确保过滤 ST 后仍能满足用户要求的数量。

### 步骤 2:访问数据源

由于 SSRF 策略限制,需要使用以下方法访问同花顺问财:

**方法一(推荐):通过 JavaScript 导航**
1. 使用 `browser` 工具的 `start` action 启动浏览器
2. 使用 `tabs` action 获取空白标签页的 targetId
3. 使用 `act` + `evaluate` 通过 JavaScript 导航:
   ```javascript
   window.location.href = 'https://www.iwencai.com/unifiedwap/result?w=近{N}日涨幅排名&querytype=stock';
   ```
4. 等待页面加载后使用 `snapshot` 获取数据

**目标 URL 格式:**
```
https://www.iwencai.com/unifiedwap/result?w=近{N}日涨幅排名&querytype=stock
```

例如:
- 近 10 日涨幅:`https://www.iwencai.com/unifiedwap/result?w=近10日涨幅排名&querytype=stock`
- 近 5 日涨幅:`https://www.iwencai.com/unifiedwap/result?w=近5日涨幅排名&querytype=stock`
- 近 20 日涨幅:`https://www.iwencai.com/unifiedwap/result?w=近20日涨幅排名&querytype=stock`

### 步骤 3:获取页面数据

使用 `browser` 工具的 `snapshot` action 获取页面内容。

**页面数据结构:**
页面返回的表格包含以下列:
- 排名(序号)
- 股票代码
- 股票名称
- 现价(元)
- 当日涨跌幅(%)
- 区间涨跌幅排名(如 1/850)
- 区间涨跌幅(%)

### 步骤 4:解析并过滤数据(核心步骤)

从页面快照中提取股票数据,**必须完全排除所有 ST 股票**:

#### ST 股票识别规则(需完全过滤)

股票名称包含以下任一关键词的,**必须排除**:

| 关键词 | 说明 |
|:---:|:---|
| `ST` | 特别处理股票(如 ST京蓝) |
| `*ST` | 退市风险警示股票(如 *ST景峰) |
| `S*ST` | 未完成股改的退市风险警示股票 |
| `SST` | 未完成股改的特别处理股票 |

#### 过滤逻辑

```
1. 从页面获取前 N*2 条数据(确保足够数据用于过滤)
2. 遍历每条数据,检查股票名称
3. 如果名称包含 "ST" 或 "*ST",跳过该条记录
4. 保留非 ST 股票,直到达到用户要求的数量
5. 输出时重新编号排名(1, 2, 3...)
```

#### 代码示例(逻辑参考)

```python
# 伪代码示例
def filter_st_stocks(stocks, required_count):
    result = []
    for stock in stocks:
        name = stock['name']
        # 检查是否为 ST 股票
        if 'ST' in name or '*ST' in name:
            continue  # 跳过 ST 股票
        result.append(stock)
        if len(result) >= required_count:
            break
    return result
```

### 步骤 5:格式化输出

按照标准格式输出结果,**输出数量 = 实际展示的非 ST 股票数量**。

## 输出格式

```markdown
## 📈 A 股近 N 日涨幅排名(前 X 只,已排除 ST 股)

**统计区间:YYYY.MM.DD - YYYY.MM.DD**

| 排名 | 代码 | 名称 | 现价(元) | 当日涨跌(%) | 区间涨幅排名 | 区间涨幅(%) |
|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | 920028 | 新恒泰 | 22.70 | +141.49 | 1/1128 | +141.49 |
| 2 | 000890 | 法尔胜 | 13.13 | -6.21 | 2/1128 | +139.60 |
| ... | ... | ... | ... | ... | ... | ... |

---

**数据来源:** 同花顺问财 (iwencai.com)  
**查询时间:** YYYY-MM-DD HH:MM GMT+8  
**总选出:** XXX 只股票(近N日涨跌幅大于0)

> ⚠️ **风险提示:** ST 股票已从排名中完全排除。部分股票当日涨幅异常,请谨慎关注。
```

## 示例对话

**用户**: 近 20 日涨幅排行前 20

**AI 执行步骤:**
1. 解析参数:N=20,数量=20
2. 启动浏览器:`browser action=start`
3. 获取标签页:`browser action=tabs` → 获取 targetId
4. JavaScript 导航:`browser action=act kind=evaluate fn="() => { window.location.href = 'https://www.iwencai.com/unifiedwap/result?w=近20日涨幅排名&querytype=stock'; }"`
5. 获取快照:`browser action=snapshot`
6. 解析数据:提取表格(获取约 40-50 条以备过滤)
7. **过滤 ST 股票**:排除名称含 ST、*ST 的股票
8. 重新编号排名,保留前 20 只非 ST 股票
9. 输出格式化结果

## 注意事项

### 必须遵守

1. **ST 股票完全排除**:这是必须步骤,ST 股票风险较高,**绝对不能**出现在最终结果中
2. **输出数量准确**:如果用户要求前 20 只,输出必须正好是 20 只非 ST 股票
3. **排名重新编号**:过滤 ST 后,排名需要重新从 1 开始编号
4. **区间涨幅排名保留原值**:如 "1/1128" 保持不变,这是原始排名

### 其他注意

5. **SSRF 策略**:直接使用 `browser action=open/navigate` 会被 SSRF 策略阻止,必须使用 JavaScript evaluate 方式导航
6. **页面加载**:确保页面完全加载后再获取 snapshot
7. **数据时效**:数据为实时/准实时数据,取决于同花顺问财的更新频率
8. **区间统计**:页面会显示具体统计区间(如 2026.02.13-2026.03.20),需要在输出中注明
9. **异常涨幅**:当日涨幅异常的股票(如 +100% 以上)应在风险提示中提醒

## 数据字段说明

| 字段 | 说明 |
|:---:|:---|
| 排名 | 过滤 ST 后重新编号的排名 |
| 代码 | 6 位股票代码(北交所为 6 位数字) |
| 名称 | 股票简称(不含 ST 股票) |
| 现价 | 当前股价(元) |
| 当日涨跌 | 今日涨跌幅(%) |
| 区间涨幅排名 | 原始排名(如 "1/1128",不重新编号) |
| 区间涨幅 | N 日累计涨跌幅(%) |

## 错误处理

如果遇到以下情况:
- **浏览器启动失败**:提示用户检查浏览器是否可用
- **页面加载超时**:重试或提示用户稍后再试
- **数据解析失败**:检查页面结构是否变化,或使用 screenshot 辅助分析
- **ST 股票过多导致数量不足**:说明情况,获取更多数据进行过滤

## 更新日志

### v1.2.0 (2026-03-21)
- 明确 ST 股票完全排除规则
- 输出数量以非 ST 股票为准
- 过滤后排名重新编号
- 增加获取更多数据以备过滤的说明

Popular in Data Analysis

AdMapixData Analysis

The data layer for AdMapix: turn ad and app queries into API calls that return raw JSON only.

↓ 365.6K★ 304fly0pants
Tavily SearchData Analysis

Searches the public web through Tavily and returns structured results with links and snippets.

↓ 121.9K★ 286Xiaoran Li
Data AnalysisData Analysis

A data-analysis skill that turns databases, spreadsheets, and raw exports into decision-ready conclusions.

↓ 101.2K★ 244Iván
Stock AnalysisData Analysis

A skill that analyzes stocks and cryptocurrencies on Yahoo Finance data and tracks a portfolio.

↓ 75.3K★ 299udiedrichsen
Stock WatcherData Analysis

Manages a local stock watchlist and summarizes recent quotes for its codes from the Tonghuashun stock pages.

↓ 64.8K★ 122Robin797860
全国招标中标查询及分析【知了标讯】Data Analysis

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、商机预测、推荐潜在投标供应商、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手等关键词,都应使用本SKILL。

↓ 56.5K★ 13user_98035bfb
BlogwatcherData Analysis

Track blog and RSS/Atom feed updates from the command line.

↓ 54.0K★ 75Peter Steinberger
Model UsageData Analysis

Summarises per-model usage cost for Codex or Claude.

↓ 49.5K★ 114Peter Steinberger

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.