team-weekly-poster

Extract content from weekly report DOCX and generate a dark-theme, vertical mobile HTML poster, then capture it as a PNG long image using Playwright + Edge. The poster uses a card-style layout, supports vertical mobile scrolling, assigns individual colors per person, and includes modules such as a stats bar, metric badges, this-week results, value contributions, and next-week focus. Suited for team weekly summaries, project progress posters, and personal work-summary long images. Example triggers: weekly poster, team weekly, weekly long-image, work summary poster, weekly PNG.

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 "team-weekly-poster" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8be81c9e7de64424bf083ca3c4c54faa82252ac0f445206e6e1aff4b4c131f06. Verify the upstream source and version against https://skillhub.cn/skills/user_b841e1e0/changtu-wangye-ruiaiteam 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

Extract content from weekly report DOCX and generate a dark-theme, vertical mobile HTML poster, then capture it as a PNG long image using Playwright + Edge. The poster uses a card-style layout, supports vertical mobile scrolling, assigns individual colors per person, and includes modules such as a stats bar, metric badges, this-week results, value contributions, and next-week focus. Suited for team weekly summaries, project progress posters, and personal work-summary long images. Example triggers: weekly poster, team weekly, weekly long-image, work summary poster, weekly PNG.

0 Downloads

Introduction source: third_party · user_b841e1e0 · 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

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: team-weekly-poster
description: "团队周报长图文生成技能:从周报 docx 文件提取内容,生成深色主题移动端竖版 HTML 海报,并自动截图为 PNG 长图文。支持手机上下滑动阅览,卡片式布局,每人独立配色(蓝/紫/绿等),包含统计栏、指标徽章、本周工作效果、价值贡献、下周聚焦等模块。使用 Playwright + Edge 浏览器进行 HTML→PNG 转换。适用场景:团队周报汇总、项目进度海报、个人工作总结长图文。触发词:周报海报、团队周报、周报长图文、工作总结海报、周报PNG。"
agent_created: true

Team Weekly Poster: 团队周报长图文生成技能

概述

将团队成员的周报 docx 文件转化为精美的移动端竖版 PNG 长图文,适合微信/企业微信分享、手机上下滑动阅览。

架构

┌─────────────────────────────────────────────────────┐
│  Input: 周报 docx 文件(1~N份)                      │
│    ↓                                                 │
│  Step 1: Python 提取 docx 纯文本                     │
│    ↓                                                 │
│  Step 2: 分析内容,结构化为每人卡片数据               │
│    ↓                                                 │
│  Step 3: 生成深色主题 HTML 海报(420px 移动端布局)   │
│    ↓                                                 │
│  Step 4: Playwright + Edge 截图为 PNG 长图文          │
│    ↓                                                 │
│  Output: 团队周报海报.png                            │
└─────────────────────────────────────────────────────┘

执行流程

阶段 1:提取周报内容

方式 A:从 docx 文件提取

使用 Python 内置库 zipfile + xml.etree 提取 docx 中的文本,无需安装 python-docx:

import zipfile, xml.etree.ElementTree as ET, os

files = [
    'path/to/周报-张三.docx',
    'path/to/周报-李四.docx',
    'path/to/周报-王五.docx',
]

ns = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}

for f in files:
    print('='*80)
    print(f'FILE: {os.path.basename(f)}')
    print('='*80)
    with zipfile.ZipFile(f) as z:
        with z.open('word/document.xml') as doc:
            tree = ET.parse(doc)
            root = tree.getroot()
            paragraphs = root.findall('.//w:p', ns)
            for p in paragraphs:
                texts = p.findall('.//w:t', ns)
                line = ''.join(t.text for t in texts if t.text)
                if line.strip():
                    print(line)
                else:
                    print()
    print()

参考完整脚本:references/extract_docx.py

方式 B:直接提供文本内容

如果用户直接粘贴了周报文本,跳过提取步骤。


阶段 2:结构化内容

从提取的文本中,为每位成员识别以下字段:

字段 说明 示例
name 姓名 张宇龙
role 角色定位 前端开发 · AI产品技术支撑
avatarChar 头像字(取名字最后一字) 龙
color 配色方案 blue / purple / green / orange / cyan
tags 标签数组 ["学习平台", "AI陪练"]
metrics 指标数组 [{num, label}] [{num: 11, label: "产品支撑"}]
workEffects 本周工作效果数组 ["修复学习平台Bug", ...]
valueContrib 价值贡献数组 ["保障4大系统稳定运行", ...]
nextFocus 下周聚焦数组 ["完善记录台账", ...]
statBar 全局统计栏 [{num, label, color}] [{num: 3, label: "团队成员", color: "blue"}]

内容处理规则:

  1. 关键数据用 <strong> 标签加粗(如项目名、数字、产品名)
  2. 每条工作效果精简为 1-2 句话,保留核心信息
  3. 下周聚焦用 ▸ 符号作为列表标记
  4. 内容完整性:不可遗漏任何信息,所有工作项都要体现在海报中

配色分配规则:

  • 第 1 人:blue(蓝色系 #3b82f6)
  • 第 2 人:purple(紫色系 #8b5cf6)
  • 第 3 人:green(绿色系 #10b981)
  • 第 4 人:orange(橙色系 #f59e0b)
  • 第 5 人:cyan(青色系 #06b6d4)

阶段 3:生成 HTML 海报

设计规范

核心尺寸:

  • 最大宽度:420px(移动端竖版)
  • 字体:Noto Sans SC(Google Fonts)+ Microsoft YaHei
  • 背景色:#0a0e1a(深色主题)
  • 卡片圆角:20px
  • 截图缩放:deviceScaleFactor 2(高清 2x)

布局结构(从上到下):

┌─────────────────────────────┐
│  Header(标题 + 日期范围)    │  ← 居中,渐变文字
├─────────────────────────────┤
│  Stats Bar(全局统计)        │  ← 5列横排,彩色数字
├─────────────────────────────┤
│  Divider                     │
├─────────────────────────────┤
│  Card 1(成员A)             │
│  ├─ Card Header(头像+姓名)  │  ← 渐变背景
│  ├─ Tags(标签)              │
│  ├─ Metric Badges(指标)     │  ← 3列横排
│  ├─ ⚡ 本周工作效果           │  ← 列表,加粗关键词
│  ├─ 💎 价值贡献              │  ← 带背景框
│  └─ 🎯 下周聚焦              │  ← ▸ 列表
├─────────────────────────────┤
│  Card 2(成员B)             │  ← 同结构,不同配色
├─────────────────────────────┤
│  Card 3(成员C)             │
├─────────────────────────────┤
│  Footer(品牌信息)          │
└─────────────────────────────┘

字号规范(移动端适配):

  • 标题 h1:32px / 900 weight
  • 副标题:14px / 300 weight
  • 日期范围:15px / 600 weight
  • 统计数字:28px / 900 weight
  • 统计标签:11px
  • 成员姓名:22px / 700 weight
  • 成员角色:13px
  • 区块标题:15px / 700 weight
  • 正文内容:14px / 1.8 line-height
  • 指标数字:24px / 900 weight
  • 标签:12px

装饰元素:

  • 3 个模糊光球(orb),使用 filter: blur(60px) + opacity: 0.12
  • 渐变背景:linear-gradient(180deg, #0d1220 0%, #0f1729 50%, #0a0e1a 100%)
  • 卡片渐变:linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%)

图标使用:

  • ⚡ 本周工作效果
  • 💎 价值贡献
  • 🎯 下周聚焦
  • 末尾绿色脉冲点(box-shadow: 0 0 8px)

HTML 模板

参考完整模板文件:templates/poster_template.html

模板包含:

  1. CSS 变量定义(颜色、间距、字号)
  2. 响应式移动端布局(max-width: 420px)
  3. 5 种配色方案(blue/purple/green/orange/cyan)
  4. 卡片结构(header → tags → metrics → sections)
  5. 装饰光球、渐变背景、分隔线

关键 CSS 变量:

:root {
  --bg-dark: #0a0e1a;
  --text-primary: #ffffff;
  --text-secondary: #8b95b3;
  --text-muted: #5a6485;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --border: rgba(255,255,255,0.06);
}

阶段 4:HTML → PNG 截图

环境要求

  • Node.js(推荐 22.x)
  • Playwright npm 包
  • Edge 浏览器(路径:C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe)

安装 Playwright(首次使用)

cd C:\Users\lin\.workbuddy\binaries\node\workspace
# 使用正确的 npm 路径
"C:\Users\lin\.workbuddy\binaries\node\versions\22.12.0\npm.cmd" install playwright

注意:不要执行 playwright install chromium(会下载 Chromium,耗时很长)。直接使用系统已安装的 Edge 浏览器。

截图脚本

参考完整脚本:references/screenshot.js

const { chromium } = require('playwright');
const path = require('path');

(async () => {
  const browser = await chromium.launch({
    executablePath: 'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe',
  });
  const page = await browser.newPage({
    viewport: { width: 420, height: 900 },
    deviceScaleFactor: 2,
  });

  const htmlPath = path.resolve(__dirname, '团队周报海报.html');
  await page.goto('file:///' + htmlPath.replace(/\\/g, '/'), { waitUntil: 'networkidle' });
  await page.waitForTimeout(3000); // 等待字体加载

  await page.screenshot({
    path: path.resolve(__dirname, '团队周报海报.png'),
    type: 'png',
    fullPage: true,
  });

  console.log('Screenshot saved: 团队周报海报.png');
  await browser.close();
})();

运行截图

# 设置 NODE_PATH 指向 playwright 安装位置
$env:NODE_PATH="C:\Users\lin\.workbuddy\binaries\node\workspace\node_modules"
& "C:\Users\lin\.workbuddy\binaries\node\versions\22.12.0\node.exe" screenshot.js

内容编辑规则

用户可能要求修改已生成的海报内容,常见操作:

  1. 修改文字:定位 HTML 中的 <li> 或文本节点,直接替换
  2. 删除条目:删除对应 <li> 元素
  3. 增加条目:在对应 <ul> 末尾追加 <li> 元素
  4. 修改后重新截图:每次 HTML 修改后,重新运行截图脚本生成新 PNG

完整工作流示例

用户:"帮我用这3份周报docx生成团队周报海报"
  ↓
1. 用户提供 docx 文件路径
2. 运行 extract_docx.py 提取文本
3. 分析每人内容,结构化数据
4. 基于 template 生成 HTML 海报
5. 用 preview_url 预览 HTML 效果
6. 运行 screenshot.js 生成 PNG
7. 用 deliver_attachments 交付 PNG 文件

用户:"调整下内容" / "放大字体" / "改成手机竖版"
  ↓
1. 直接编辑 HTML 文件
2. 重新预览确认
3. 重新截图生成 PNG
4. 重新交付

故障排除

问题 解决方案
MODULE_NOT_FOUND: playwright 确认 playwright 安装在 C:\Users\lin\.workbuddy\binaries\node\workspace\node_modules,并设置 NODE_PATH
playwright install chromium 超时 不用下载 Chromium,改用 Edge 浏览器 executablePath
npm 命令找不到 使用完整路径:C:\Users\lin\.workbuddy\binaries\node\versions\22.12.0\npm.cmd
截图字体缺失 确保 waitForTimeout(3000) 等待 Google Fonts 加载,或添加 Microsoft YaHei 作为 fallback
截图空白 检查 HTML 文件路径是否正确,file:/// 协议路径需用 / 替换 \
PNG 尺寸不对 确认 fullPage: true 和 deviceScaleFactor: 2,viewport 宽度 420px

变量与适配

不同人数适配

人数 布局 配色分配
1 人 单卡片 blue
2 人 双卡片 blue + purple
3 人 三卡片(默认) blue + purple + green
4 人 四卡片 blue + purple + green + orange
5 人+ 五卡片+ blue + purple + green + orange + cyan

统计栏适配

统计栏数据从全部成员内容中汇总,常见指标:

  • 团队成员数
  • 支撑项目数
  • AI产品线数
  • 知识产权数
  • 工作项总数

品牌信息适配

Footer 默认显示公司名和标语,可替换:

  • 广州睿艾科技 → 用户公司名
  • AI 驱动 · 技术赋能 · 场景落地 → 用户公司标语

文件清单

team-weekly-poster/
├── SKILL.md                          # 本文件(技能说明)
├── _user_meta.json                   # 元数据
├── references/
│   ├── extract_docx.py              # docx 文本提取脚本
│   └── screenshot.js                # Playwright 截图脚本
└── templates/
    └── poster_template.html          # HTML 海报模板(含完整 CSS)

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 提供从 docx 提取到 PNG 生成的完整闭环流程,解决团队周报可视化分享的高频痛点
  • 支持多人协作、多种配色方案、移动端适配,具备广泛的实用价值
Trigger Precision92/100

Highlights

  • 触发词覆盖全面(周报海报、团队周报、周报长图文等),边界清晰,无歧义
Structure and Standards95/100

Areas to improve

  • description写错位置 Reported severity: Minor

    顶层 frontmatter 中 description 与 skill_body 内部重复

    Recommendation: 建议移除 skill_body 内部重复的 frontmatter,保持 description 仅在顶层定义

Highlights

  • 文档结构完整,涵盖执行流程、示例、故障排除、适配规则等
  • 提供了清晰的阶段划分和端到端工作流示例
Execution Reliability89/100

Highlights

  • 工具来源明确(Python 内置库、Playwright + Edge),参数配置合理
  • 覆盖了主要异常场景并提供详细故障排除指南
Evidence Verifiability (mean of the first four)91/100

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.

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.

  • schemas.openxmlformats.org

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

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.