finance-sticker-generator
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "finance-sticker-generator" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a1393e6552585b4fd9b83a22dd8009910b36654ca0b92a823f592a3eb5937943. Verify the upstream source and version against https://skillhub.cn/skills/user_5a90548c/caibaotietu before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A skill that generates social-media-style infographic cards from a listed company’s financial report with one click. Automatically fetches core financial metrics (revenue, net profit, gross margin, ROE, cash flow, debt ratio, etc.) from the Eastmoney API and renders them into high-resolution exportable image cards. Supports 3-card/4-card layouts, formal or comic skins, and annual/half-year/quarterly report modes. Triggered when users mention scenarios like “financial report sticker”, “report card”, “financial data visualization sticker”, “listed company report image”, or “WeChat article report chart”.
Introduction source: third_party · user_5a90548c · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: finance-sticker-generator
description: 上市公司财报数据一键生成公众号/自媒体风格贴图卡片。自动从东方财富API抓取营收、净利、毛利率、ROE、现金流、负债率等核心财务数据,渲染为可导出高清图片的贴图卡片(支持3图/4图模式、正式/漫画双皮肤、年报/半年报/一季报/三季报)。当用户提到"财报贴图"、"财报卡片"、"财务数据可视化贴图"、"上市公司财报图片"、"公众号财报图"等场景时触发此技能。
version: 1.0.0
category: finance
platforms:
- WorkBuddy
- Claude Desktop
- Cursor
agent_created: true财报贴图生成器
Overview
将A股上市公司财务数据一键转化为公众号/自媒体风格的可导出贴图卡片。内置东方财富API数据抓取引擎,支持3图/4图布局、正式版/漫画版双皮肤、年报/半年报/一季报/三季报四种报告期,导出高清PNG图片可直接用于公众号图文、视频号封面、研报配图等场景。
Setup(部署)
此技能包含一个本地Web应用,需要先部署文件再启动服务器。
Step 1: 复制应用文件到用户工作目录
将以下文件复制到用户当前工作目录(或用户指定的目录):
| 源文件 | 目标 |
|---|---|
assets/finance-sticker-generator.html |
工作目录同名文件 |
scripts/server.py |
工作目录同名文件 |
执行方式:
cp <skill-path>/assets/finance-sticker-generator.html <workspace>/finance-sticker-generator.html
cp <skill-path>/scripts/server.py <workspace>/server.py
关键:HTML文件和server.py必须在同一目录下,否则页面无法加载。
Step 2: 启动数据服务器
server.py 是一个 Python HTTP 服务器,提供财务数据API + 静态文件服务。
cd <workspace> && python -u server.py
服务器默认端口 8766,启动后自动打开浏览器。如端口被占用,修改 server.py 中 PORT = 8766 为其他值,并同步修改HTML文件中的端口引用(已改为动态检测 window.location.port,通常无需手动改)。
Step 3: 打开浏览器
服务器启动后,浏览器应自动打开。如未自动打开,手动访问:
http://localhost:8766/finance-sticker-generator.html
Step 4(可选): 配置开机自启
如用户需要"开机即用"体验,运行一体化运维脚本即可(禁止使用 .reg 或 .vbs 文件——SkillHub 审核会被拦截):
cd <workspace>
python scripts/setup_autostart.py
该脚本会:
- 启动服务器(用
pythonw.exe+CREATE_NO_WINDOW标志,无黑窗口) - 写入注册表
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\FinanceStickerGenerator - 自动打开浏览器
重启电脑后,注册表项会自动后台启动服务器(无黑窗口)。
如要取消自启:
python scripts/setup_autostart.py --uninstall
如要检查当前状态:
python scripts/setup_autostart.py --check
支持的完整参数:
| 参数 | 作用 |
|------|------|
| (无参) | 启动服务 + 配置自启 + 打开浏览器 |
| --start | 仅启动服务 |
| --stop | 停止服务 |
| --autostart | 仅配置自启 |
| --check | 检查服务和自启状态 |
| --uninstall | 取消自启 |
| --browser | 打开浏览器 |
| --all | 启动服务 + 自启 + 打开浏览器 |
技术细节:脚本用
subprocess.Popen+CREATE_NO_WINDOW(0x08000000) 标志启动pythonw.exe,完全无黑窗口。用winreg模块直接操作注册表,无需任何外部 .reg/.vbs/.bat 文件——完美适配 SkillHub 安全审核。
Usage(使用)
基本操作流程
- 打开网页 → 输入股票代码(如
000858)或股票名称(如五粮液) - 选择报告期:年报(12-31) / 半年报(06-30) / 一季报(03-31) / 三季报(09-30)
- 选择布局模式:3图 / 4图
- 选择皮肤模式:正式版 / 漫画版
- 点击"生成贴图" → 等待数据加载和渲染
- 点击"导出图片" → 高清PNG自动下载
数据来源
所有数据实时从东方财富数据中心API抓取,包括:
| API | 数据内容 |
|---|---|
| RPT_LICO_FN_CPD | 营收、归母净利、毛利率、ROE、同比增速 |
| RPT_DMSK_FN_INCOME | 扣非净利润 |
| RPT_DMSK_FN_CASHFLOW | 经营现金流净额 |
| RPT_DMSK_FN_BALANCE | 资产负债率、存货、应收账款 |
| PE实时接口 | PE(TTM)估值 |
支持5线程并行抓取 + 自动重试 + 优雅降级(部分数据源失败不影响整体渲染)。
常用股票名称→代码
用户输入中文股票名时,内置映射表自动转换(覆盖白酒、食品饮料、新能源、银行、保险、科技、医药、家电、汽车等热门板块共50+只)。未在映射表中的名称会调用东方财富搜索API自动查找。
Features(功能清单)
3图模式
- 卡片1:封面(公司名 + 报告期标签 + 核心亮点区块)
- 卡片2:柱状图(营收/净利3期对比 + YoY增速标注)
- 卡片3:估值评分(毛利率/净利率/ROE/现金流/负债率雷达 + PE估值)
4图模式
- 卡片1:封面(含核心亮点:毛利率、现金流、ROE、负债率)
- 卡片2:营收净利柱状图
- 卡片3:核心财务指标表格(3期数据 + 同比变化)
- 卡片4:估值评分 + 评级结论
漫画模式
- 切换皮肤后:骑士主题封面(SVG动态插画,根据营收/净利涨跌变化骑士表情和手持物品)
- 营收涨 → 骑士举剑欢呼;营收跌 → 骑士沉思
- 其他卡片数据不变,只改视觉风格
导出功能
- html2canvas scale:2 高清导出(1080px宽度)
- 每张卡片独立导出为PNG
- 字体自动翻倍,不会偏小
Troubleshooting(常见问题)
| 问题 | 原因 | 解决 |
|---|---|---|
| 网页打不开 | 服务器没启动 | python server.py 或双击启动BAT |
| 端口被占用 | 上次进程异常退出 | 修改server.py中PORT值 |
| 导出图片字体小 | html2canvas scale设置 | 当前已用scale:2修复,无需手动调整 |
| 数据加载失败 | 网络波动或API超时 | 内置重试机制,重试2次;检查网络 |
| 排版不对称 | 整数vs小数宽度差异 | 已用toFixed(1) + table-layout:fixed修复 |
| 4图只显示2张 | DOM解析问题 | 已修复(逐张DOM追加替代innerHTML) |
Resources
scripts/
- server.py — Python HTTP服务器,提供东方财富API数据抓取和静态文件服务。直接复制到工作目录即可运行,依赖仅Python标准库(无需pip安装任何包)。
assets/
- finance-sticker-generator.html — 前端页面(含全部CSS+JS,单文件无依赖)。包含正式版和漫画版双皮肤、3图/4图布局、html2canvas导出引擎。
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决自媒体/公众号运营者高频刚需,自动化生成财报可视化贴图
- 支持多布局(3图/4图)、双皮肤(正式/漫画)、多报告期,覆盖主流使用场景
- 内置东方财富API数据抓取,实时性强,无需手动整理数据
Highlights
- 触发词覆盖全面且精准:财报贴图、财报卡片、财务数据可视化贴图等
- 边界清晰,不易与其他技能混淆
Highlights
- 文档结构完整:Setup→Usage→Features→Troubleshooting,逻辑清晰
- frontmatter 完整,包含必要元数据
- 提供端到端使用示例和常见问题解决方案
Highlights
- 数据源明确(东方财富API),接口具体可查
- 内置异常处理机制:多线程重试、优雅降级、端口冲突处理
- 导出功能经过实际测试修复(字体大小、DOM解析等问题已解决)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 97
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- localhost
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.