pptx-slide-specification
它能做什么
这个工具通过精确定义每个元素(文字、图片等)在页面上的位置,帮助你创建或修复演示文稿文件(PPTX)。你以英寸为单位指定位置和尺寸,确保一切都与你的设想完全一致。
适用场景
- ✓想完全掌控每张幻灯片的设计时。
- ✓需要保证演示文稿外观统一、精确时。
- ✓修复现有演示文稿中的位置问题时。
技能链接
https://github.com/wshobson/agents/blob/main/plugins/pptx-deck-creation/skills/pptx-slide-specification/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为一张幻灯片创建 JSON 规格,包含标题“My Title”、一段文字和一张图片,并精确设置每个元素的位置。”
每周 5 个新技能,1 分钟读完。
工作原理
你提供一个 JSON 文件,描述每张幻灯片,包括尺寸、元素(如文字和图片)、它们的精确位置(以英寸为单位)以及样式。工具会根据这份描述生成最终的 PPTX 文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PPTX Slide Specification
Author final coordinates directly in layout_tree. No renderer may decide placement, shrink text, or infer layout after the audit.
Required contract
- The root JSON contains
summaryandslides. - Every slide has a stable
id, a message-ledtitle, an accessibility reading order, and a completelayout_tree. - A layout tree declares slide size, root group, id-keyed groups and objects, final inch bboxes, styles, z-indexes, and classifications.
- Every meaningful object has
id,kind,role,classification,content,style,bbox, andz_index. - Production
summarycontains an explicitlayout_policy(safe margin, content bottom, footer top, minimum gap) and accessibility metadata.
Authoring rules
- Use stable readable IDs, absolute groups, and positive inch dimensions.
- Keep normal content inside the safe margin and above the footer rail. Only background
layout_designobjects may be full bleed. - Use native
text,shape,line,table, andimageobjects. Recreate labels and values from any supporting visual as native objects. - Give meaningful images alt text. Record
source_reffor sourced claims. - Keep content text at 9 pt or greater; shorten, resize, or split dense content before reducing type.
- Use shared grids, consistent gaps, explicit color, explicit font size, and an intentional z-order.
Build contract
A task-local builder starts from a blank slide layout and maps all bboxes with Inches(...). Explicitly set wrapping, disabled auto-size, text insets, anchors, alignment, fonts, colors, line settings, image aspect ratio, and hidden-slide state. Reject zero or negative geometry before adding an object.
See references/layout-contract.md for the compact schema and repair guidance.
常见问题
什么是“layout_tree”?
它是描述幻灯片上所有元素如何组织和定位的结构,类似组件树。
为什么用英寸作为尺寸单位?
使用英寸可以确保尺寸精确,不会因屏幕或打开演示文稿的软件不同而变化。
“no renderer may decide placement”是什么意思?
意思是渲染器不得自行决定元素位置。工具不会猜测或自动调整版式,而是由你明确告诉它要怎么做。
详情
作者的原始描述
Use when authoring or repairing a coordinate-explicit JSON specification for an editable PPTX deck.
repo: wshobson/agents
热度
- GitHub 星标
- 41k
- 排名
- #6752
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …