Weekly Report Generator(企业高阶周报生成器)
Directory: skills/weekly-report-generator
Source: https://github.com/lighters/agent-skills (skills/weekly-report-generator)
Produce presentation-grade HTML + PDF weekly reports (4 core slides: Cover, Gantt Work Plan Overview, Deliverables & Status, This Week / Task Management; plus optional Slide 5+ Discussion & Proposal slides for meeting topics and architectural trade-offs). Match the visual fidelity of enterprise PPT weekly reports.
Before generating
- Read the input format guide:
skills/weekly-report-generator/references/input_format_guide.md
- Optionally skim
skills/weekly-report-generator/examples/sample_data.json
- Build a JSON data file for the target project/week (cover, timeline, deliverables, thisWeek). Do not invent status — pull from the project's task source of truth.
Generate
cd skills/weekly-report-generator
python3 scripts/generate_report.py \
--data examples/sample_data.json \
--theme classic-navy \
--output weekly-report.html
python3 scripts/export_pdf.py \
--input weekly-report.html \
--output weekly-report.pdf
Themes: astrazeneca / classic-navy, novartis, bayer, jnj, novo-nordisk, wukong-green, vercel-minimal.
Work Plan Date & Holiday Constraints (CRITICAL for Agents)
When constructing timeline.weeks[], agents MUST strictly follow these business calendar rules:
Strict Monday-to-Friday Work Weeks (周一至周五约束):
- Every standard work week in
timeline.weeks[].dates MUST represent Monday to Friday (周一至周五).
- Format:
M.D-M.D (e.g. 9.14-9.18, 10.12-10.16), or YYYY.M.D-YYYY.M.D across year boundaries.
- Start day MUST be Monday (
weekday() == 0).
- End day MUST be Friday (
weekday() == 4).
- DO NOT guess calendar days! Verify with Python before writing the JSON:
import datetime
d = datetime.date(2026, 9, 16)
mon = d - datetime.timedelta(days=d.weekday()) # Monday
fri = mon + datetime.timedelta(days=4) # Friday
# Dates string: f"{mon.month}.{mon.day}-{fri.month}.{fri.day}" -> "9.14-9.18"
Statutory Holiday Annotation (法定节假日标注):
- When a week corresponds to a statutory holiday (如国庆假期、春节假期、劳动节、中秋节、端午节、清明节、元旦等):
- Set
"isHoliday": true
- Set
"holidayName": "<假期名称>" (e.g. "国庆假期", "春节假期")
- The Gantt chart automatically renders the holiday week as a golden vertical highlight column with the holiday name vertically centered. Regular task bars do not occupy holiday columns.
Date Validation & Auto-Fix CLI:
- Validate dates without generating:
python3 scripts/generate_report.py --data <file.json> --check-dates
- Auto-align non-holiday dates to Monday-Friday:
python3 scripts/generate_report.py --data <file.json> --fix-dates
- Strict mode:
python3 scripts/generate_report.py --data <file.json> --strict-dates
Timeline JSON (summary)
timeline.currentWeek: week id for the "We are here" pointer
timeline.weeks[]: { id, name, dates, isHoliday?, holidayName? } (strictly Mon-Fri, or statutory holiday)
timeline.tasks[]: { workstream, category, task, start, end, status, milestone? } or spans[] for multi-phase bars
- task
status: completed | active | planned
Slide 3 (Deliverables / Output Status) Guidance (CRITICAL for Agents)
- Purpose & Scope: Focus strictly on major project deliverables and key strategic milestones (主要交付物与核心里程碑跟进,如各阶段成果确认、系统开发完成、SIT/UAT 验收签收、系统正式上线 Go-Live 等).
- DO NOT write granular task progress here: Everyday tactical tasks, operational bug fixes, or low-level implementation details belong on Slide 4 (
thisWeek), NEVER on Slide 3.
deliverables.items[]: { milestone, progress, date, status, risk }
milestone: Major deliverable or milestone gate name (e.g. 手机端&web端重点功能系统开发完成, 业务验收测试(UAT)签收)
progress: High-level summary of deliverables readiness (1-2 sentences, or - if pending)
date: Target delivery date (YYYY.M.D)
status: 已完成 | 进行中 | 未开始 (or completed | active | planned)
risk: good (🟢) | caution (🟡) | risk (🔴) | none (-)
Slide 4 (This Week / Task Management) Guidance
- Purpose & Scope: Tactical weekly execution tasks, operational progress, next week steps, and immediate risks.
thisWeek: subtitle, overallStatus, previousTasks, nextSteps, risks, milestones
Slide 5+ (Discussion & Proposal Slides) Guidance (方案研讨与议题扩展页)
- Purpose & Scope: The standard 4-slide structure serves as the foundation. In enterprise weekly meetings, teams often need to discuss specific technical proposals, architectural trade-offs, process alignment, or strategic decisions. Agents can add one or more discussion slides via
discussionSlides: [...] (or appendixSlides).
- Supported Layouts:
comparison: Solution comparison mode (e.g. Option A vs Option B vs Option C). Best for architectural trade-offs, vendor comparisons, or tech stack selections. Each card supports:
title, badge (e.g. "推荐方案", "备选方案"), badgeType (recommended | alternative | warning | neutral)
summary: Short summary callout box
items: Structured key-value rows ([{label: "核心优势", text: "..."}, ...])
points: Bullet list points (["point 1", ...])
verdict: Green bottom verdict box (e.g. "结论:作为长期首选,建议本期采纳落地。")
cards: Multi-column card matrix (2, 3, or 4 columns grid). Ideal for multiple initiative reviews, workstream breakdowns, or parallel milestone status.
agenda / deep-dive: Two-column horizontal row cards (left header banner, right detailed narrative). Ideal for structured discussions: Background & Pain Points → Proposed Solutions → Expected Impact.
table: Evaluation matrix table (headers: [...], rows: [[...], ...]).
custom: Free-form HTML injection via html: "...".
- Top Badges & Category Pills:
category: Gray pill tag on top right (e.g. "架构选型", "流程规范").
badge: Theme-colored badge on top right (e.g. "方案决策", "周会决议").
- Bottom Conclusion Box (
conclusion):
- Highlights weekly meeting decisions or pending approval items (e.g.
{ badge: "周会决议待确认", text: "..." } or a plain string).
- Page Numbering: Slides are automatically numbered starting from Page 5 (
5, 6, 7...), fully integrated into Presentation Mode (1 / N) and 16:9 PDF export.
Presentation / deck mode
Generated HTML defaults to normal scroll. Enter 演示模式 from the toolbar (or press P, or open with ?present=1):
- Pages: Dynamic 1 to N slides (Cover → Timeline → Deliverables → This Week → Discussion Slides 5..N)
- Keys:
← / →, Space (next), Esc exit, F fullscreen; click left/right half of slide to navigate
- Seamless viewport fitting with zero letterboxing / black borders
- Print/PDF unchanged — each slide still prints cleanly as one 16:9 page
Interactive WYSIWYG Content Editing (所见即所得直接编辑模式)
Users can modify small phrasing or fix typos directly in the browser without asking the Agent to re-run the skill:
- Activate Edit Mode: Click the 「✏️ 编辑内容」 button in the top toolbar, press
E (when not typing), or simply double-click any text element on the slide.
- Direct Editing: Click anywhere on titles, table cells, task cards, or discussion points and edit text like in a word processor.
- Save & Export:
- Click 「💾 另存 HTML」 to download the modified standalone HTML with all text edits permanently preserved and synced to the embedded JSON data.
- Click 「导出 PDF / 打印」 to print the modified DOM to vector PDF immediately.
- Press
Esc or click 「完成编辑」 to exit edit mode.
Custom PPTX Template Support (客户定制 PPT 模板背景与资产自适应)
In enterprise customer delivery, clients frequently require weekly reports to strictly follow their own corporate PowerPoint background graphics, master layouts, logos, and color palettes. The generator supports automatic extraction and zero-dependency style binding:
CLI / Script Generation via --pptx:
python3 scripts/generate_report.py \
--data examples/sample_data.json \
--pptx "/path/to/customer_template.pptx" \
--output weekly-report.html
- Zero pip dependencies: Parses OpenXML/PKZIP directly using Python built-in standard library (
zipfile, re, xml).
- Automatic asset recognition:
- Cover slide background image (with high-contrast dark overlay gradient).
- Content slide background graphics (corporate waves, headers, footers).
- Corporate logo image (embedded as vector/data URL).
- Corporate theme palette (
accent1, accent2, accent5, dk2).
- Corporate slogan & name.
- Content cards and tables automatically apply glassmorphic backdrop blur (
rgba(255,255,255,0.94); backdrop-filter: blur(10px)) to guarantee 100% typography legibility over customer background graphics.
Interactive In-Browser PPTX Upload:
- In any generated HTML or standalone report, users can click 「🎨 导入 PPT 模板」 in the top toolbar or open 「主题调色」 drawer and click 「📁 选择 / 替换 PPT 模板」.
- Select local
.pptx file: runs in-browser client-side extraction via native browser DecompressionStream (zero external dependencies, 100% local, offline-capable and private).
- Instantly applies customer cover, content slide backgrounds, and brand colors to the live page.
- Click 「另存 HTML」 to save the configured file with the custom PPTX assets embedded permanently as Base64 data URLs.
Delivery
Attach HTML and/or PDF for the user. Prefer PDF when they need an email-ready attachment.
Files
scripts/generate_report.py, scripts/export_pdf.py, scripts/pptx_extractor.py
templates/weekly_report_template.html, templates/theme-presets.json
references/input_format_guide.md, references/data_schema.md
examples/sample_data.json
1---2name: weekly-report-generator3description: Use when generating a high-fidelity HTML/PDF weekly report (cover, Gantt timeline, deliverables status, this-week cards, and optional Slide 5+ discussion/proposal slides) from structured JSON — especially corporate project weekly reports for email or sync.4---5# Weekly Report Generator(企业高阶周报生成器)67Directory: `skills/weekly-report-generator`89Source: https://github.com/lighters/agent-skills (`skills/weekly-report-generator`)1011Produce presentation-grade HTML + PDF weekly reports (4 core slides: Cover, Gantt Work Plan Overview, Deliverables & Status, This Week / Task Management; plus optional Slide 5+ Discussion & Proposal slides for meeting topics and architectural trade-offs). Match the visual fidelity of enterprise PPT weekly reports.1213## Before generating14151. Read the input format guide: `skills/weekly-report-generator/references/input_format_guide.md`162. Optionally skim `skills/weekly-report-generator/examples/sample_data.json`173. Build a JSON data file for the target project/week (cover, timeline, deliverables, thisWeek). Do not invent status — pull from the project's task source of truth.1819## Generate2021```bash22cd skills/weekly-report-generator2324python3 scripts/generate_report.py \25 --data examples/sample_data.json \26 --theme classic-navy \27 --output weekly-report.html2829python3 scripts/export_pdf.py \30 --input weekly-report.html \31 --output weekly-report.pdf32```3334Themes: `astrazeneca` / `classic-navy`, `novartis`, `bayer`, `jnj`, `novo-nordisk`, `wukong-green`, `vercel-minimal`.3536## Work Plan Date & Holiday Constraints (CRITICAL for Agents)3738When constructing `timeline.weeks[]`, agents MUST strictly follow these business calendar rules:39401. **Strict Monday-to-Friday Work Weeks (周一至周五约束)**:41 - Every standard work week in `timeline.weeks[].dates` MUST represent **Monday to Friday** (`周一至周五`).42 - Format: `M.D-M.D` (e.g. `9.14-9.18`, `10.12-10.16`), or `YYYY.M.D-YYYY.M.D` across year boundaries.43 - Start day MUST be **Monday** (`weekday() == 0`).44 - End day MUST be **Friday** (`weekday() == 4`).45 - **DO NOT guess calendar days!** Verify with Python before writing the JSON:46 ```python47 import datetime48 d = datetime.date(2026, 9, 16)49 mon = d - datetime.timedelta(days=d.weekday()) # Monday50 fri = mon + datetime.timedelta(days=4) # Friday51 # Dates string: f"{mon.month}.{mon.day}-{fri.month}.{fri.day}" -> "9.14-9.18"52 ```53542. **Statutory Holiday Annotation (法定节假日标注)**:55 - When a week corresponds to a statutory holiday (如国庆假期、春节假期、劳动节、中秋节、端午节、清明节、元旦等):56 - Set `"isHoliday": true`57 - Set `"holidayName": "<假期名称>"` (e.g. `"国庆假期"`, `"春节假期"`)58 - The Gantt chart automatically renders the holiday week as a golden vertical highlight column with the holiday name vertically centered. Regular task bars do not occupy holiday columns.59603. **Date Validation & Auto-Fix CLI**:61 - Validate dates without generating: `python3 scripts/generate_report.py --data <file.json> --check-dates`62 - Auto-align non-holiday dates to Monday-Friday: `python3 scripts/generate_report.py --data <file.json> --fix-dates`63 - Strict mode: `python3 scripts/generate_report.py --data <file.json> --strict-dates`6465## Timeline JSON (summary)6667- `timeline.currentWeek`: week id for the "We are here" pointer68- `timeline.weeks[]`: `{ id, name, dates, isHoliday?, holidayName? }` (strictly Mon-Fri, or statutory holiday)69- `timeline.tasks[]`: `{ workstream, category, task, start, end, status, milestone? }` or `spans[]` for multi-phase bars70- task `status`: `completed` | `active` | `planned`7172## Slide 3 (Deliverables / Output Status) Guidance (CRITICAL for Agents)7374- **Purpose & Scope**: Focus **strictly on major project deliverables and key strategic milestones** (主要交付物与核心里程碑跟进,如各阶段成果确认、系统开发完成、SIT/UAT 验收签收、系统正式上线 Go-Live 等).75- **DO NOT write granular task progress here**: Everyday tactical tasks, operational bug fixes, or low-level implementation details **belong on Slide 4 (`thisWeek`)**, NEVER on Slide 3.76- `deliverables.items[]`: `{ milestone, progress, date, status, risk }`77 - `milestone`: Major deliverable or milestone gate name (e.g. `手机端&web端重点功能系统开发完成`, `业务验收测试(UAT)签收`)78 - `progress`: High-level summary of deliverables readiness (1-2 sentences, or `-` if pending)79 - `date`: Target delivery date (`YYYY.M.D`)80 - `status`: `已完成` | `进行中` | `未开始` (or `completed` | `active` | `planned`)81 - `risk`: `good` (🟢) | `caution` (🟡) | `risk` (🔴) | `none` (-)8283## Slide 4 (This Week / Task Management) Guidance8485- **Purpose & Scope**: Tactical weekly execution tasks, operational progress, next week steps, and immediate risks.86- `thisWeek`: `subtitle`, `overallStatus`, `previousTasks`, `nextSteps`, `risks`, `milestones`8788## Slide 5+ (Discussion & Proposal Slides) Guidance (方案研讨与议题扩展页)8990- **Purpose & Scope**: The standard 4-slide structure serves as the foundation. In enterprise weekly meetings, teams often need to discuss specific technical proposals, architectural trade-offs, process alignment, or strategic decisions. Agents can add one or more discussion slides via `discussionSlides: [...]` (or `appendixSlides`).91- **Supported Layouts**:92 1. `comparison`: Solution comparison mode (e.g. Option A vs Option B vs Option C). Best for architectural trade-offs, vendor comparisons, or tech stack selections. Each card supports:93 - `title`, `badge` (e.g. `"推荐方案"`, `"备选方案"`), `badgeType` (`recommended` | `alternative` | `warning` | `neutral`)94 - `summary`: Short summary callout box95 - `items`: Structured key-value rows (`[{label: "核心优势", text: "..."}, ...]`)96 - `points`: Bullet list points (`["point 1", ...]`)97 - `verdict`: Green bottom verdict box (e.g. `"结论:作为长期首选,建议本期采纳落地。"`)98 2. `cards`: Multi-column card matrix (2, 3, or 4 columns grid). Ideal for multiple initiative reviews, workstream breakdowns, or parallel milestone status.99 3. `agenda` / `deep-dive`: Two-column horizontal row cards (left header banner, right detailed narrative). Ideal for structured discussions: Background & Pain Points → Proposed Solutions → Expected Impact.100 4. `table`: Evaluation matrix table (`headers: [...]`, `rows: [[...], ...]`).101 5. `custom`: Free-form HTML injection via `html: "..."`.102- **Top Badges & Category Pills**:103 - `category`: Gray pill tag on top right (e.g. `"架构选型"`, `"流程规范"`).104 - `badge`: Theme-colored badge on top right (e.g. `"方案决策"`, `"周会决议"`).105- **Bottom Conclusion Box (`conclusion`)**:106 - Highlights weekly meeting decisions or pending approval items (e.g. `{ badge: "周会决议待确认", text: "..." }` or a plain string).107- **Page Numbering**: Slides are automatically numbered starting from Page 5 (`5`, `6`, `7`...), fully integrated into Presentation Mode (1 / N) and 16:9 PDF export.108109## Presentation / deck mode110111Generated HTML defaults to normal scroll. Enter **演示模式** from the toolbar (or press `P`, or open with `?present=1`):112113- Pages: Dynamic 1 to N slides (Cover → Timeline → Deliverables → This Week → Discussion Slides 5..N)114- Keys: `←` / `→`, `Space` (next), `Esc` exit, `F` fullscreen; click left/right half of slide to navigate115- Seamless viewport fitting with zero letterboxing / black borders116- Print/PDF unchanged — each slide still prints cleanly as one 16:9 page117118## Interactive WYSIWYG Content Editing (所见即所得直接编辑模式)119120Users can modify small phrasing or fix typos directly in the browser without asking the Agent to re-run the skill:121122- **Activate Edit Mode**: Click the **「✏️ 编辑内容」** button in the top toolbar, press `E` (when not typing), or simply **double-click** any text element on the slide.123- **Direct Editing**: Click anywhere on titles, table cells, task cards, or discussion points and edit text like in a word processor.124- **Save & Export**:125 - Click **「💾 另存 HTML」** to download the modified standalone HTML with all text edits permanently preserved and synced to the embedded JSON data.126 - Click **「导出 PDF / 打印」** to print the modified DOM to vector PDF immediately.127 - Press `Esc` or click **「完成编辑」** to exit edit mode.128129## Custom PPTX Template Support (客户定制 PPT 模板背景与资产自适应)130131In enterprise customer delivery, clients frequently require weekly reports to strictly follow their own corporate PowerPoint background graphics, master layouts, logos, and color palettes. The generator supports automatic extraction and zero-dependency style binding:1321331. **CLI / Script Generation via `--pptx`**:134 ```bash135 python3 scripts/generate_report.py \136 --data examples/sample_data.json \137 --pptx "/path/to/customer_template.pptx" \138 --output weekly-report.html139 ```140 - **Zero pip dependencies**: Parses OpenXML/PKZIP directly using Python built-in standard library (`zipfile`, `re`, `xml`).141 - **Automatic asset recognition**:142 - Cover slide background image (with high-contrast dark overlay gradient).143 - Content slide background graphics (corporate waves, headers, footers).144 - Corporate logo image (embedded as vector/data URL).145 - Corporate theme palette (`accent1`, `accent2`, `accent5`, `dk2`).146 - Corporate slogan & name.147 - Content cards and tables automatically apply glassmorphic backdrop blur (`rgba(255,255,255,0.94); backdrop-filter: blur(10px)`) to guarantee 100% typography legibility over customer background graphics.1481492. **Interactive In-Browser PPTX Upload**:150 - In any generated HTML or standalone report, users can click **「🎨 导入 PPT 模板」** in the top toolbar or open **「主题调色」** drawer and click **「📁 选择 / 替换 PPT 模板」**.151 - Select local `.pptx` file: runs in-browser client-side extraction via native browser `DecompressionStream` (zero external dependencies, 100% local, offline-capable and private).152 - Instantly applies customer cover, content slide backgrounds, and brand colors to the live page.153 - Click **「另存 HTML」** to save the configured file with the custom PPTX assets embedded permanently as Base64 data URLs.154155## Delivery156157Attach HTML and/or PDF for the user. Prefer PDF when they need an email-ready attachment.158159## Files160161- `scripts/generate_report.py`, `scripts/export_pdf.py`, `scripts/pptx_extractor.py`162- `templates/weekly_report_template.html`, `templates/theme-presets.json`163- `references/input_format_guide.md`, `references/data_schema.md`164- `examples/sample_data.json`