deckcraft

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DeckCraft

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/
解析。
关于 MCP 工具和会话模式,请查阅上游 MCP 文档。代码仓库记录了安装方式和受支持的工作流。当实际安装的命令参数与快照不一致时,以实际发现为准;不要套用其他 ArtCraft 应用的标志(flags)或 schema。

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
    deckcraft-cli mcp --connect PORT
    . This operates the same deck as the visible app.
  • For independent file processing,
    deckcraft-cli mcp
    starts its own headless engine. Open the intended presentation before editing it; this session does not change the user's live window.
  • For one-off file operations, use
    deckcraft-cli info
    ,
    run
    ,
    render
    , or
    convert
    . Each invocation has its own session. Use
    run --in FILE
    to continue work on a saved deck;
    --sample
    loads the built-in sample, not the user's presentation.
Check
command -v deckcraft deckcraft-cli
on POSIX or
where deckcraft deckcraft-cli
on Windows. If absent from PATH, inspect application install locations. On macOS, look for
DeckCraft.app
in
/Applications
and
~/Applications
or use
mdfind -name DeckCraft.app
, then inspect
Contents/MacOS/
. Do not invent an executable path.
Start a needed desktop session with
deckcraft --control PORT
; 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 工具、可执行文件和已有会话。若有已连接的 MCP 服务器,优先使用。
  • 针对用户已打开的演示文稿,使用桌面控制或
    deckcraft-cli mcp --connect PORT
    。这会操作与可见应用相同的文稿。
  • 对于独立的文件处理,
    deckcraft-cli mcp
    会启动自己的无头引擎。编辑前请先打开目标演示文稿;该会话不会改变用户当前可见的窗口。
  • 对于一次性的文件操作,使用
    deckcraft-cli info
    、
    run
    、
    render
    或
    convert
    。每次调用都有各自独立的会话。使用
    run --in FILE
    可继续处理已保存的文稿;
    --sample
    加载的是内置示例,而非用户的演示文稿。
在 POSIX 系统上检查
command -v deckcraft deckcraft-cli
,在 Windows 上检查
where deckcraft deckcraft-cli
。若不在 PATH 中,则检查应用的安装位置。在 macOS 上,可在
/Applications
和
~/Applications
中查找
DeckCraft.app
,或使用
mdfind -name DeckCraft.app
,然后查看
Contents/MacOS/
。不要臆造可执行文件路径。
需要时使用
deckcraft --control PORT
启动桌面会话;7990 是上游示例。应尽可能复用已有会话。缺少 CLI 并不妨碍直接通过 TCP 控制桌面应用。如果既没有可执行文件也没有可用连接,请报告缺失的前置条件。本 skill 不会安装 DeckCraft,也不会配置 MCP 服务器。

Control 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
id
, and check
ok
before dependent actions:
json
{"id":1,"method":"document.inspect"}
{"id":2,"method":"ui.inspect"}
{"id":3,"method":"engine.commands"}
Use
engine.commands
for command IDs, parameter documentation, and enabled or disabled reasons. Execute a command through
engine.execute
with
{command, params}
. With MCP, discover tool schemas and use
list_commands
,
run_command
, or the dedicated tools. Inspect tool errors as well as transport success.
The CLI distinguishes engine commands from control methods. The protocol snapshot's final shorthand omits this distinction; the upstream CLI uses
--method
for control methods:
sh
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
batch
stops at the first error, so inspect partial results before continuing.
桌面控制使用回环 TCP 和以换行符分隔的 JSON,而不是 HTTP 或 MCP JSON-RPC。每行发送一个请求,按
id
匹配响应,并在执行依赖性操作前检查
ok
字段:
json
{"id":1,"method":"document.inspect"}
{"id":2,"method":"ui.inspect"}
{"id":3,"method":"engine.commands"}
使用
engine.commands
获取命令 ID、参数文档以及启用或禁用的原因。通过
engine.execute
以
{command, params}
执行命令。使用 MCP 时,需发现工具 schema 并使用
list_commands
、
run_command
或专用工具。除了传输层是否成功外,也需检查工具本身的错误。
CLI 会区分引擎命令与控制方法。协议快照的最终简写省略了这一区分;上游 CLI 对控制方法使用
--method
:
sh
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 的
batch
会在遇到第一个错误时停止,因此继续之前先检查部分执行结果。

Slides and editable content

幻灯片与可编辑内容

Inspect the deck, active slide, layouts, sections, shapes, and selection before targeting edits. MCP provides
inspect_document
and
inspect_slide
; desktop provides
document.inspect
. Use actual returned IDs, and distinguish shape IDs from slide indices. Establish the active slide and selection when a command depends on them.
Prefer structured commands or dedicated MCP tools for precise edits. Discover
slide.new
,
shape.insert
,
shape.connect
,
format.*
,
design.theme
,
table.*
, and
chart.*
as needed. MCP also offers
add_slide
,
go_to_slide
,
add_shape
,
add_text_box
,
set_text
,
insert_picture
,
insert_table
, and
insert_chart
. 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.
Geometry 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
render --slide N
uses zero-based indices; check other tools' schemas rather than assuming a displayed slide number is their index.
For gestures, select the tool with
ui.tool.select
and send slide-space events through
ui.pointer
. In contrast,
ui.move
,
ui.click
, and
ui.drag
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.
在定位编辑目标之前,先检查文稿、当前活动幻灯片、版式、分节、形状和选区。MCP 提供
inspect_document
和
inspect_slide
;桌面端提供
document.inspect
。使用实际返回的 ID,并区分形状 ID 与幻灯片索引。当命令依赖特定状态时,先确认活动幻灯片和选区。
优先使用结构化命令或专用 MCP 工具进行精确编辑。按需发现
slide.new
、
shape.insert
、
shape.connect
、
format.*
、
design.theme
、
table.*
和
chart.*
。MCP 还提供
add_slide
、
go_to_slide
、
add_shape
、
add_text_box
、
set_text
、
insert_picture
、
insert_table
和
insert_chart
。使用前请检查每个工具的 schema。当主题、版式、占位符、备注和可编辑内容符合需求时应予以保留;设置文本前请确认替换范围。
几何尺寸以幻灯片点数(1/72 英寸)为单位;文档中的 16:9 幻灯片为 960 × 540。对于自定义文稿,请检查实际幻灯片尺寸,并在定位内容前确认矩形参数的语义。CLI 的
render --slide N
使用从零开始的索引;其他工具的索引规则请检查其 schema,不要假定显示的幻灯片编号就是其索引。
对于手势操作,使用
ui.tool.select
选择工具,并通过
ui.pointer
发送幻灯片坐标空间的事件;相比之下,
ui.move
、
ui.click
和
ui.drag
使用屏幕坐标。进行屏幕交互前请检查窗口、画布和幻灯片的矩形区域。键盘、文本和输入法(IME)输入作用于当前焦点,也可驱动幻灯片放映;当需要确定性定位时,请使用结构化文本编辑。

Presentations and previews

演示与预览

Discover
transition.set
and
animation.set
before adding effects. Use
show.start
and
show.end
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.
Use
ui.render
or MCP
render_slide
to inspect slide artwork. Use
ui.screenshot
or connected MCP
screenshot
for window and dialog state. MCP
call_app
exposes control methods only in connected mode.
For 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.
添加效果前,先发现
transition.set
和
animation.set
。若用户请求现场幻灯片放映,使用
show.start
和
show.end
,并先检查当前放映状态。当任务包含计时、分步构建(builds)、导航和媒体播放时,请在放映中验证;静态渲染无法验证这些内容。
使用
ui.render
或 MCP
render_slide
检查幻灯片画面。使用
ui.screenshot
或已连接的 MCP
screenshot
获取窗口和对话框状态。MCP 的
call_app
仅在连接模式下暴露控制方法。
对于已保存的文稿,渲染所有幻灯片以供审阅:
sh
deckcraft-cli info presentation.deckcraft
deckcraft-cli render presentation.deckcraft --all --scale 1 previews/
查看生成的图像,检查文本溢出、裁切、对齐、对比度、图片裁剪、图表标签以及各版式之间的一致性。渲染可以在无头环境下进行,无需可见的应用窗口。

Save, export, and verify

保存、导出与验证

Use desktop
app.open
,
app.save
, and
app.export
, or MCP
open_presentation
,
save_presentation
, and
export
. Discover format-specific parameters instead of guessing schemas. Keep an editable
.deckcraft
or requested
.pptx
deliverable and export PDF, images, or outlines separately as needed.
CLI
run
accepts repeated
--cmd 'ID=JSON'
arguments, then
--save OUT
and/or
--export OUT
. Save between separate CLI invocations; their in-memory edits are not shared. Image conversion through
convert
exports only the first slide; use
render --all
for a complete set of slide previews. PDF export can distinguish slides, notes pages, and handouts through
file.export
parameters; confirm the requested layout and scope.
Verify 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.
使用桌面端
app.open
、
app.save
和
app.export
,或 MCP 的
open_presentation
、
save_presentation
和
export
。请先发现与格式相关的参数,不要猜测 schema。保留可编辑的
.deckcraft
或用户要求的
.pptx
交付物,并按需单独导出 PDF、图片或大纲。
CLI 的
run
支持重复传入
--cmd 'ID=JSON'
参数,随后使用
--save OUT
和/或
--export OUT
。在多次独立的 CLI 调用之间需进行保存;它们的内存编辑不会共享。通过
convert
进行图片转换只会导出第一页幻灯片;如需完整的幻灯片预览集,请使用
render --all
。PDF 导出可通过
file.export
参数区分幻灯片、备注页和讲义;请确认所请求的版式与范围。
验证保存/导出的结果,确认输出文件存在且可读。在检查持久化效果时,请重新打开或检查已保存的演示文稿;当格式保真度重要时(尤其在与 PowerPoint 交换之后),请审阅导出的产物。返回输出路径以及任何实质性的渲染或兼容性问题。