stock-watchlist

Query real-time stock prices, basic quote fields, and manage a Markdown watchlist for A-share, Hong Kong, and US stocks. Use when users ask in Chinese or by ticker/code to search stocks, inspect current price and quote basics, or maintain a watchlist stored in a Markdown file.

3,891 stars
Complexity: medium

About this skill

The 'stock-watchlist' skill empowers AI agents to interact with stock market data, offering functionalities for searching, quoting, and persistent watchlist management. It facilitates searching for stocks by their Chinese name, bare code, or market-prefixed symbols, adeptly handling ambiguities by suggesting multiple candidates before quoting. For any queried stock, it retrieves real-time prices and essential metrics like daily change, open/high/low, yesterday's close, market cap, P/E, P/B ratios, and turnover rate. Beyond simple queries, the skill's standout feature is its ability to maintain a personalized stock watchlist within a standard Markdown file. Users can instruct their AI agent to add new holdings with cost and quantity, update existing entries, remove stocks, or synchronize manual edits to ensure consistent data. The skill can then query the entire watchlist, presenting current prices for all tracked stocks and calculating aggregated profit/loss based on specified cost prices and quantities. This approach leverages publicly accessible interfaces for data, ensuring stability for Chinese name search and real-time quotes. This skill is designed for users who desire a streamlined, agent-driven method to monitor their stock investments without relying on complex financial applications. It combines the convenience of AI interaction with the simplicity and portability of a Markdown-based tracking system, making financial information readily accessible and manageable.

Best use case

The primary use case is for individual investors or financial enthusiasts who want to quickly query stock information and maintain a personalized, persistent watchlist directly through their AI agent. It's especially beneficial for those tracking A-share, Hong Kong, and US markets who prefer a simple, Markdown-based approach to portfolio tracking rather than complex trading software.

Query real-time stock prices, basic quote fields, and manage a Markdown watchlist for A-share, Hong Kong, and US stocks. Use when users ask in Chinese or by ticker/code to search stocks, inspect current price and quote basics, or maintain a watchlist stored in a Markdown file.

Users can expect to receive concise real-time stock quotes, search results for ambiguous queries, and a well-formatted Markdown file reflecting their updated or queried stock watchlist.

Practical example

Example input

Can you tell me the current price of '贵州茅台' and '00700'? Also, add 'TSLA' to my watchlist with 10 shares at $180 and show me my updated watchlist.

Example output

贵州茅台 (600519.SH) is currently trading at ¥1700.50, up 1.25%. Tencent (00700.HK) is HK$325.00, down 0.5%. TSLA has been added to your watchlist at 10 shares, cost $180. Your updated watchlist shows a total estimated value of [total value] and a profit/loss of [P/L].

When to use this skill

  • When a user asks for real-time stock prices or basic quote information for specific stocks.
  • When a user wants to add, update, or remove stocks from a personal watchlist.
  • When a user needs to review their watchlist performance and calculated profit/loss.
  • When a user searches for stocks by their Chinese name, ticker, or code and needs disambiguation.

When not to use this skill

  • When a user requires advanced charting, technical analysis, or in-depth fundamental data beyond basic quotes.
  • When a user needs to execute trades or manage a live brokerage account.
  • When a user is looking for market news, economic calendars, or global indices.
  • When the user is interested in markets outside A-share, Hong Kong, or US stocks.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/stock-watchlist/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/0xhyperdan/stock-watchlist/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/stock-watchlist/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How stock-watchlist Compares

Feature / Agentstock-watchlistStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexitymediumN/A

Frequently Asked Questions

What does this skill do?

Query real-time stock prices, basic quote fields, and manage a Markdown watchlist for A-share, Hong Kong, and US stocks. Use when users ask in Chinese or by ticker/code to search stocks, inspect current price and quote basics, or maintain a watchlist stored in a Markdown file.

How difficult is it to install?

The installation complexity is rated as medium. You can find the installation instructions above.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# stock-watchlist

## 概览

这个 Skill 用于处理三类任务:

1. 按中文名、代码或带市场前缀的符号查询股票。
2. 返回实时价格和常用基础字段,例如涨跌幅、开高低、昨收、市值、PE、PB、换手率。
3. 用 Markdown 文档维护自选列表,并按持仓成本和数量汇总盈亏。

当前脚本使用公开可访问的东财搜索与行情接口。这样可以稳定支持“中文名检索 + 实时行情”,避免当前公开雪球搜索接口的风控限制。

## 工作流

### 1. 单只或多只股票查询

优先调用 `scripts/stock_watchlist.py quote ...`。

支持这些输入形态:

1. 中文名,例如 `贵州茅台`、`腾讯`。
2. 裸代码,例如 `600519`、`00700`、`TSLA`。
3. 带前缀代码,例如 `SH600519`、`SZ000001`、`HK00700`。

示例:

```bash
python scripts/stock_watchlist.py quote 贵州茅台 HK00700 TSLA
```

脚本输出 JSON。读取结果后,用中文向用户总结最重要的字段,不要把整段 JSON 原样抄回去,除非用户明确要求。

### 2. 遇到简称或歧义先搜索

对短中文名或明显存在歧义的输入,先调用 `search` 再决定是否直接报价。

典型例子:

1. `腾讯` 可能扩散到 `腾讯控股`、`腾讯音乐`、相关指数或板块。
2. `平安` 可能对应银行、保险、ETF 或指数。

示例:

```bash
python scripts/stock_watchlist.py search 腾讯
```

处理规则:

1. 如果第一候选明显符合用户意图,可以直接继续 `quote`。
2. 如果前几项都合理,先把前 3 个候选简要列给用户,再继续。

### 3. 用 Markdown 管理自选列表

先初始化 Markdown 模板:

```bash
python scripts/stock_watchlist.py watchlist init --file ./watchlist.md
```

模板位于 [assets/watchlist-template.md](assets/watchlist-template.md)。

Markdown 文档必须保留这两个标记:

1. `<!-- stock-watchlist:start -->`
2. `<!-- stock-watchlist:end -->`

脚本只会回写标记之间的表格,其它正文会保留。

### 4. 自选列表维护动作

新增或更新一行:

```bash
python scripts/stock_watchlist.py watchlist add \
  --file ./watchlist.md \
  --query 贵州茅台 \
  --cost-price 1395 \
  --quantity 100 \
  --note core
```

删除一行:

```bash
python scripts/stock_watchlist.py watchlist remove \
  --file ./watchlist.md \
  --query SH600519
```

把手工编辑过的 `query` 统一解析成规范符号:

```bash
python scripts/stock_watchlist.py watchlist sync --file ./watchlist.md
```

查询整个自选列表并计算汇总:

```bash
python scripts/stock_watchlist.py watchlist quote --file ./watchlist.md
```

## Watchlist 约束

表格必须包含这些列:

1. `query`
2. `symbol`
3. `quote_id`
4. `name`
5. `cost_price`
6. `quantity`
7. `note`

字段含义:

1. `query`:原始查询词,适合手工维护,例如中文名或代码。
2. `symbol`:规范代码,例如 `SH600519`、`HK00700`、`TSLA`。
3. `quote_id`:行情接口使用的内部标识,保留后可以减少再次搜索。
4. `cost_price`:可选,留空则不计算该行盈亏。
5. `quantity`:可选,留空则不计算该行盈亏。

建议:

1. 手工改完 `query` 后执行一次 `watchlist sync`。
2. 不要删除表头,也不要删掉标记行。
3. 如果只想保留观察列表,不关心成本,可以只维护 `query/symbol/quote_id/name/note`。

## 安全边界

1. 仅把 watchlist 放在当前工作目录内的 Markdown 文件中,例如 `./watchlist.md`。
2. 不要把 `--file` 指向系统目录、隐藏配置目录或无关文档。
3. 如确实需要在工作目录外使用,先显式设置 `STOCK_WATCHLIST_ALLOWED_ROOTS`,只加入你确认安全的目录。
4. `watchlist init --force` 仅用于覆盖已有的 watchlist 文件,不要把它用于普通 Markdown 文档。

## 输出要求

脚本返回 JSON 后,按场景组织最终回答:

1. 单只股票:优先总结 `name/symbol/current_price/change_percent/open_price/high_price/low_price/previous_close/total_market_cap/pe_ttm/pb`。
2. 多只股票:按股票分组,避免混成一段。
3. 自选列表:先给组合汇总,再列重点持仓。

如果用户明确要“基本信息”,默认至少包含:

1. 当前价
2. 涨跌额
3. 涨跌幅
4. 今开
5. 最高
6. 最低
7. 昨收
8. 总市值
9. PE(TTM)
10. PB

## 资源

1. 主脚本:[scripts/stock_watchlist.py](scripts/stock_watchlist.py)
2. Markdown 模板:[assets/watchlist-template.md](assets/watchlist-template.md)

Related Skills

afrexai-personal-finance

3891
from openclaw/skills

Complete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.

Personal Finance

openclaw-stock-skill

3891
from openclaw/skills

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Data & Research

letterboxd-watchlist

3891
from openclaw/skills

Scrape a public Letterboxd user's watchlist into a CSV/JSONL list of titles and film URLs without logging in. Use when a user asks to export, scrape, or mirror a Letterboxd watchlist, or to build watch-next queues.

Data & Research

us-stock-analyst

3891
from openclaw/skills

Professional US stock analysis with financial data, news, social sentiment, and multi-model AI. Comprehensive reports at $0.02-0.10 per analysis.

Data & Research

jarvis-stock-price - 股票价格查询

3880
from openclaw/skills

**版本**: 1.0.0

Data & Research

jarvis-stock-monitor

3880
from openclaw/skills

全功能智能股票监控预警系统 Pro 版。支持成本百分比、均线金叉死叉、RSI 超买超卖、成交量异动、跳空缺口、动态止盈等 7 大预警规则。基础功能免费,高级功能 SkillPay 付费。

Finance & Trading

SKILL: stock-checker

3891
from openclaw/skills

## Description

akshare-a-stock

3891
from openclaw/skills

A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。

Stock Skill - 股票查询

3891
from openclaw/skills

获取A股、港股、美股的实时行情数据。

stock-query

3891
from openclaw/skills

查询全球主要市场股票实时行情:A 股、港股、美股,以及场内 ETF、场外基金、主要指数。 需要:curl(HTTP 请求)、iconv(GBK→UTF-8 转码)。 Use when: 用户要求查询股价、基金净值、ETF 价格、大盘指数,或需要计算持仓市值时。 NOT for: 加密货币、期货、期权、外汇。

cn-stock-query

3891
from openclaw/skills

查询中国 A 股股票、场内 ETF 及场外基金的实时行情与最新净值。 Use when: 用户要求查询股价、基金净值、ETF 价格,或需要计算持仓市值时。 NOT for: 美股(含中概 ADR)、港股、加密货币、期货、期权。

openclaw-livestock-assistant

3891
from openclaw/skills

AI-powered livestock management assistant for Spanish-speaking farmers. Provides expert advice on herd management, animal health, reproduction, genetics, nutrition, and breed selection for bovine, ovine, caprine, porcine, equine, and poultry. Includes a Node.js REST API for persistent herd record-keeping (animal registration, health records, reproduction events). Use when the user asks about livestock, cattle, ganadería, herd management, animal health, veterinary advice, breeds, reproduction, nutrition, forage, or any livestock-related topic.