Skip to content

TrueHOOHA/shanxi-securities-tushare-skill / sxsc-tushare-analysis

sxsc-tushare-analysis

Verified

对用户提到的标的(沪深股票、指数、公募基金、期货)进行综合分析,输出带 ECharts 图表的 HTML 分析报告。 触发条件:用户说"分析""研究""评估""看看XX怎么样""XX基本面""XX技术面""XX估值""XX财务""深度研究""对比"等分析类请求,且标的属于 A 股/指数/公募基金/期货。 本 skill 自动调用 sxsc_tushare 取数并输出完整报告,接管数据获取与分析全流程。当本 skill 被触发时,数据获取类 skill 不应同时激活——分析已包含数据。

scripts/stock_analyzer.py

View on GitHub
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
股票分析入口(兼容层)。

本文件保留原有接口,底层转发到 analysis_runner.StockAnalysisRunner。
新开发请直接使用 analysis_runner。
"""

from typing import Optional

from analysis_runner import StockAnalysisRunner, analyze_stock, stock_report


class StockAnalyzer(StockAnalysisRunner):
    """兼容旧接口的别名类。"""

    def __init__(
        self,
        ts_code: str,
        end_date: Optional[str] = None,
        include_optional: bool = False,
    ):
        # include_optional 语义:False=基础 8 维,True=再追加 3 个可选维度。
        # 原实现把基础列表挂在 True 分支上,导致 include_optional=True 反而少跑维度。
        dimensions = [
            "overview", "trend", "valuation", "financial", "moneyflow",
            "shareholder", "float", "risk",
        ]
        if include_optional:
            dimensions += ["margin", "market_activity", "macro"]
        super().__init__(ts_code=ts_code, end_date=end_date, dimensions=dimensions)


__all__ = ["StockAnalyzer", "analyze_stock", "stock_report"]
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall