A Share Pro logo

A Share Pro

Community
lxyeternal
a-share-pro

A 股专业监控工具 - 轻量级自选股管理 + 多数据源实时行情。支持腾讯财经/雪球/百度/Tushare 自动切换,纯文本存储,无需数据库依赖。用于日常股票跟踪、自选股管理和投资组合监控。

Overview

Publisherlxyeternal
RepositoryMalSkillBench
Skill namea-share-pro
Stars
64
Forks
14
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lxyeternal on GitHub. Read the source before you install it.

Installation

Install the A Share Pro AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lxyeternal/MalSkillBench/tree/main/Dataset/Skills/benign/a-share-pro
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lxyeternal/MalSkillBench.git /tmp/MalSkillBench
mkdir -p .claude/skills
cp -r /tmp/MalSkillBench/Dataset/Skills/benign/a-share-pro .claude/skills/a-share-pro
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable A Share Pro in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads A Share Pro on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so A Share Pro is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

A-Share Pro - A 股投资监控终极版

🎯 核心特性

特性说明
✅ 轻量级纯文本存储,无需数据库
✅ 多数据源腾讯/雪球/百度/Tushare 自动切换
✅ 持久化自选股/交易记录本地保存
✅ 易维护统一配置 + 模块化脚本
✅ 无 Token 依赖主要使用免费数据源

🚀 快速开始

1️⃣ 安装

bash
cd ~/.openclaw/workspace/skills/a-share-pro/scripts
chmod +x install.sh
./install.sh

会自动完成:

  • ✅ 创建 ~/.openclaw/a_share/ 数据目录
  • ✅ 安装 Python 依赖(requests, beautifulsoup4)
  • ✅ 测试基本功能

2️⃣ 添加股票

bash
# 方式一:只输入代码(名称默认"未知")
python3 add_stock.py 600919

# 方式二:指定股票名称
python3 add_stock.py 600919 江苏银行

3️⃣ 查看自选股列表

bash
python3 list_stocks.py

输出示例:

📋 你的自选股:
==================================================
序号   代码         名称
--------------------------------------------------
1      600919       江苏银行
2      600926       杭州银行
3      159681       创业板 ETF
==================================================
共计 3 只股票

4️⃣ 获取行情汇总

bash
python3 summarize_performance.py

输出示例:

======================================================================
💼 A-Share Pro - 自选股实时行情
======================================================================
✅ 600919 - 江苏银行
   💰 ¥10.59  +0.10  (+0.95% ) [🐧 腾讯财经]
✅ 600926 - 杭州银行
   💰 ¥16.57  +0.08  (+0.49% ) [🐧 腾讯财经]
...

======================================================================
📊 持仓概览:3 只 | 上涨:3 只 | 下跌:0 只
📉 平均涨跌幅:+1.46%
💡 整体趋势:📈 整体偏强
======================================================================

📁 文件结构

a-share-pro/
├── SKILL.md                    # 主文档
├── README.md                   # 使用说明
└── scripts/
    ├── config.py               # ⭐ 统一配置
    ├── monitor.py              # ⭐ 核心监控模块
    │
    ├── add_stock.py            # 添加股票
    ├── remove_stock.py         # 删除股票
    ├── list_stocks.py          # 查看列表
    ├── clear_watchlist.py      # 清空列表
    ├── summarize_performance.py# ⭐ 行情汇总
    │
    └── install.sh / uninstall.sh

🔧 高级用法

从命令行导入多个股票

bash
# 批量添加
for code in 600919 600926 600025; do
    python3 add_stock.py $code
done

每日定时检查

bash
# 添加到 crontab(每天收盘后 15:30)
# crontab -e
30 15 * * * cd ~/.openclaw/workspace/skills/a-share-pro/scripts && python3 summarize_performance.py

导出数据到 Excel

python
# 自定义脚本导出
import pandas as pd

stocks = ['600919', '600926']
data = []

for code in stocks:
    from monitor import AShareMonitor
    monitor = AShareMonitor()
    quote = monitor.get_quote(code)
    data.append(quote)

df = pd.DataFrame(data)
df.to_excel('持仓报告.xlsx', index=False)

📊 数据存储格式

watchlist.txt(自选股列表)

600919|江苏银行
600926|杭州银行
159681|创业板 ETF

每行格式:代码 | 名称


transactions.txt(交易记录)

2026-03-05|600919|buy|7.80|5000|备注
2026-03-01|600926|sell|8.50|1000|部分止盈

每行格式:日期 | 代码 | 买卖 | 价格 | 数量 | 备注


🎨 数据源优先级

系统会自动按以下顺序尝试获取数据:

  1. 🐧 腾讯财经 - 最快最稳定(首选)
  2. 📱 雪球 - 有市值/市盈率信息
  3. 🔍 百度股市通 - JSON 格式易解析
  4. 📈 Tushare - 需要积分(备选)

❓ 常见问题

Q1: 如何修改配置文件?

编辑 scripts/config.py:

python
WATCHLIST_FILE = "~/.openclaw/a_share/watchlist.txt"
DATA_SOURCES_PRIORITY = ["tencent", "xueqiu"]  # 只用腾讯和雪球
REQUEST_DELAY = 0.5  # 请求间隔改为 0.5 秒

Q2: 如何重置自选股?

直接编辑数据文件:

bash
nano ~/.openclaw/a_share/watchlist.txt
# 手动添加/删除股票,或使用 clear_watchlist.py 清空

Q3: 能否查询港股/美股?

目前仅支持 A 股(沪市/深市/科创板)。如需港股/美股,建议增加 Yahoo Finance 或新浪财经接口。


🔮 未来扩展方向

  • 技术指标计算(MA/MACD/KDJ)
  • K 线图表绘制
  • 智能提醒(突破价位推送)
  • 持仓盈亏计算(需要成本价)
  • 新闻资讯聚合
  • Web 可视化界面(Streamlit)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the A Share Pro AI skill do?

A 股专业监控工具 - 轻量级自选股管理 + 多数据源实时行情。支持腾讯财经/雪球/百度/Tushare 自动切换,纯文本存储,无需数据库依赖。用于日常股票跟踪、自选股管理和投资组合监控。

Why use A Share Pro on TypingMind?

Because you install it once and use it with any model. A Share Pro is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install A Share Pro in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lxyeternal/MalSkillBench/tree/main/Dataset/Skills/benign/a-share-pro. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use A Share Pro?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with A Share Pro?

As many as you like. As long as a model supports skills, you can use A Share Pro with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the A Share Pro AI skill free?

It is published on GitHub by lxyeternal. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇