by ZhuLinsen
AI-native stock screening engine with full-market discovery, LLM ranking, risk-aware scoring, and auditable evaluation. AI选股
# Add to your Claude Code skills
git clone https://github.com/ZhuLinsen/alphasiftGuides for using ai agents skills like alphasift.
Last scanned: 11/4/2026
{
"issues": [
{
"file": ".github/skills/alphasift/SKILL.md",
"line": 50,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
},
{
"file": "SKILL.md",
"line": 56,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-11-04T11:52:23.969Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how alphasift compares with popular alternatives.
alphasift is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ZhuLinsen. AI-native stock screening engine with full-market discovery, LLM ranking, risk-aware scoring, and auditable evaluation. AI选股. It has 380 GitHub stars.
Yes. alphasift passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ZhuLinsen/alphasift" and add it to your Claude Code skills directory (see the Installation section above). alphasift ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
alphasift is primarily written in Python. It is open-source under ZhuLinsen on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh alphasift against similar tools.
No comments yet. Be the first to share your thoughts!
From $49 · 30 days · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
按策略筛选、评分并排序 A 股候选股票。
定位:全市场候选发现与横向排序引擎。它站在 daily_stock_analysis 这类单股深度分析服务上游;DSA 只是可选 L3 后置分析器,不是主筛选依赖。
dual_low、volume_breakout 这类策略筛选 A 股alphasift quickstart 一键看到全市场→候选→排名的最小闭环market="cn";market="us" 也可用(yfinance 快照 + 日K,无 hotspot/board_heat/tushare 等 CN 专属数据源),但需使用声明了 market_scope 含 us 的策略,目前为 us_momentum_qualitypip install -e .LITELLM_MODEL、LLM_CHANNELS、LITELLM_CONFIG 或旧变量 LLM_API_KEY/LLM_MODEL/LLM_BASE_URLdaily_stock_analysis 的 LiteLLM 配置字段,包括 OPENAI_*、GEMINI_*、DEEPSEEK_API_KEY、OLLAMA_API_BASEscoring_profile、risk_profile、portfolio_profile、scorecard_profile 覆盖默认规则event_profile 配置偏好/规避事件、公告类别和候选上下文来源权重industry/concepts/board_heat_score/board_heat_trend_score,会作为 LLM、主题热度因子与组合分散层锚点;history sidecar 可回填持续性、降温和状态字段。默认组合分散层会用这些标签映射风险桶,降低同一拥挤交易重复占位scorecard 后置评分器,也可追加 dsa 或 external_httpDSA_API_URL,默认调用 POST /api/v1/analysis/analyzeDAILY_SOURCE 支持 akshare(默认)、baostock 或 auto,auto 会在 akshare 失败时自动降级到 baostock 作为免费兜底alphasift strategies
alphasift quickstart
alphasift quickstart --strategy balanced_alpha --max-output 8
alphasift screen dual_low --no-llm
alphasift screen volume_breakout --max-output 10
alphasift screen balanced_alpha --no-llm
alphasift screen capital_heat
alphasift screen balanced_alpha --context "今日券商板块放量,低估值金融获得资金回流"
alphasift --env-file /home/ubuntu/daily_ai_assistant/.env screen balanced_alpha
alphasift screen balanced_alpha --explain
alphasift screen balanced_alpha --candidate-context-file candidate_context.csv
alphasift screen dual_low --no-post-analysis
alphasift screen shrink_pullback --no-llm
alphasift screen dual_low --post-analyzer dsa
alphasift audit
alphasift industry-cache --output data/industry_map.csv --explain
alphasift screen dual_low --no-llm --save-run
alphasift runs
alphasift evaluate <run_id> --explain
alphasift evaluate-batch --limit 20 --explain
alphasift evaluate <run_id> --with-price-path --explain
from alphasift import evaluate_saved_run, evaluate_saved_runs, list_strategies, screen
list_strategies()
screen("dual_low", market="cn", use_llm=False)
evaluate_saved_run("<run_id>")
evaluate_saved_runs(limit=20)
返回 ScreenResult JSON,核心字段有:
strategymarketstrategy_versionsnapshot_countafter_filter_countpicksllm_rankedllm_market_viewllm_selection_logicllm_portfolio_riskllm_coveragepost_analyzersdaily_enrichedrisk_enabledportfolio_concentration_notesdegradationsnapshot_sourcesource_errors每个 Pick 包含:
rankcodenamefinal_scorescreen_scoreranking_reasonrisk_summarypricechange_pctamounttotal_mvturnover_ratevolume_ratiope_ratiopb_ratioindustryconceptsboard_heat_scoreboard_heat_latest_scoreboard_heat_trend_scoreboard_heat_persistence_scoreboard_heat_cooling_scoreboard_heat_observationsboard_heat_stateboard_heat_summarychange_60dsignal_scoremacd_statusrsi_statusbreakout_20d_pctrange_20d_pctvolume_ratio_20dbody_pctpullback_to_ma20_pctconsolidation_days_20dfactor_scoresllm_confidencellm_sectorllm_themellm_tagsllm_catalystsllm_risksllm_thesisllm_style_fitllm_watch_itemsllm_invalidatorsrisk_scorerisk_levelrisk_penaltyrisk_flagsportfolio_penaltyportfolio_flagspost_analysis_statuspost_analysis_score_deltasdeep_analysis_statusdeep_analysis_summarydeep_analysis_resultdeep_analysis_signal_scoredeep_analysis_sentiment_scoredeep_analysis_operation_advicedeep_analysis_trend_predictiondeep_analysis_risk_flagsget_result 服务;本地用 --save-run、runs、evaluate、evaluate-batch 管理运行记录audit 用于自检策略 profile 覆盖、已知能力短板和下一步优先级--candidate-context-file 支持 CSV/JSON/JSONL,通过 code 对齐候选级新闻、公告、资金流或研究摘要,只注入当前候选池相关行;可选抓取会附带 source_count、source_confidence、source_weight_score、context_summary 和公告类别industry-cache 会缓存行业/概念映射和板块热度字段,并写入 history sidecar;后续加载映射时可回填板块热度滚动趋势、持续性、降温和状态字段,供 LLM 上下文与 theme_heat 因子使用industry 字段;两者都缺失时不会改变规则分数scorecard 默认启用,DSA 只是其中一个可追加后端--with-price-path 会额外估算最大回撤和最大浮盈AlphaSift is an agent-friendly stock discovery and ranking engine. It scans a broad market universe, applies auditable YAML strategies, enriches candidates with optional market context, ranks them with deterministic factors and optional LLM judgment, and saves runs for later T+N evaluation.
This README is the default English version. A Chinese version is available at README.zh-CN.md.
SKILL.md describes capabilities and callable interfaces for AI agents.# Install in editable mode
pip install -e .
# Copy configuration template
cp .env.example .env
# Edit .env if you want LLM ranking:
# GEMINI_API_KEY / OPENAI_API_KEY / DEEPSEEK_API_KEY
# or LITELLM_MODEL / LLM_CHANNELS / LITELLM_CONFIG
# List built-in strategies
alphasift strategies
# UI/agent overview: strategy groups, source health, recent runs
alphasift overview --explain
# Local read-only JSON API for dashboards/agents
alphasift serve --host 127.0.0.1 --port 8765
# Run the no-key demo
alphasift quickstart
# Screen without LLM ranking
alphasift screen dual_low --no-llm
# Screen with LLM ranking, if a provider key is configured
alphasift screen dual_low
# Reuse another project's environment file
alphasift --env-file /home/ubuntu/daily_ai_assistant/.env screen balanced_alpha
# Add market or theme context to the LLM prompt
alphasift screen balanced_alpha --context "Brokerage names are seeing volume expansion today."
# Add candidate-level news / announcement / fund-flow context
alphasift screen balanced_alpha --candidate-context-file candidate_context.csv
# Show local L3 scorecard explanations
alphasift screen balanced_alpha --explain
# Add DSA as an optional L3 analyzer; requires DSA_API_URL
alphasift screen dual_low --post-analyzer dsa
# Disable L3 post-analysis explicitly
alphasift screen dual_low --no-post-analysis
# Audit project and strategy configuration
alphasift audit
# Save a run and generate a Markdown review report
alphasift screen dual_low --no-llm --save-run
alphasift runs --json
alphasift report <run_id> --output data/reports/dual_low.md
Example output shape:
$ alphasift screen dual_low --no-llm
Universe 5190 -> filtered 337 -> output Top 5
rank code name score price change pe pb
1 002039 黔源电力 72.7 20.72 -2.49% 14.76 1.99
2 002444 巨星科技 71.0 30.82 +0.29% 14.59 1.95
3 002128 电投能源 70.9 31.60 -2.41% 14.00 1.90
The following recorded examples were run on April 12, 2026, using the previous trading day's A-share close data from April 10, 2026. LLM ranking was disabled with --no-llm; these rows are examples of engine output, not recommendations.
Full market 5190 stocks -> 337 after hard filters -> Top 5 output.
| Rank | Code | Name | Score | Price | Change | PE | PB |
|---|---|---|---|---|---|---|---|
| 1 | 002039 | 黔源电力 | 72.7 | 20.72 | -2.49% | 14.76 | 1.99 |
| 2 | 002444 | 巨星科技 | 71.0 | 30.82 | +0.29% | 14.59 | 1.95 |
| 3 | 002128 | 电投能源 | 70.9 | 31.60 | -2.41% | 14.00 | 1.90 |
| 4 | 002236 | 大华股份 | 70.8 | 17.43 | +1.04% | 14.86 | 1.50 |
| 5 | 600583 | 海油工程 | 68.9 | 7.02 | +4.15% | 14.89 | 1.17 |
Full market 5190 stocks -> 126 after hard filters -> Top 5 output.
| Rank | Code | Name | Score | Price | Change |
|---|---|---|---|---|---|
| 1 | 002837 | 英维克 | 74.0 | 99.05 | +6.40% |
| 2 | 688183 | 生益电子 | 73.8 | 95.30 | +7.09% |
| 3 | 300803 | 指南针 | 73.3 | 101.68 | +3.07% |
| 4 | 002384 | 东山精密 | 73.0 | 143.55 | +8.83% |
| 5 | 300277 | 汽轮科技 | 73.0 | 19.74 | +5.73% |
AlphaSift can discover current market hotspots and resolve a specific topic into a detail payload with raw timeline evidence, compact display-ready route events, leader stocks, source confidence, stale/fallback metadata, and quality diagnostics.
# Discover hotspot topics and write schema_version=2 cache/history sidecars
alphasift hotspots --provider akshare --top 12 --output data/hotspots.json --history data/hotspot.history.jsonl --explain
# Inspect a single hotspot topic
alphasift hotspot "AI compute" --top-stocks 10 --timeline --fallback-cache data/hotspots.json --explain
# Safe offline/no-network check
alphasift hotspots --provider none --explain
Hotspot cache files include:
schema_version: currently 2generated_atmetadata: provider, row count, source errors, stale/fallback statehotspots: normalized topic rows*.meta.json and JSONL history when requestedLeader stock fallbacks are intentionally explicit. When live constituent APIs fail and AlphaSift uses last-good/cache leaders, returned stocks carry fields such as source="last_good_cache.leader_stocks", source_confidence, and fallback_used=true instead of pretending to be live provider data.
Hotspot details keep the raw timeline for auditability and also expose a compact route list for applications. route is grouped by day, newest first, trimmed for UI display, and falls back to a short current heat/stage/leader summary when no timeline evidence is available.
from alphasift import screen
result = screen("dual_low", use_llm=False)
for pick in result.picks:
print(f"{pick.rank}. {pick.code} {pick.name} score={pick.final_score:.1f}")
Saved-run evaluation helpers are also exported:
from alphasift import evaluate_saved_run, evaluate_saved_runs
AlphaSift is designed to reuse LiteLLM-style configuration used by daily_stock_analysis and similar projects.
| Variable | Required | Description | Default |
|---|---|---|---|
LITELLM_MODEL |
Recommended | Main model in provider/model format |
gemini/gemini-2.5-flash |
LITELLM_FALLBACK_MODELS |
No | Comma-separated fallback models | - |
LLM_CHANNELS |
No | Multi-channel provider config using LLM_{NAME}_* |
- |
LITELLM_CONFIG |
No | LiteLLM Router YAML file | - |
GEMINI_API_KEY / OPENAI_API_KEY / DEEPSEEK_API_KEY |
For LLM ranking | Provider API key | - |
OPENAI_BASE_URL / OLLAMA_API_BASE |
No | OpenAI-compatible or Ollama endpoint | - |
LLM_MAX_TOKENS |
No | Max tokens requested from LLM ranking; keeps local servers from generating unbounded output after client timeout | 2048 |
LLM_CONTEXT |
No | Extra market/theme context for LLM ranking | - |
LLM_CANDIDATE_CONTEXT_ENABLED |
No | Fetch candidate news/announcements/fund-flow context by default | false |
INDUSTRY_MAP_FILES |
No | Local code-to-industry/concepts/board-heat files | - |
INDUSTRY_PROVIDER |
No | Optional board/industry provider such as akshare |
none |
SNAPSHOT_SOURCE_PRIORITY |
No | Snapshot source order | Depends on Tushare token |
SNAPSHOT_FALLBACK_MAX_AGE_HOURS |
No | Max acceptable age for last-good snapshot fallback; empty disables the guard | - |
ALPHASIFT_SOURCE_CALL_TIMEOUT_SEC |
No | Global caller-side timeout for third-party wrapper data-source calls; 0/off disables |
- |
ALPHASIFT_SNAPSHOT_CALL_TIMEOUT_SEC |
No | Snapshot wrapper timeout for efinance/akshare_em/tushare |
60 |
ALPHASIFT_DAILY_CALL_TIMEOUT_SEC |
No | Daily wrapper timeout for akshare/baostock/tushare/yfinance |
20 |
ALPHASIFT_EASTMONEY_MIN_INTERVAL_SEC |
No | Minimum interval for direct Eastmoney HTTP calls | 1.0 |
ALPHASIFT_EASTMONEY_JITTER_SEC |
No | Random jitter added to the Eastmoney interval | 0.3 |
TUSHARE_TOKEN / TUSHARE_API_TOKEN |
For Tushare | Tushare Pro token | - |
POST_ANALYZERS |
No | L3 analyzers; set none to disable |
scorecard |
DSA_API_URL |
For DSA analyzer | DSA service URL or full analysis endpoint | - |
DAILY_ENRICH_ENABLED |
No | Enable candidate-level daily K-line enrichment | false |
DAILY_SOURCE |
No | Daily K-line source: auto, tencent, sina, akshare, baostock, or tushare |
auto |
ALPHASIFT_DATA_DIR |
No | Run records, caches, and evaluation results | ./data |
STRATEGIES_DIR |
No | Custom strategy directory | auto-detect |
Example multi-channel LiteLLM config:
LLM_CHANNELS=primary
LLM_PRIMARY_PROTOCOL=openai
LLM_PRIMARY_BASE_URL=https://api.deepseek.com/v1
LLM_PRIMARY_API_KEYS=sk-xxx,sk-yyy
LLM_PRIMARY_MODELS=deepseek-chat,deepseek-reasoner
LITELLM_MODEL=openai/deepseek-chat
LITELLM_FALLBACK_MODELS=openai/gpt-4o-mini,anthropic/claude-3-5-sonnet
Example single-provider config:
GEMINI_API_KEY=...
LITELLM