poetry-card
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 "poetry-card" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5cd4152e94c14ea067b778fccfff58a2b05ca2ea9b0a9f95751469dad826b4b2. Verify the upstream source and version against https://skillhub.cn/skills/org-z78axpch/poetry-card 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
A classical-poetry card generator. Enter a poem title to automatically create a mood background image and an assembled appreciation card.
Introduction source: third_party · org-z78axpch · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: poetry-card
description: 古诗词卡片生成器。当用户提到古诗名(如"来一首《静夜思》"、"做个《登鹳雀楼》的卡片"、"生成诗词卡片")时使用。根据诗名自动查找诗文内容,生成意境背景图,填入装配式 HTML 卡片模板,产出可预览、可下载的 PNG 古诗词赏析卡片。
version: 1.0.0
category: 文学创作
tags:
- 古诗词
- 卡片
- 教育
- 传统文化
platforms:
- WorkBuddy
agent_created: true古诗词卡片生成器
用途
将一首古诗词变成一张精美的赏析卡片 HTML 页面,结构上模拟传统书册装帧风格,支持一键导出高清 PNG。
触发条件
当用户说出古诗名,或类似以下请求时触发:
- "来一首《XXX》"
- "做个《XXX》的卡片"
- "生成《XXX》诗词卡"
工作流程
Step 1 — 获取诗文数据
根据用户指定的诗名,获取以下内容:
- 标题 (title):诗题
- 作者 (author):诗人姓名
- 朝代 (dynasty):所属朝代
- 原文 (original):完整诗句,每句为数组中的一个元素,标点保留在句末
优先使用自身知识库中的准确诗文。若不确定,可联网搜索确认。
Step 2 — 生成意境背景图
使用 ImageGen 工具生成一张契合诗意的背景图。要求:
| 维度 | 规格 |
|---|---|
| 风格 | 中国传统水墨画 / 国画风,淡雅写意 |
| 构图 | 宽幅(横版),适配卡片背景 |
| 色调 | 柔和,不喧宾夺主,留白充足 |
| 内容 | 紧扣诗中意象(山水、花鸟、月、竹、雨、雪等) |
| 尺寸 | 1536×1024 |
| quality | high |
| output_dir | 当前 workspace 目录 |
| 禁止 | 图片中不能有文字 |
提示词公式:Chinese ink wash painting, [诗中意象描述], traditional Chinese landscape style, delicate brushwork, serene atmosphere, soft [色调] tones, wide horizontal composition, no text
背景图生成后保存在当前 workspace,文件名将被引用到 HTML 中。
Step 3 — 确定色彩方案
从生成的背景图中提取色调,确定三个颜色:
| 色位 | 含义 | 用途 |
|---|---|---|
| 主色 (COLOR_P) | 从背景图中提取的主色调 | 书脊、诗题、小标题、分数线、方块标记、边框 |
| 点缀色 (COLOR_A) | 主色的互补/暖调配色 | 四角角花圆点、分隔符菱形块 |
| 思考底色 (COLOR_TBG) | 主色的极浅版本 | 思考题区域底色(会叠加 0.65 alpha) |
颜色选择原则:
- 主色取背景图中面积最大的中深色调,饱和度和明度适中
- 点缀色取背景图中的暖色或花鸟色,与主色形成一冷一暖的对比
- 思考底色在主色基础上提亮,hex 值末尾两位偏大(如 #eef4ef)
Step 4 — 撰写译文
将古诗翻译为诗意白话文。核心原则:
- 不逐字对译,用散文化的流畅中文
- 不限制字数,诗句短译文可长,诗句长译文可精
- 保持诗意,带轻微的文学腔,像一小段赏析文字而非生硬翻译
- 连贯成段,译文为一个整体段落(不按原诗断句),内部用句号自然衔接
- 翻译存储在
poem.translation数组中,每句一个元素,渲染时join('')拼接为一段
Step 5 — 撰写思考题
编写 3 道思考题。要求:
- 第 1 题:从诗的开篇或核心意象切入,引导读者代入感受
- 第 2 题:聚焦某个关键句或修辞手法,探讨深层含义
- 第 3 题:从整体结构或意象群的呼应关系提一个赏析视角
每题 1-2 句话,口语化但有一定深度,避免说教语气。
Step 6 — 渲染卡片
- 复制
assets/template.html到当前 workspace,重命名为poem-card-{{标题}}.html - 将模板中的占位符替换为实际数据:
| 占位符 | 替换内容 |
|---|---|
| {{TITLE}} | 诗题 |
| {{AUTHOR}} | 作者 |
| {{DYNASTY}} | 朝代 |
| {{BG_IMAGE}} | Step 2 生成的背景图文件名 |
| {{COLOR_P}} | 主色 hex |
| {{COLOR_A}} | 点缀色 hex |
| {{COLOR_TBG}} | 思考底色 hex |
| {{ORIGINAL}} | 原文数组,每句用 JS 字符串格式,如 '春眠不觉晓,', |
| {{TRANSLATION}} | 译文数组,每句用 JS 字符串格式 |
| {{THINKING}} | 思考题数组,每题用 JS 字符串格式 |
- 确认所有占位符已替换完毕
Step 7 — 呈现结果
使用 present_files 展示生成的 HTML 文件。
设计规范(参考)
以下规范已在 assets/template.html 中固定实现,此处仅供查阅。
版面结构
| 元素 | 规格 |
|---|---|
| 卡片宽度 | 780px,最小高度 480px,自适高度 |
| 底色 | #f9f6ef(宣纸米白) |
| 外框 | 2px solid 边框 + 6px outline,形成双层书匣感 |
装饰元素(五层)
- 左侧书脊色带 — 28px 宽,主色填充,竖排显示"诗题·作者"
- 右侧竹节装饰 — 22px 宽,SVG 动态绘制竹节圆头,间距 60px,跟随卡片高度自适应
- 四角角花边框 — 44×44px SVG,主色 L 形角架 + 点缀色圆点 + 辅助点线,四角镜像放置
红色印章— 已移除,不使用- 装饰元素与内容区边缘均留出 30px 空白
字体
| 用途 | 字体 | 字号 | 备注 |
|---|---|---|---|
| 诗题 | Ma Shan Zheng | 32px | Google Fonts 马善政毛笔楷体 |
| 书脊竖排 | Ma Shan Zheng | 13px | 白色文字 |
| 作者 | ZCOOL XiaoWei | 14px | 70% 透明度 |
| 朝代 | ZCOOL XiaoWei | 12px | 55% 透明度 |
| 原文 | ZCOOL XiaoWei | 18px | 行高 2.4,字距 1.5px |
| 译文 | ZCOOL XiaoWei | 14px | 行高 2.2,透明度 0.82,连贯段落不分段 |
| 小标题(原/译/思考题) | ZCOOL XiaoWei | 11px | 字距 3px,透明度 0.5-0.6 |
| 思考题正文 | ZCOOL XiaoWei | 12px | 行高 2.0,透明度 0.85 |
内容排版
- 诗题栏:标题居中,右侧同行显示作者和朝代,下方有主色分隔线
- 正文区:三栏 Grid — 原文(左)| 1px 分隔线 | 译文(右),column gap 24px
- 思考题:上方有"◆—— 沉思一刻 ——◆"装饰分隔线,方块区域底色为思考底色 × 0.65 alpha
- 每题前有 8×8px 主色实心方块标记
交互功能
- 顶部色条可实时调整三个颜色
- "下载卡片 PNG"按钮,html2canvas 3× 高清导出
注意事项
- 不要添加编辑器/表单面板
- 卡片为纯展示页,数据硬编码在
poemJS 对象中 - 每次生成新诗卡片时,使用模板重新填充,不要手动修改非数据部分
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 面向古诗词教育与文化传播,具有明确实用价值
- 生成可下载的 PNG 卡片,满足用户分享与学习需求
Highlights
- 触发词覆盖典型用户表达,边界清晰,误触风险低
Areas to improve
-
缺少端到端示例 Reported severity: Minor
文档未展示完整生成效果或模拟数据示例
Recommendation: 补充一个完整示例(如《静夜思》卡片生成全流程)以增强可理解性
Highlights
- 工作流程分步清晰,含7个明确步骤与出口条件
- 设计规范详尽,涵盖版面、字体、装饰元素等细节
Areas to improve
-
引用文件缺失风险 Reported severity: Major
流程中依赖 assets/template.html 模板文件,但未确认其是否包含在 Skill 包中
Recommendation: 确保 assets/template.html 随 Skill 包一同上传,或在文档中说明模板生成方式
-
异常处理未覆盖 Reported severity: Minor
未处理诗名不存在、ImageGen 失败等常见异常场景
Recommendation: 增加异常处理逻辑,如诗名未找到时提示用户重新输入
Highlights
- 工具调用参数明确(ImageGen 尺寸、风格、output_dir 等)
- 流程闭环完整,从数据获取到结果展示覆盖全面
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.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.