quarterly-profit-chart

生成某只股票复权价格与单季度净利润的双轴季度图表,并附带自动生成的中文分析。用于用户请求可视化某股票的季度股价与利润趋势(例如“画一下XX的季度股价和净利润图”、“对比XX股价和利润”等)。支持使用腾讯自选股数据源,覆盖 A 股、港股及美股。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "quarterly-profit-chart":https://skillpi.com/zh/skills/deepskill-aafa75d51685491590231969fe836a1373c13cd471230c2ddd7c91b02037b424。安装前核对上游来源和版本:https://skillhub.cn/skills/user_ece50f06/stockearningchart。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

生成某只股票复权价格与单季度净利润的双轴季度图表,并附带自动生成的中文分析。用于用户请求可视化某股票的季度股价与利润趋势(例如“画一下XX的季度股价和净利润图”、“对比XX股价和利润”等)。支持使用腾讯自选股数据源,覆盖 A 股、港股及美股。

0 下载

介绍来源: third_party · user_ece50f06 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
Generate a quarterly dual-axis chart of a stock's post-adjustment price versus its single-quarter net profit, with auto-generated Chinese analysis. Use when a user asks to visualize a stock's quarterly price and profit trend, e.g. '画一下XX的季度股价和净利润图', '对比XX股价和利润', 'XX季度业绩趋势', or any request to chart a company's quarterly share price against its earnings. Works for A-share / HK / US stocks covered by the Tencent self-selected stock data source.
适合谁
"画一下海康威视的季度股价和净利润图" "对比比亚迪的股价和利润趋势" "XX 季度业绩走势 / 利润和股价背离分析" Any request to chart a stock's quarterly price against its earnings.
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: quarterly-profit-chart
description: "Generate a quarterly dual-axis chart of a stock's post-adjustment price versus its single-quarter net profit, with auto-generated Chinese analysis. Use when a user asks to visualize a stock's quarterly price and profit trend, e.g. '画一下XX的季度股价和净利润图', '对比XX股价和利润', 'XX季度业绩趋势', or any request to chart a company's quarterly share price against its earnings. Works for A-share / HK / US stocks covered by the Tencent self-selected stock data source."
agent_created: true

Quarterly Profit Chart(季度股价 vs 单季净利润对比图)

Overview

Given a stock (by name or code), produce a self-contained HTML report containing:

  • A dual-axis chart: blue bars = single-quarter net profit attributable to parent (left axis, in 亿元), red line = post-adjustment (后复权) closing price (right axis, in 元), plus a sub-chart green line = single-quarter net profit YoY growth (%).
  • A data-driven Chinese analysis section (key metrics + trend interpretation).

The chart is pure inline SVG (no CDN dependency), so it renders offline and is easy to save.

When to Use

  • "画一下海康威视的季度股价和净利润图"
  • "对比比亚迪的股价和利润趋势"
  • "XX 季度业绩走势 / 利润和股价背离分析"
  • Any request to chart a stock's quarterly price against its earnings.

Dependencies

  • westock-data skill — provides the CLI (index.js) used to fetch K-line and financial data. Load it first via the westock-data skill to obtain the CLI path.
  • node — to run the westock-data CLI.
  • This skill's bundled script: scripts/gen_chart.py.

Workflow

Step 1 — Resolve the stock code

The westock-data CLI does not accept Chinese names (it returns empty). If the user gives a name (e.g. "海康威视"), resolve it to a standard code first:

  • Use WebSearch: search "名称 股票代码" and pick the standard code (formats: sz002415, sh600519, bj430047, or HK hk00700, US usAAPL).
  • If the user already supplied a code, use it directly.

Step 2 — Load westock-data and locate its CLI

Invoke the westock-data skill to load its instructions, which expose the path to .../westock-data/scripts/index.js. Pass that path to the script via --westock. (The script also auto-discovers the path under ~/.workbuddy and /Applications/WorkBuddy.app, so --westock is optional if the default layout matches.)

Step 3 — Run the generator

python3 SKILL_DIR/scripts/gen_chart.py CODE \
    --name "股票名称" \
    --westock "PATH/to/westock-data/scripts/index.js" \
    --out "OUTPUT.html"

The script prints a progress log and ends with a SUMMARY_JSON:... line containing the key metrics (profit peak, price peak, latest quarter) — use it for your narration.

Step 4 — Present the result

Use present_files on the generated HTML so the user can view (and save) it. Then, based on the SUMMARY_JSON and the script's auto-analysis, add a short contextual read-out (e.g. note whether price and profit peaks are synchronized, or whether profit is at a high while valuation has pulled back — a "profit up, price flat" divergence worth flagging in a Lynch-style lens).

Implementation Notes (non-obvious gotchas)

  • Single-quarter profit: the finance API does not expose a single-quarter field. The script computes it as cumulative(this quarter) − cumulative(prior quarter in same year) (Q1 = cumulative directly). Finance returns cumulative net profit in NPParentCompanyOwners (unit: 元 → ÷1e8 for 亿元).
  • Standard quarter-ends only: filter out non-standard report dates (e.g. re-statement dates like 2016-07-31) to avoid polluting the cumulative-difference calculation.
  • Empty-result retry: the westock-data CLI intermittently returns empty [] / null on frequent/consecutive calls (likely internal rate-limiting). gen_chart.py already retries with exponential backoff; if a call still fails, simply re-run.
  • History window: the finance endpoint typically returns ~42 quarters (from about 2016Q1). The X-axis is built dynamically from whatever quarters are available, so older/newer listings are handled automatically.
  • Post-adjustment price: K-line uses --fq hfq (后复权) so splits/dividends don't distort the long-term trend.

Resources

scripts/

  • gen_chart.py — fetches seasonal post-adjustment K-line + quarterly profit, computes single-quarter profit and YoY, and renders the self-contained HTML report. Args: CODE (required), --westock PATH, --name NAME, --out FILE.

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值88/100

亮点

  • 提供高价值的股票季度净利润与复权价格双轴图表生成功能,满足投资者可视化分析需求
  • 支持A股、港股、美股,覆盖广泛,输出为离线HTML报告,实用性强
触发精准92/100

亮点

  • 触发词覆盖全面,包含多种中英文变体,边界清晰,能有效匹配用户请求
结构规范78/100

待提升项

  • frontmatter incomplete 原报告严重程度:轻微

    顶层frontmatter缺少版本号、作者等常见字段

    改进建议:建议补充version、author等字段以增强规范性

亮点

  • 文档结构清晰,包含完整的工作流步骤、使用场景和实现细节
执行可靠75/100

待提升项

  • dependency on external skill without explicit loading guarantee 原报告严重程度:轻微

    依赖'westock-data'技能提供CLI路径,但未明确保证其已加载

    改进建议:建议在文档中强调必须先加载'westock-data'技能,或提供更明确的错误提示

亮点

  • 脚本内置重试机制处理空结果,使用WebSearch解决中文名称到代码的映射,提升了鲁棒性
证据可验 (前四项均值)83/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。