deckcraft
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeckCraft
DeckCraft
Operate DeckCraft through its structured automation interfaces, preserving editable slides and the user's chosen presentation.
通过 DeckCraft 的结构化自动化接口进行操作,同时保持幻灯片可编辑以及用户选定的演示文稿版本。
References
参考资料
Read references/control-protocol.md before constructing desktop requests. It is an unmodified upstream snapshot downloaded on 2026-11-02.
Source: DeckCraft control protocol. The documentation is distributed under the bundled MIT license. Relative links in the snapshot resolve against .
https://github.com/storytold/deckcraft/blob/main/docs/For MCP tools and session modes, consult the upstream MCP documentation. The repository documents installation and supported workflows. Discover installed command parameters when they differ from the snapshot; do not borrow flags or schemas from other ArtCraft applications.
在构造桌面请求之前,请阅读 references/control-protocol.md。这是一份未经修改的上游快照,下载于 2026-11-02。
来源:DeckCraft 控制协议。文档依据 随附的 MIT 许可证 发布。快照中的相对链接基于 解析。
https://github.com/storytold/deckcraft/blob/main/docs/Locate the executables and choose the session
定位可执行文件并选择会话
Discover available DeckCraft tools, executables, and existing sessions first. Prefer a connected MCP server when available.
- For the user's open presentation, use desktop control or . This operates the same deck as the visible app.
deckcraft-cli mcp --connect PORT - For independent file processing, starts its own headless engine. Open the intended presentation before editing it; this session does not change the user's live window.
deckcraft-cli mcp - For one-off file operations, use ,
deckcraft-cli info,run, orrender. Each invocation has its own session. Useconvertto continue work on a saved deck;run --in FILEloads the built-in sample, not the user's presentation.--sample
Check on POSIX or on Windows. If absent from PATH, inspect application install locations. On macOS, look for in and or use , then inspect . Do not invent an executable path.
command -v deckcraft deckcraft-cliwhere deckcraft deckcraft-cliDeckCraft.app/Applications~/Applicationsmdfind -name DeckCraft.appContents/MacOS/Start a needed desktop session with ; 7990 is an upstream example. Reuse an existing session where possible. A missing CLI does not prevent direct TCP control of the desktop app. If neither an executable nor a usable connection is available, report the missing prerequisite. This skill does not install DeckCraft or configure MCP servers.
deckcraft --control PORT首先发现可用的 DeckCraft 工具、可执行文件和已有会话。若有已连接的 MCP 服务器,优先使用。
- 针对用户已打开的演示文稿,使用桌面控制或 。这会操作与可见应用相同的文稿。
deckcraft-cli mcp --connect PORT - 对于独立的文件处理,会启动自己的无头引擎。编辑前请先打开目标演示文稿;该会话不会改变用户当前可见的窗口。
deckcraft-cli mcp - 对于一次性的文件操作,使用 、
deckcraft-cli info、run或render。每次调用都有各自独立的会话。使用convert可继续处理已保存的文稿;run --in FILE加载的是内置示例,而非用户的演示文稿。--sample
在 POSIX 系统上检查 ,在 Windows 上检查 。若不在 PATH 中,则检查应用的安装位置。在 macOS 上,可在 和 中查找 ,或使用 ,然后查看 。不要臆造可执行文件路径。
command -v deckcraft deckcraft-cliwhere deckcraft deckcraft-cli/Applications~/ApplicationsDeckCraft.appmdfind -name DeckCraft.appContents/MacOS/需要时使用 启动桌面会话;7990 是上游示例。应尽可能复用已有会话。缺少 CLI 并不妨碍直接通过 TCP 控制桌面应用。如果既没有可执行文件也没有可用连接,请报告缺失的前置条件。本 skill 不会安装 DeckCraft,也不会配置 MCP 服务器。
deckcraft --control PORTControl transport and discovery
控制传输与发现
Desktop control uses loopback TCP with newline-delimited JSON, not HTTP or MCP JSON-RPC. Send one request per line, match replies by , and check before dependent actions:
idokjson
{"id":1,"method":"document.inspect"}
{"id":2,"method":"ui.inspect"}
{"id":3,"method":"engine.commands"}Use for command IDs, parameter documentation, and enabled or disabled reasons. Execute a command through with . With MCP, discover tool schemas and use , , or the dedicated tools. Inspect tool errors as well as transport success.
engine.commandsengine.execute{command, params}list_commandsrun_commandThe CLI distinguishes engine commands from control methods. The protocol snapshot's final shorthand omits this distinction; the upstream CLI uses for control methods:
--methodsh
deckcraft-cli commands format.
deckcraft-cli describe shape.insert
deckcraft-cli app --port 7990 --method document.inspect
deckcraft-cli app --port 7990 shape.insert '{"preset":"roundRect","rect":[100,100,240,120],"text":"Hello"}'Check the installed CLI usage if it differs. If a mutation times out or loses its reply, inspect the resulting presentation before retrying; repeated insertion can duplicate slides or shapes. MCP stops at the first error, so inspect partial results before continuing.
batch桌面控制使用回环 TCP 和以换行符分隔的 JSON,而不是 HTTP 或 MCP JSON-RPC。每行发送一个请求,按 匹配响应,并在执行依赖性操作前检查 字段:
idokjson
{"id":1,"method":"document.inspect"}
{"id":2,"method":"ui.inspect"}
{"id":3,"method":"engine.commands"}使用 获取命令 ID、参数文档以及启用或禁用的原因。通过 以 执行命令。使用 MCP 时,需发现工具 schema 并使用 、 或专用工具。除了传输层是否成功外,也需检查工具本身的错误。
engine.commandsengine.execute{command, params}list_commandsrun_commandCLI 会区分引擎命令与控制方法。协议快照的最终简写省略了这一区分;上游 CLI 对控制方法使用 :
--methodsh
deckcraft-cli commands format.
deckcraft-cli describe shape.insert
deckcraft-cli app --port 7990 --method document.inspect
deckcraft-cli app --port 7990 shape.insert '{"preset":"roundRect","rect":[100,100,240,120],"text":"Hello"}'若已安装的 CLI 用法有所不同,请以实际为准。如果某个变更操作超时或响应丢失,请在重试前检查当前演示文稿状态;重复插入可能导致幻灯片或形状重复。MCP 的 会在遇到第一个错误时停止,因此继续之前先检查部分执行结果。
batchSlides and editable content
幻灯片与可编辑内容
Inspect the deck, active slide, layouts, sections, shapes, and selection before targeting edits. MCP provides and ; desktop provides . Use actual returned IDs, and distinguish shape IDs from slide indices. Establish the active slide and selection when a command depends on them.
inspect_documentinspect_slidedocument.inspectPrefer structured commands or dedicated MCP tools for precise edits. Discover , , , , , , and as needed. MCP also offers , , , , , , , and . Inspect each schema before using it. Preserve themes, layouts, placeholders, notes, and editable content when they suit the request; check the replacement scope before setting text.
slide.newshape.insertshape.connectformat.*design.themetable.*chart.*add_slidego_to_slideadd_shapeadd_text_boxset_textinsert_pictureinsert_tableinsert_chartGeometry is in slide points (1/72 inch); the documented 16:9 slide is 960 × 540. Inspect the actual slide size for custom decks, and confirm rectangle parameter semantics before positioning content. CLI uses zero-based indices; check other tools' schemas rather than assuming a displayed slide number is their index.
render --slide NFor gestures, select the tool with and send slide-space events through . In contrast, , , and use screen points. Inspect window, canvas, and slide rectangles before screen interaction. Keyboard, text, and IME input act on the current focus and can also drive a slide show; use structured text editing when deterministic targeting matters.
ui.tool.selectui.pointerui.moveui.clickui.drag在定位编辑目标之前,先检查文稿、当前活动幻灯片、版式、分节、形状和选区。MCP 提供 和 ;桌面端提供 。使用实际返回的 ID,并区分形状 ID 与幻灯片索引。当命令依赖特定状态时,先确认活动幻灯片和选区。
inspect_documentinspect_slidedocument.inspect优先使用结构化命令或专用 MCP 工具进行精确编辑。按需发现 、、、、、 和 。MCP 还提供 、、、、、、 和 。使用前请检查每个工具的 schema。当主题、版式、占位符、备注和可编辑内容符合需求时应予以保留;设置文本前请确认替换范围。
slide.newshape.insertshape.connectformat.*design.themetable.*chart.*add_slidego_to_slideadd_shapeadd_text_boxset_textinsert_pictureinsert_tableinsert_chart几何尺寸以幻灯片点数(1/72 英寸)为单位;文档中的 16:9 幻灯片为 960 × 540。对于自定义文稿,请检查实际幻灯片尺寸,并在定位内容前确认矩形参数的语义。CLI 的 使用从零开始的索引;其他工具的索引规则请检查其 schema,不要假定显示的幻灯片编号就是其索引。
render --slide N对于手势操作,使用 选择工具,并通过 发送幻灯片坐标空间的事件;相比之下,、 和 使用屏幕坐标。进行屏幕交互前请检查窗口、画布和幻灯片的矩形区域。键盘、文本和输入法(IME)输入作用于当前焦点,也可驱动幻灯片放映;当需要确定性定位时,请使用结构化文本编辑。
ui.tool.selectui.pointerui.moveui.clickui.dragPresentations and previews
演示与预览
Discover and before adding effects. Use and for a requested live slide show, inspecting the current show state first. Test timing, builds, navigation, and media playback in the show when those are part of the task; a static render cannot verify them.
transition.setanimation.setshow.startshow.endUse or MCP to inspect slide artwork. Use or connected MCP for window and dialog state. MCP exposes control methods only in connected mode.
ui.renderrender_slideui.screenshotscreenshotcall_appFor saved decks, render all slides for review:
sh
deckcraft-cli info presentation.deckcraft
deckcraft-cli render presentation.deckcraft --all --scale 1 previews/View the generated images and check text overflow, clipping, alignment, contrast, image crops, chart labels, and consistency across layouts. Rendering is available headlessly and does not require a visible application window.
添加效果前,先发现 和 。若用户请求现场幻灯片放映,使用 和 ,并先检查当前放映状态。当任务包含计时、分步构建(builds)、导航和媒体播放时,请在放映中验证;静态渲染无法验证这些内容。
transition.setanimation.setshow.startshow.end使用 或 MCP 检查幻灯片画面。使用 或已连接的 MCP 获取窗口和对话框状态。MCP 的 仅在连接模式下暴露控制方法。
ui.renderrender_slideui.screenshotscreenshotcall_app对于已保存的文稿,渲染所有幻灯片以供审阅:
sh
deckcraft-cli info presentation.deckcraft
deckcraft-cli render presentation.deckcraft --all --scale 1 previews/查看生成的图像,检查文本溢出、裁切、对齐、对比度、图片裁剪、图表标签以及各版式之间的一致性。渲染可以在无头环境下进行,无需可见的应用窗口。
Save, export, and verify
保存、导出与验证
Use desktop , , and , or MCP , , and . Discover format-specific parameters instead of guessing schemas. Keep an editable or requested deliverable and export PDF, images, or outlines separately as needed.
app.openapp.saveapp.exportopen_presentationsave_presentationexport.deckcraft.pptxCLI accepts repeated arguments, then and/or . Save between separate CLI invocations; their in-memory edits are not shared. Image conversion through exports only the first slide; use for a complete set of slide previews. PDF export can distinguish slides, notes pages, and handouts through parameters; confirm the requested layout and scope.
run--cmd 'ID=JSON'--save OUT--export OUTconvertrender --allfile.exportVerify save/export results and that output files exist and are readable. Reopen or inspect the saved presentation when checking persistence, and review the exported artifact when format fidelity matters, especially after PowerPoint exchange. Return output paths and any material rendering or compatibility issues.
使用桌面端 、 和 ,或 MCP 的 、 和 。请先发现与格式相关的参数,不要猜测 schema。保留可编辑的 或用户要求的 交付物,并按需单独导出 PDF、图片或大纲。
app.openapp.saveapp.exportopen_presentationsave_presentationexport.deckcraft.pptxCLI 的 支持重复传入 参数,随后使用 和/或 。在多次独立的 CLI 调用之间需进行保存;它们的内存编辑不会共享。通过 进行图片转换只会导出第一页幻灯片;如需完整的幻灯片预览集,请使用 。PDF 导出可通过 参数区分幻灯片、备注页和讲义;请确认所请求的版式与范围。
run--cmd 'ID=JSON'--save OUT--export OUTconvertrender --allfile.export验证保存/导出的结果,确认输出文件存在且可读。在检查持久化效果时,请重新打开或检查已保存的演示文稿;当格式保真度重要时(尤其在与 PowerPoint 交换之后),请审阅导出的产物。返回输出路径以及任何实质性的渲染或兼容性问题。