elegant-reports
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseelegant-reports
elegant-reports
Generate minimalist PDF reports inspired by Scandinavian editorial design.
生成受北欧编辑设计启发的极简PDF报告。
When to Use
使用场景
Use this skill when the user wants:
- polished executive briefings or board-style reports
- presentation-like PDFs generated from markdown
- a clean Nordic visual language instead of default developer styling
- a reusable report template system that can be extended carefully
当用户有以下需求时使用本技能:
- 制作精致的高管简报或董事会风格报告
- 从Markdown生成演示风格的PDF
- 采用简洁的北欧视觉语言,替代默认的开发者风格
- 使用可谨慎扩展的可复用报告模板系统
Quick Start
快速开始
Install the pinned dependencies from , then run:
package-lock.jsonbash
cd /path/to/elegant-reports
node ./generate.js --list
node ./generate.js examples/sample-executive.md output.pdf --template executive --theme lightFor HTML debugging, add so the generator saves the rendered HTML alongside the PDF.
--output-html从安装固定版本的依赖,然后运行:
package-lock.jsonbash
cd /path/to/elegant-reports
node ./generate.js --list
node ./generate.js examples/sample-executive.md output.pdf --template executive --theme light如需调试HTML,添加参数,生成器会在PDF旁保存渲染后的HTML文件。
--output-htmlAvailable Templates
可用模板
| Template | Use Case |
|---|---|
| polished briefings and compact executive summaries |
| denser narrative reports and analysis writeups |
| bold slide-like outputs with one idea per page |
| legacy report variant for comparison/testing |
| legacy presentation variant for comparison/testing |
Each template supports and themes where available.
lightdark| 模板名称 | 适用场景 |
|---|---|
| 精致简报和紧凑的高管摘要 |
| 内容更密集的叙事报告和分析文稿 |
| 每页一个核心观点的醒目幻灯片式输出 |
| 用于对比/测试的旧版报告变体 |
| 用于对比/测试的旧版演示变体 |
每个模板在可用情况下支持(浅色)和(深色)主题。
lightdarkFrontmatter
YAML前置元数据
Add YAML frontmatter to control the rendered output:
markdown
---
title: Q4 Competitive Analysis
subtitle: Market Intelligence Report
author: Report Author
template: report
theme: dark
---
Your content here...添加YAML前置元数据以控制渲染输出:
markdown
---
title: Q4 Competitive Analysis
subtitle: Market Intelligence Report
author: Report Author
template: report
theme: dark
---
您的内容在这里...Workflow
工作流程
- Pick the closest existing template instead of starting from scratch.
- Write or refine the source markdown.
- Generate a PDF.
- If layout tuning is needed, inspect the emitted HTML with and adjust the corresponding template/theme pair.
--output-html - Re-run until the design is clean and the PDF is stable.
- 选择最接近需求的现有模板,而非从零开始构建
- 编写或优化源Markdown内容
- 生成PDF
- 如需调整布局,使用参数查看生成的HTML,并调整对应的模板/主题组合
--output-html - 重新运行生成,直到设计简洁且PDF稳定
Extending the Skill
扩展本技能
When authoring a new visual variant:
- start from the nearest bundled template and theme
- keep token names and spacing scales consistent with the existing system
- make one visual change at a time and regenerate after each step
- prefer additive variants over rewriting the whole design language
- keep legacy/demo templates available until the replacement is verified
The bundled Nordic design research note is the canonical reference for the visual system. Read it only when you need deeper design rationale.
创建新视觉变体时:
- 从最接近的内置模板和主题开始
- 保持令牌名称和间距比例与现有系统一致
- 每次仅做一处视觉修改,修改后重新生成
- 优先添加变体,而非重写整个设计语言
- 在替代方案验证通过前,保留旧版/演示模板
内置的北欧设计研究笔记是视觉系统的权威参考,仅在需要深入了解设计原理时阅读。
Safety Boundaries
安全边界
- Do not send sensitive source documents to third-party services unless the user explicitly requested PDF generation through Nutrient DWS and accepts that network boundary.
- Do not browse arbitrary local files. Limit reads to the skill bundle and user-approved input/output paths.
- Do not overwrite or delete files outside the user-approved working directory.
- Do not install extra packages, change dependency versions, or add new external services unless the user explicitly asks for that setup work.
- Do not claim a report was generated successfully unless the output artifact exists and the generator completed without error.
- Do not fetch external design inspiration or web references unless the user explicitly wants fresh visual research.
- 除非用户明确要求通过Nutrient DWS生成PDF并接受网络边界限制,否则不得将敏感源文档发送至第三方服务
- 不得浏览任意本地文件,仅允许读取技能包和用户批准的输入/输出路径
- 不得覆盖或删除用户批准工作目录之外的文件
- 除非用户明确要求配置工作,否则不得安装额外包、更改依赖版本或添加新的外部服务
- 只有当输出文件存在且生成器无错误完成时,才能报告生成成功
- 除非用户明确需要新的视觉研究,否则不得获取外部设计灵感或网页参考
Dependencies
依赖项
- Node.js 18+
- pinned npm dependencies from
package-lock.json - environment variable for PDF generation
NUTRIENT_DWS_API_KEY
- Node.js 18+
- 中固定版本的npm依赖
package-lock.json - 用于PDF生成的环境变量
NUTRIENT_DWS_API_KEY
File Map
文件结构
- main generator CLI and module entrypoint
- bundled HTML templates
- bundled visual themes
- sample markdown input
- optional deeper design rationale bundled with the skill
- 主生成器CLI和模块入口
- 内置HTML模板
- 内置视觉主题
- 示例Markdown输入
- 技能包附带的可选深度设计原理文档
Validation
验证步骤
Before calling the skill done:
- run
node ./generate.js --list - run
npm test - verify the expected PDF or HTML artifact exists in the requested output path
在标记技能完成前:
- 运行
node ./generate.js --list - 运行
npm test - 验证预期的PDF或HTML文件是否存在于指定的输出路径