Install
openclaw skills install @ksfrist/ppt-light-corporateGenerate polished corporate PPTs using a light-themed company template. Activate when: (1) User asks to create/make/generate a PPT/PowerPoint/幻灯片/演示文稿 (2) User provides content and wants it turned into slides (3) User asks to improve or redo a PPT Uses a pre-analyzed H3C-style light corporate template (white bg + China red accent). NOT for: dark theme PPTs, creative/artistic decks, or Keynote files.
openclaw skills install @ksfrist/ppt-light-corporate基于 python-pptx 的企业PPT自动生成引擎。H3C浅色企业模板,白底+中国红点缀,16:9画布。
| 文件 | 作用 |
|---|---|
assets/template-light.pptx | 模板文件(10" × 5.625",9种Layout,5个母版) |
assets/icons-library.pptx | 279个简洁矢量图标(设备相关) |
assets/icon-index.json | 图标语义索引(中英文标签+场景分类) |
scripts/ppt_helpers.py | 核心生成引擎(24种内容布局 + 工具方法) |
scripts/ppt_qa.py | 自动QA审校(9项检查) |
scripts/ppt_scorer.py | 评分系统(逐页6维 + 整体4维 + 学习循环) |
scripts/icon_library.py | 图标搜索/复制/变色引擎 |
import sys
sys.path.insert(0, '<skill_dir>/scripts')
from ppt_helpers import TemplateBuilder
tb = TemplateBuilder()
s = tb.add_cover_slide()
tb.text(s, 0.8, 1.5, 8.4, 0.6, '标题', sz=32, color=tb.RED2, bold=True)
s = tb.add_content_slide('页面标题')
tb.three_col_icon_cards(s, [
{'icon_text': '', 'title': '功能一', 'body': '说明'},
{'icon_text': '', 'title': '功能二', 'body': '说明'},
{'icon_text': '', 'title': '功能三', 'body': '说明'},
])
# 放置白色矢量图标到红色圆圈上(自动检测圆圈位置)
def find_circles(slide):
circles = []
for shape in slide.shapes:
if 'Oval' in shape.name:
x, y = shape.left / 914400, shape.top / 914400
w, h = shape.width / 914400, shape.height / 914400
circles.append({'cx': x + w/2, 'cy': y + h/2, 'w': w})
return circles
for circle, query in zip(find_circles(s), ['server', 'wifi', 'database']):
sz = circle['w'] * 0.55
tb.place_icon(s, query, circle['cx'] - sz/2, circle['cy'] - sz/2, size=sz, color='FFFFFF')
tb.save('output.pptx')
| 名称 | 色值 | 用途 |
|---|---|---|
| RED | #C00000 | 页标题、强调 |
| RED2 | #EA0000 | 封面标题 |
| RED3 | #D8222A | 小节标题 |
| DARK | #343434 | 正文 |
| MID | #4B4948 | 次要文字 |
| LIGHT | #A0A0A0 | 辅助/淡化 |
| BG | #F1F1F1 | 卡片背景 |
| BORDER | #E7E7E7 | 边框/分隔线 |
| ACCENT_GREY | #6B6B6B | 交替强调(替代蓝色) |
微软雅黑(latin + ea 同时设置)shrink=True(自动缩字防溢出)start_x = (10 - total_width) / 2| # | 方法 | 适用场景 |
|---|---|---|
| 1 | two_col_numbered_cards | A/B对比 |
| 2 | two_row_numbered_bars | 两要点堆叠 |
| 3 | two_row_label_tabs | 分类标签+详情 |
| 4 | two_col_circle_cards | 人物/角色 |
| 5 | left_text_right_stacked_cards | 论点+论据(支持2-3张卡片自适应) |
| # | 方法 | 适用场景 |
|---|---|---|
| 6 | three_col_vertical_cards | 三个并列特性 |
| 7 | three_row_numbered_bars | 三步编号 |
| 8 | three_row_label_bars | 三分类标签 |
| 9 | three_col_icon_cards | 图标+标题+说明 |
| 10 | three_col_numbered_card_blocks | 编号灰卡半嵌入 |
| # | 方法 | 适用场景 |
|---|---|---|
| 11 | four_col_tall_cards | 四个高卡片(标题高度自适应) |
| 12 | four_row_badge_bars | 四行徽章条 |
| 13 | four_col_ascending_steps | 四步阶梯递进 |
| 14 | four_col_red_base_cards | 红底白卡+圆环 |
| 15 | four_col_numbered_dividers | 竖分隔线四栏 |
| 16 | four_col_parallelogram | 倾斜平行四边形 |
| # | 方法 | 适用场景 |
|---|---|---|
| 17 | timeline_horizontal_ascending | 水平时间轴+箭头 |
| 18 | timeline_icon_flow | 圆形图标流程(红/灰交替) |
| 19 | timeline_zigzag | 上下交替时间线(3-5步) |
| 20 | process_flow_arrows | 流程箭头 |
| 21 | process_three_stage | 三阶段里程碑 |
| # | 方法 | 适用场景 |
|---|---|---|
| 22 | triple_overlap_circles | 三圆交叠(倒三角) |
| 23 | diamond_quadrants | 菱形四象限 |
| 24 | four_panel_on_platform | 椭圆基座四面板 |
279个简洁矢量图标,支持搜索、复制和变色。
# 搜索并放置(自动变白色)
tb.place_icon(slide, 'server', x=2.0, y=1.5, size=0.5, color='FFFFFF')
# 搜索关键词(中英文均可)
results = tb.icons.search('数据库', limit=3)
color='FFFFFF')find_circles() 自动检测圆圈位置,确保居中| 分类 | 数量 |
|---|---|
| 电脑 | 50 |
| 硬件 | 36 |
| 网络 | 32 |
| 服务器 | 25 |
| 数据库 | 20 |
| 设备 | 12 |
| 组合 | 63 |
需求理解 → 大纲(等确认) → 生成 → QA审校(修到0) → 评分 → 发送 → 迭代
shrink=Truememory/ppt-feedback.mdtimeline_zigzag(上下交替时间线)