Confirm successful installation by checking the skill directory location:
.cursor/skills/daily-stock-analysis
Restart Cursor to activate daily-stock-analysis. Access via /daily-stock-analysis in your agent's command palette.
โ
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
LLM-powered stock analysis system for A-share, Hong Kong, and US markets. Automatically fetches quotes, news, and fundamentals, generates AI decision dashboards with buy/sell targets, and pushes results to WeChat/Feishu/Telegram/Discord/Email on a schedule via GitHub Actions โ zero server cost.
What It Does
AI Decision Dashboard: One-line conclusion + precise buy/sell/stop-loss prices + checklist per stock
Multi-market: A-shares (CN), HK stocks, US stocks + indices (SPX, DJI, IXIC)
Data sources: AkShare, Tushare, YFinance for quotes; Tavily/SerpAPI/Brave for news
LLM backends: Gemini, OpenAI, Claude, DeepSeek, Qwen via LiteLLM (unified)
GEMINI_API_KEY # Google AI Studio (free tier available)
OPENAI_API_KEY # OpenAI or compatible (DeepSeek, Qwen, etc.)
OPENAI_BASE_URL # e.g. https://api.deepseek.com/v1
OPENAI_MODEL # e.g. deepseek-chat, gpt-4o
AIHUBMIX_KEY # AIHubMix (recommended, covers Gemini+GPT+Claude+DeepSeek)
ANTHROPIC_API_KEY # Claude
MARKET_REVIEW=cn # cn | us | both
# cn = A-share three-phase review strategy
# us = US Regime Strategy (risk-on/neutral/risk-off)
# both = both markets
Key Commands (CLI)
# Run full analysis immediatelypython main.py
# Analyze specific stocks onlySTOCKS=600519,AAPL python main.py
# Run web dashboardpython web_app.py
# Access at http://localhost:5000# Run with Docker (env file)docker run --env-file .env stock-analysis python main.py
# Run schedule mode (waits for cron, then runs)SCHEDULE_RUN_IMMEDIATELY=true python main.py
GitHub Actions Workflow
The workflow file .github/workflows/stock_analysis.yml runs on schedule:
# Default schedule - customize in the workflow fileon:schedule:-cron:'30 1 * * 1-5'# 9:30 AM CST (UTC+8) weekdaysworkflow_dispatch:# manual trigger
To change schedule: Edit .github/workflows/stock_analysis.yml cron expression.
To add secrets via GitHub CLI:
gh secret set GEMINI_API_KEY --body"$GEMINI_API_KEY"gh secret set STOCKS --body"600519,300750,AAPL,TSLA"gh secret set TELEGRAM_BOT_TOKEN --body"$TG_TOKEN"gh secret set TELEGRAM_CHAT_ID --body"$TG_CHAT_ID"
Code Examples
Programmatic Analysis (Python)
# Run analysis for specific stocks programmaticallyimport asyncio
from analyzer import StockAnalyzer
asyncdefanalyze(): analyzer = StockAnalyzer()# Analyze a single A-share stock result =await analyzer.analyze_stock("600519")# Moutaiprint(result['conclusion'])print(result['buy_price'])print(result['stop_loss'])print(result['target_price'])asyncio.run(analyze())
Custom Notification Integration
from notifier import NotificationManager
notifier = NotificationManager()# Send to Telegramawait notifier.send_telegram( token=os.environ['TELEGRAM_BOT_TOKEN'], chat_id=os.environ['TELEGRAM_CHAT_ID'], message="๐ Analysis complete\n600519: BUY at 1680, SL: 1620, TP: 1800")# Send to Feishu webhookawait notifier.send_feishu( webhook_url=os.environ['FEISHU_WEBHOOK_URL'], content=analysis_report
)
Using the Agent API
import requests
# Ask the stock agent a strategy questionresponse = requests.post('http://localhost:5000/api/agent/chat', json={"message":"600519็ฐๅจ้ๅไนฐๅ ฅๅ๏ผ็จๅ็บฟ้ๅ็ญ็ฅๅๆ","stock_code":"600519","strategy":"ma_crossover"# ma_crossover, elliott_wave, chan_theory, etc.})print(response.json()['reply'])
Backtest Analysis Accuracy
import requests
# Trigger backtest for a stockresponse = requests.post('http://localhost:5000/api/backtest', json={"stock_code":"600519","days":30# evaluate last 30 days of AI predictions})result = response.json()print(f"Direction accuracy: {result['direction_accuracy']}%")print(f"Take-profit hit rate: {result['tp_hit_rate']}%")print(f"Stop-loss hit rate: {result['sl_hit_rate']}%")
Import Stocks from Image (Vision LLM)
import requests
# Upload screenshot of stock list for AI extractionwithopen('watchlist_screenshot.png','rb')as f: response = requests.post('http://localhost:5000/api/stocks/import/image', files={'image': f})stocks = response.json()['extracted_stocks']# Returns: [{"code": "600519", "name": "่ดตๅท่ ๅฐ", "confidence": 0.98}, ...]
Web Dashboard Features
Start the web app:
python web_app.py
Route
Feature
/
Today's analysis dashboard
/portfolio
Holdings management, P&
Implementation Guide
Prerequisites
โบClaude Desktop or compatible AI client with skill support
โบClear understanding of task or problem to solve
โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate into regular workflow if valuable
Common Pitfalls
โ Expecting perfect results without iteration
โ Not providing enough context in prompts
โ Using skill for tasks outside its intended scope
โ Accepting outputs without review and validation
Best Practices
โ Do
+Start with clear, specific prompts
+Provide relevant context and constraints
+Review and refine all outputs before using
+Iterate to improve output quality
+Document successful prompt patterns
โ Don't
โDon't use without understanding skill limitations
โDon't skip validation of outputs
โDon't share sensitive information in prompts
โDon't expect skill to replace human judgment
๐ก Pro Tips
โ Be specific about desired format and style
โ Ask for multiple options to choose from
โ Request explanations to understand reasoning
โ Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation