Communitygithub.com

sunny-kobe/ai_sentiney

A-share Intelligent Investment Advisor Sentinel - AI-driven market analysis, follow-up questioning, and trend assessment. Use when the user asks about A-share market analysis, Chinese stock/ETF trading signals, portfolio review, or market trends.

What is ai_sentiney?

This skill transforms an AI agent into a dedicated A-share market investment advisor, called Project Sentinel. It leverages the AkShare library to fetch real-time market data and uses a Gemini AI model to generate actionable trading recommendations. The skill supports generating three types of reports (morning brief, midday analysis, closing review) and can publish results to messaging platforms like Telegram and Feishu. Beyond report generation, the agent can handle user follow-up questions, evaluate trading accuracy, and analyze market trends over various timeframes using a flexible `--ask` command. The skill is designed to run locally on macOS from a specific project directory with a Python virtual environment, and it includes strict routing rules to ensure the AI executes CLI commands for analysis rather than fabricating responses itself.

Works with~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add sunny-kobe/ai_sentiney

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Project Sentinel

A-share intelligent investment advisor system that fetches real-time market data via AkShare and generates trading recommendations using Gemini AI.

Usage

Important: You must cd to the project directory and activate the virtual environment first.

Generate Analysis Report

# Midday analysis (default), output to terminal
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday

# Closing review
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode close

# Morning brief
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode morning

# Generate and push to Telegram
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target telegram

# Push to both Feishu and Telegram
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target feishu telegram

# JSON output (for programmatic consumption)
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --output json

Follow-up Analysis

# Follow up on the most recent analysis
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is gold ETF doing today"

# Follow up on a specific date
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is the semiconductor sector doing" --date 2026-02-07

# Follow up on closing analysis
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "What should I do tomorrow" --mode close

Trend Analysis

# One-week trend (automatically detects trend keywords)
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "What is the market trend for the past week"

# One-month trend
cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "How is my portfolio performing this month"

Use Cases

⚠️ Core Routing Rules (must be strictly followed):

  • Only execute --mode commands when the user explicitly asks to "run analysis / generate report / push"
  • All other questions (including follow-ups, evaluations, accuracy inquiries, casual chat) must use --ask "the user's original question" and forward it to the Sentinel CLI
  • Do not fabricate your own answers to replace the CLI output. You must execute the command and return stdout verbatim to the user
  • When unsure which command to use, default to --ask

Generate Report (only when the user explicitly asks to generate / run / push)

When the user says:

  • "Run midday analysis"
  • "Generate closing review"
  • "Analyze morning brief"

Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday

Push to Telegram

When the user says:

  • "Push analysis to Telegram"
  • "Push to Telegram"
  • "Send midday report"

Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target telegram

Push to Both Feishu and Telegram

When the user says:

  • "Push to all channels"
  • "Send to both Feishu and Telegram"

Execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --mode midday --publish --publish-target feishu telegram

All Other Questions (Follow-ups, Accuracy, Evaluation, Casual Chat, etc.)

When the user says anything other than "generate report", including but not limited to:

  • Follow-up on a specific asset: "How is gold ETF today", "Should I buy Zijin Mining"
  • Accuracy-related: "Is it accurate", "accuracy", "hit rate", "is it reliable", "trustworthy", "win rate"
  • Trend-related: "Market trend for the past week", "This month's portfolio trend"
  • Any other question

Always execute: cd /Users/lan/Desktop/code/ai_sentiney && source .venv/bin/activate && python -m src.main --ask "the user's original question"

Return the stdout output verbatim to the user, do not process or fabricate content yourself.

Data Cache

  • SQLite database: data/sentinel.db
  • JSON snapshot: data/latest_context.json
  • Supports historical replay: --replay parameter

Related Skills