بنقرة واحدة
run-stockai
Run StockAI server, smoke-test APIs, verify endpoints. Use when asked to start/run/launch/test the app.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Run StockAI server, smoke-test APIs, verify endpoints. Use when asked to start/run/launch/test the app.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Diagnose StockAI issues — API returns empty data, frontend stuck on loading, charts not rendering, server not picking up code changes. Use when something "doesn't work" but no clear error.
Full QA sweep before pushing StockAI code. Run this after making changes — checks all 8 pages, API endpoints, charts, and common failure modes.
| name | run-stockai |
| description | Run StockAI server, smoke-test APIs, verify endpoints. Use when asked to start/run/launch/test the app. |
StockAI is a Python FastAPI backend + static HTML frontend for A-share investment analysis.
# Python 3.11+ with pip
python --version
# On fresh Ubuntu: apt-get install -y python3 python3-pip
The driver launches the server on a temporary port, hits all key API endpoints, and shuts down cleanly:
cd stocks
python .Codex/skills/run-stockai/driver.py
This verifies:
cd backend
pip install -r requirements.txt
python -m uvicorn main:app --host 0.0.0.0 --port 3000 --reload
# Open http://localhost:3000
cd stocks
python -m pytest tests/ -q
# 45 passed, 2 skipped
login success!). This is normal.GET /api/quant/portfolio-risk returns {"error":"无持仓数据"} when the database has no holdings. This is expected — add holdings via the frontend first.