
Stock Watcher
Add a Clawdbot skill to track Chinese A-share tickers with a normalized watchlist and performance summaries.
Overview
Stock Watcher is an agent skill for the Build phase that manages a Chinese A-share watchlist and performance summaries inside Clawdbot via standardized Python scripts.
Install
npx skills add https://github.com/agentbay-ai/agentbay-skills --skill stock-watcherWhat is this skill?
- Add, list, remove, and clear watchlist entries via 6-digit A-share codes
- Summarize performance for all watched tickers
- Standardized storage at ~/.clawdbot/stock_watcher/watchlist.txt
- Auto-install layout on first use with scripts in the skill directory
- Primary quotes sourced from 同花顺 (10jqka.com.cn) stock pages
- 6-digit stock codes
- 5 scripted commands (add, list, remove, clear, summarize)
Adoption & trust: 934 installs on skills.sh; 40 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want your coding agent to track A-share codes consistently without reinventing paths, commands, or quote fetches every session.
Who is it for?
Clawdbot users who need lightweight A-share watchlists and scripted summaries from the agent.
Skip if: Builders without Clawdbot, non–A-share markets, or regulated trading/automation that needs broker APIs and audit trails.
When should I use this skill?
User manages a Chinese A-share watchlist, Clawdbot stock tracking, or performance summary via stock-watcher scripts.
What do I get? / Deliverables
You get a durable ~/.clawdbot watchlist, scriptable add/list/remove/clear flows, and a summarize_performance report fed from 10jqka pages.
- Initialized ~/.clawdbot/stock_watcher/watchlist.txt
- CLI-style watchlist mutations and performance summary output
Recommended Skills
Journey fit
Stock Watcher is agent infrastructure you install into Clawdbot—canonical shelf is Build/agent-tooling for custom assistant capabilities. Python scripts and ~/.clawdbot paths extend the agent runtime rather than shipping a standalone trading product UI.
How it compares
Clawdbot filesystem + Python skill package—not a hosted portfolio SaaS or MCP market-data server.
Common Questions / FAQ
Who is stock-watcher for?
Clawdbot operators tracking Chinese A-shares with 6-digit codes who want repeatable shell/Python commands from their agent.
When should I use stock-watcher?
During build when adding agent-tooling for finance checks, or during operate when you want quick watchlist updates and performance summaries before decisions.
Is stock-watcher safe to install?
Review the Security Audits panel on this Prism page; scripts use network fetches to third-party quote pages—verify sources and never treat output as investment advice.
SKILL.md
READMESKILL.md - Stock Watcher
# Stock Watcher Skill A standardized stock watchlist management skill for Clawdbot that provides clean, consistent functionality for tracking Chinese A-share stocks. ## Features - ✅ **Add stocks** to watchlist using 6-digit stock codes - ✅ **View watchlist** with clear formatting - ✅ **Remove individual stocks** from watchlist - ✅ **Clear entire watchlist** with one command - ✅ **Get performance summary** for all watched stocks - ✅ **Standardized storage path** - no more path confusion! - ✅ **Easy installation/uninstallation** ## Installation For new users, the skill will be automatically installed when first used. The installation script creates: - Standardized watchlist directory: `~/.clawdbot/stock_watcher/` - Watchlist file: `~/.clawdbot/stock_watcher/watchlist.txt` - All necessary scripts in the skill directory ## Usage Commands ### Add a stock ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && python3 add_stock.py 600053 ``` ### View watchlist ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && python3 list_stocks.py ``` ### Remove a stock ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && python3 remove_stock.py 600053 ``` ### Clear watchlist ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && python3 clear_watchlist.py ``` ### Get performance summary ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && python3 summarize_performance.py ``` ## Data Source - **Primary source**: 同花顺 (10jqka.com.cn) - **Stock pages**: `https://stockpage.10jqka.com.cn/{stock_code}/` - **Supported markets**: Shanghai A-shares, Shenzhen A-shares, STAR Market ## File Structure ``` stock-watcher/ ├── SKILL.md # Skill metadata and instructions ├── scripts/ │ ├── config.py # Centralized configuration │ ├── add_stock.py # Add stock to watchlist │ ├── list_stocks.py # List all stocks in watchlist │ ├── remove_stock.py # Remove specific stock │ ├── clear_watchlist.py # Clear entire watchlist │ ├── summarize_performance.py # Get stock performance data │ ├── install.sh # Installation script │ └── uninstall.sh # Uninstallation script └── references/ # (Reserved for future reference docs) ``` ## Storage Location All user data is stored in a single, standardized location: - **Directory**: `~/.clawdbot/stock_watcher/` - **Watchlist file**: `~/.clawdbot/stock_watcher/watchlist.txt` Format: `stock_code|stock_name` (e.g., `600053|九鼎投资`) ## Troubleshooting ### "Command not found" errors Ensure you have Python 3 and required packages installed: ```bash pip3 install requests beautifulsoup4 ``` ### Network issues The skill fetches data from 10jqka.com.cn. Ensure you have internet access and the site is accessible. ### Permission errors Make sure the `~/.clawdbot/` directory is writable by your user. ## Uninstallation To completely remove the skill and all data: ```bash cd ~/.clawdbot/skills/stock-watcher/scripts && ./uninstall.sh ``` This will remove both the skill scripts and your watchlist data. #!/usr/bin/env python3 """ Add stock to watchlist Usage: python3 add_stock.py <stock_code> [stock_name] """ import sys import os import requests from bs4 import BeautifulSoup from config import WATCHLIST_FILE def get_stock_name_from_code(stock_code): """Get stock name from 10jqka.com.cn using stock code""" try: url = f"https://stockpage.10jqka.com.cn/{stock_code}/" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } response = requests.get(url, headers=headers, timeout=10) response.encoding = 'utf-8' if response.status_code == 200: soup = BeautifulSoup(response.text, 'html.parser') title = soup.find('title') if title: title_text = title.get_text() if '(' in title_text and ')' in title_text: