Report Generator Skill
This skill generates a beautifully formatted HTML report based on a clean, minimal business template style (Light & Concise).
Capabilities
- 1. Refine Content: Structures raw text into a 4-quadrant format (Goal, Q1-Q4 details, Summary).
- Generate HTML: Creates a responsive HTML file.
- Screenshot: (Instruction) Guides the agent to convert the HTML to an image using the browser tool.
Usage
1. Prepare Data
You need to extract the following information from the user's input:
- - title: Report Title
- goal: One-sentence goal (Top section)
- q1 to q4: Four main sections, each containing:
-
title: Short title (e.g., "稳交付")
-
subtitle: Explanatory subtitle
-
slogan: Catchy slogan
-
items: List of bullet points (Array of strings)
- - summary: Array of 4 keywords for the bottom summary
2. Run Generation Script
Execute the python script with the JSON data:
CODEBLOCK0
3. Convert to Image (Agent Action)
After the script returns the html_path, use the browser tool to screenshot it:
- 1. Open the file: INLINECODE5
- Take a screenshot of the full page.
Example Data Structure
CODEBLOCK1
报告生成器技能
本技能基于简洁、极简的商业模板风格(轻量且简洁),生成一份格式精美的HTML报告。
能力
- 1. 内容整理:将原始文本结构化,形成四象限格式(目标、Q1-Q4详情、总结)。
- 生成HTML:创建响应式HTML文件。
- 截图:(指令)引导智能体使用浏览器工具将HTML转换为图片。
使用方法
1. 准备数据
你需要从用户输入中提取以下信息:
- - title:报告标题
- goal:一句话目标(顶部区域)
- q1 至 q4:四个主要部分,每部分包含:
- title:简短标题(例如稳交付)
- subtitle:解释性副标题
- slogan:朗朗上口的口号
- items:要点列表(字符串数组)
2. 运行生成脚本
使用JSON数据执行Python脚本:
bash
python3 scripts/generate.py --output workspace/reports --data {title: ..., ...}
3. 转换为图片(智能体操作)
脚本返回html_path后,使用浏览器工具进行截图:
- 1. 打开文件:file://
- 截取整个页面的截图。
示例数据结构
json
{
title: 2024 Q3 述职报告,
goal: 构建可规模化的非平台件能力体系,
q1: {
title: 稳交付,
subtitle: 解决扛量问题,
slogan: 保交付,争第一,
items: [保障核心需求上线, 降低事故概率]
},
q2: { ... },
q3: { ... },
q4: { ... },
summary: [稳定性, 增长, 效率, 反馈]
}