alphaear-stock — Claude Code skill: what it does, how to install
Searches A-Share, HK, and US stock tickers, returning OHLCV price history and fundamental metrics.
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-codeWhat alphaear-stock does
The skill runs scripts/stock_tools.py through the StockTools class. It performs fuzzy searches for ticker codes or company names like Moutai or 600519. The tool outputs OHLCV historical pricing into a DataFrame using dates in YYYY-MM-DD format.
It retrieves fundamental metrics such as market cap and PE ratio. Execution depends on pandas, requests, akshare, and yfinance, plus tables in scripts/database_manager.py. Missing Python libraries cause it to fail.
Network settings require attention. When querying US stocks via yfinance, you might need to export HTTP_PROXY and HTTPS_PROXY. For A-Share and HK tickers, akshare accesses EastMoney directly, attempting direct connections automatically.
What it helps with
- search stock tickers by company name or code
- extract historical OHLCV pricing data into DataFrames
- fetch market cap, PE ratio, and industry fundamentals
Example prompts for the agent
- Search for ticker Moutai and show company fundamentals
- Get OHLCV price history for stock code 600519 for specific start_date and end_date
- Check PE ratio and market cap for ticker AAPL
How to install alphaear-stock
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-code2Manually: put the files in place
~/.claude/skills/alphaear-stock/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/alphaear-stock/
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a codex2Manually: put the files in place
.agents/skills/alphaear-stock/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a cursor2Manually: put the files in place
.cursor/skills/alphaear-stock/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install RKiding/Awesome-finance-skills alphaear-stock2Manually: put the files in place
.github/skills/alphaear-stock/SKILL.md1Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a gemini-cli2Platform CLI
gemini skills install https://github.com/RKiding/Awesome-finance-skills --path skills/alphaear-stockManually: put the files in place
.devin/skills/alphaear-stock/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about alphaear-stock
How to install alphaear-stock in Claude Code?
Run npx skills add RKiding/Awesome-finance-skills --skill alphaear-stock -a claude-code. The file is saved to ~/.claude/skills/alphaear-stock/SKILL.md.
What does the alphaear-stock skill do?
It queries ticker codes across US, HK, and Chinese A-Share markets. It also delivers historical OHLCV price records and company fundamentals.
Why does the skill mention proxy settings for US stocks?
Data retrieval via yfinance needs access to Yahoo Finance. If your local network cannot connect to it, export HTTP_PROXY and HTTPS_PROXY in your environment.
Source text
SKILL.md · Apache-2.0
---
name: alphaear-stock
description: Search A-Share/HK/US finance stock tickers and retrieve finance stock price history. Use when user asks about finance stock codes, recent price changes, or specific company finance stock info.
---
# AlphaEar Stock Skill
## Overview
Search A-Share/HK/US stock tickers and retrieve historical price data (OHLCV).
## Capabilities
### 1. Stock Search & Data
Use `scripts/stock_tools.py` via `StockTools`.
- **Search**: `search_ticker(query)`
- Fuzzy search by code or name (e.g., "Moutai", "600519").
- Returns: List of `{code, name}`.
- **Get Price**: `get_stock_price(ticker, start_date, end_date)`
- Returns DataFrame with OHLCV data.
- Dates format: "YYYY-MM-DD".
- **Get Fundamentals**: `get_stock_fundamentals(ticker)`
- Returns dict with sector, industry, market cap, PE ratio, and summary.
- Supports A-Share/HK/US stocks.
## Dependencies
- `pandas`, `requests`, `akshare`, `yfinance`
- `scripts/database_manager.py` (stock tables)
## Notes
- **Proxy**: For US stock data (via `yfinance`), you may need to set environment variables if your network cannot reach Yahoo Finance directly:
```bash
export HTTP_PROXY="http://<proxy_ip>:<port>"
export HTTPS_PROXY="http://<proxy_ip>:<port>"
```
- **A-Share/HK**: Data is primarily fetched via `akshare` (EastMoney), which usually works best with a direct connection in China. The tool automatically detects proxy issues and attempts direct connection for these markets.
© RKiding · Apache-2.0 · RKiding/Awesome-finance-skills