This skill document is long, so be sure to use the Read tool to read it twice, and you must read the full text in its entirety.
Authoritative experience
Authoritative experience is a global hard constraint and a high-frequency error-prone point, and must be kept firmly in mind and strictly followed.
- You have plenty of time to complete this PPT; quality is always more important than speed.
- The PPT size is 960x540, and you must strictly ensure that the main content is within the page boundaries.
- !!!It is forbidden to deliver a product without images!!! You must use a large number of images to enhance the visual effect!!! It is forbidden to reuse the same image!!!
- The main visual of the cover page must be
<img>(from an image generation tool or an image search tool), do not use<shape>or<icon>to compose the cover visual. - It is forbidden to use
<shape>and<line>generated by an image generation tool.<img>。 - It is forbidden to place on
headlineortitlebelow, for separation or decoration,rector<line>。 - It is forbidden to use meaningless decorative lines or color block strips inside any page, and do not use narrow edge-hugging strips on any side of the page.
- The instruction parameter of the image generation tool must end with "do not show any text or color codes", to avoid interfering text appearing on the generated image.
- It is forbidden to use emoji icons; they must not appear in any position.
- The font size must explicitly set
<content>thefontSizeattribute, do not rely ontextTypedefault font size fallback; these fallback values are obviously too large. - Large numbers, or
<content>with large font size or a lot of text, must setwrap="true" autoFit="normal-auto-fit"the automatic line wrapping and indentation attributes, to avoid text overflow. - Text color must use
<content>thecolorattribute rather thanfontColorthe attribute. - Text line spacing must set
<content>thelineSpacing="multiple:xx"orlineSpacing="fixed:xx"rather thanlineSpacing="xx"。 - Images must use
<img>rather than<image>。 - IconPark icons must be filled with color (set
<fill><fillColor color="rgba(R,G,B,A)"/></fill>) and have sufficient contrast with the background. - When drawing charts, use
<chart>for native charts (column, bar, line, area, pie (donut), radar, combination charts), and use<shape>+<line>to simulate others (funnel charts, pyramid charts, quadrant charts, matrix charts, etc.). - To hide
<chart>the legend, it can only be done by not writing or deleting<chartLegend>,<chartLegend>does not supportposition="none"。 - For tables, give priority to using
rectandtextto simulate; for others use<table>, and if there is no<shape type="table">。 - you must set
<table>thewidthandheightto fix the table size, and at the same time set the<col>thewidthand<tr>theheightfor the column widths or row heights that need to be retained, and the rest are allocated automatically. <td>direct child elements only have<fill>(background),<content>(Text) and border configuration (generally not used), cannot be nested<shape>、<img>、<icon>。<shape type="rect">is only a shape, not a container,<icon>、<img>、<shape type="text">and other<shape>must be placed at the same level as it, stacked by coordinates.- Fill gradient colors must use
<fill><fillColor color="linear-gradient(135deg, rgba(R,G,B,A) 0%, rgba(R,G,B,A) 100%)"/></fill>。 - Before editing a page, you must read
workflow/slides-editing.md。 - Before drawing charts, you must read
xml/slides_chart_demo.xml。 - When the user requests a lossless retelling of the historical context, you must losslessly retell the above authoritative experience, the must-read skill documents (which need to be re-read), and the error-prone element syntax (especially
<table>and<chart>)。
Doubao Design Principles
Scope of application:
- The design of ordinary content pages must take the Doubao Design Principles as the highest guideline, unless the user requests the use of a template or directly provides a design solution.
- Not applicable to
title-cover、section-divider、conclusion、quote-highlightandbig-number。
Core requirements:
- A graphic card layout with extremely high information density must be adopted, pursuing a full, rich, line-by-line readable layout; better dense and full than empty and sparse.
- !!!Extremely high information density!!! Many images!!! Many cards!!! Lots of text!!!
Layout:
- Card layout: Cards fill the page in a multi-row grid; the layout is symmetrical, balanced, and leaves no blank space. The number of grids and the image-text ratio vary according to the content to avoid every page looking the same. Use more cards for subdivided presentation, and avoid piling large amounts of text into a single card (for example, 8 cards with 50 characters each are better than 2 cards with 200 characters each); multiple key points must be split into multiple sub-cards.
- Card style: square-corner cards + semi-transparent fill + no border + card edge-hugging narrow strip (optional); all cards must use the same color scheme (except a small number of cards that need emphasis); rainbow cards on the same page are prohibited (more than 3 card colors).
- Card structure: visual anchor (keyword, number, or IconPark icon) + title + content (including text, images, charts, sub-cards).
- Text cards: Most pages must meet 6-8 text cards and 200-400 characters; when the word count is insufficient, it must be expanded into long sentences or paragraphs; text cards must not leave blank space and must be full and substantial. Text cards are not short labels, but "title + complete explanation," like condensed analytical writing. When text content has to use lists, columns, keywords, or short sentences, clear hierarchy must be ensured, and splitting into multiple sub-cards is more recommended.
- Image cards: Most pages must meet 1-3 image cards; when images are missing, image generation tools must be used to supplement illustrations; image cards and text cards form a grid to ensure rich graphics and text.
- Chart cards: Data information should not be listed in text cards; it must be visualized in chart cards (including tables, charts, timelines, flowcharts, etc.); chart cards form a grid with other cards to demonstrate data-driven presentation.
- Spacing requirements: All margins must be symmetrical left and right; the margins of the page and internal content must be at least 40px (content should not touch the edge); the margins of cards and internal text must be at least 5px (text should not touch the edge); cards should maintain 20-40px spacing between them.
- Text alignment: Body text is left-aligned by default; center alignment is used only in covers, endings, or large-number scenarios; text in tables is left-aligned, numbers are right-aligned, and only keywords or short sentences are center-aligned.
Visual style:
- Aesthetics: Clean, bright, and refreshing but information-rich; maintain a sense of order under high density through cards and aligned grids; the amount of text in cards in the same row should be similar to keep the look neat.
- Font: The entire document is mainly in a sans-serif typeface (Source Han Sans); a serif typeface may be used sparingly on the cover or for key emphasis.
- Font sizes: 28-36pt for titles, 12-14pt for body text, 10-12pt for notes; regular key metrics 16-32pt, core metrics use 36-52pt numerals, with 10-14pt labels and brief interpretations below; smaller font sizes are allowed when more text needs to be accommodated.
- Icons: Use embedded IconPark icons (which may be replaced by keywords or numbers) as visual anchors, so that high-density text also has graphical rhythm instead of being a solid block of plain text.
- Color scheme: Restrain the number of colors and ensure all pages use only the same 1 background color (light off-white preferred), 1 primary color, 1 accent color, and 1 auxiliary color; Morandi palettes are preferred, and rainbow palettes are prohibited (for example, blue paired with orange).
Quick Reference
This table only locates "scenario → which command to use, which document to read". For parameters, refer to the corresponding documents in "Must Do Before Execution" and lark-cli slides +<verb> --help as authoritative; do not fill in parameters from memory or by analogy with other commands.
| User requirement | Preferred action | Key documents / commands |
|---|---|---|
| Create a new PPT | Plan first slide_plan.json, then choose one-step or two-step creation based on the number of pages |
planning-layer.md、visual-planning.md、asset-planning.md、cli/lark-slides-create.md、slides +create、slides +add-slide、cli/lark-slides-add-slide.md(two-step creation adds pages one by one) |
| The user requests the use of a template, or provides a PPTX file for modification or beautification | Import the template as Slides, then edit | workflow/template-editing.md |
| Edit a single title, text block, image, or local element | Block-level replace/insert,only touch the named blocks; other elements on the same page are unaffected; page order is not changed | slides +replace-slide、cli/lark-slides-replace-slide.md |
| Many changes on one page (batch fonts/color scheme), need to change the page background, need to delete several elements | Whole-page overwrite,slide_id and page order remain unchanged; elements written back with the original id keep their ids, while those without id are inserted as new elements and get new ids;the cost is that elements not written into --content will be deleted, so do not use it to change individual elements |
slides +update-slide、lark-slides-update-slide.md |
| Append or insert pages into an existing PPT | One page at a time,--slide supports @file to bypass shell escaping |
slides +add-slide、cli/lark-slides-add-slide.md |
| Delete pages | Delete a single page by slide_id ; read back and confirm before deleting |
slides +delete-slide、cli/lark-slides-delete-slide.md |
| Read or analyze an existing PPT | Parse the slides/wiki token, use shortcut to read back the full text or a single page's XML, save xml_presentation_id、slide_id、revision_id |
slides +xml-get(for a single page pass --slide-id or --slide-number)、cli/lark-slides-xml-presentations-get.md |
| View or roll back historical versions | First use +history-list to find history_version_id, then +history-revert, and if necessary +history-revert-status to poll |
cli/lark-slides-history.md |
| Capture screenshots of slide pages | By page number use --slide-number, by ID use --slide-id; for a single image use --output, for batch or full use --output-dir; execute serially with at most 10 pages per batch; the screenshot directory reuses the same task's deck/task identifier, and subsequently read the actual path returned |
slides +screenshot、cli/lark-slides-screenshot.md |
| Download images | --output optional; when passed, specify a single file path; when not passed, automatically save to the default directory .lark-slides/media, and generate the path according to the response file name/type; after calling, read the returned path, do not guess the file name; when direct connection is rejected, automatically fall back to the source file preview |
slides +media-download --file-token <file_token> |
| Upload or use images | First upload as file_token, directly writing http(s) external links is prohibited |
slides +media-upload、cli/lark-slides-media-upload.md, or +create --slides in the XML write the <img src="@./path"> placeholder |
| Draw charts | For native charts (bar, horizontal bar, line, area, pie (donut), radar, combo charts) use <chart>, for others (funnel chart, pyramid chart, quadrant chart, matrix chart, etc.) use <shape> + <line> to simulate |
xml/xml-schema-quick-ref.md、xml/slides_chart_demo.xml |
| Draw tables | Prefer rect and text to simulate, for others use <table> |
xml/xml-schema-quick-ref.md |
| Use icons | Guessing iconType blindly is prohibited; you must first search IconPark, then write <icon iconType="...">, icons must be filled with color and have sufficient contrast with the background; emoji icons are prohibited |
iconpark_tool.py search → resolve、xml/iconpark.md |
| Creation failure, blank page, 3350001, abnormal layout | First read back the status, then fix according to the troubleshooting checklist; do not assume the original operation succeeded atomically | workflow/error-handling.md、workflow/validation-xml.md |
CRITICAL — Before starting, you MUST first use the Read tool to read ../lark-shared/SKILL.md; authentication, permissions, and global parameters are all subject to lark-shared.
CRITICAL — Before viewing or rolling back historical versions, you MUST first read cli/lark-slides-history.md. The rollback API only accepts history_version_id; do not pass revision_id directly to +history-revert。
CRITICAL — Before generating any XML, you MUST first use the Read tool to read xml/xml-schema-quick-ref.md; guessing the XML structure from memory is prohibited.
CRITICAL — When creating a new presentation or substantially rewriting a page, you MUST first generate .lark-slides/plan/<deck-or-task-id>/slide_plan.json, then generate the XML. First create the corresponding directory; for planning-layer rules and intermediate artifact lifecycle, see planning-layer.md. Small edits to existing pages such as replacing a single title or inserting a single block are exempt.
CRITICAL — When creating a new presentation or substantially rewriting a page, before generating XML you MUST read visual-planning.md, ensuring that layout_type、visual_focus、text_density actually changes the page geometry, main visual, and text volume.
CRITICAL — When creating a new presentation or substantially rewriting a page, planning asset_need MUST follow asset-planning.md: only do metadata planning, there must be fallback_if_missing; must not require real searching, downloading, or uploading of assets.
CRITICAL — Before submitting the complete <slide> XML to slides +create、slides +add-slide or slides +update-slide , you MUST first save the XML to be submitted to a local file and run the sole layout quality gate entry point scripts/xml_lint.py;summary.error_count must be 0 to call the API.
CRITICAL — After creation, substantial rewriting, or full-page write-back, you MUST perform explicit verification according to workflow/validation-xml.md : read back the full XML, verify the page count and key elements, and use scripts/xml_lint.py to uniformly check the XML, out-of-bounds, overlap, blank pages, and content sparsity risks.
CRITICAL — During pre-creation self-checks or failure troubleshooting, you MUST check XML escaping, structure, shell truncation, image token, 3350001, and layout risks according to workflow/error-handling.md .
Edit an existing slide page: For a single title, text block, image, or local element, prefer +replace-slide(block-level replacement/insertion, without changing page order); when there are many changes on a page (for example, batch font replacement), you need to change the background, or you need to delete several elements, use +update-slide full-page overwrite (slide_id and page order remain unchanged, but what is not written into --content elements will be deleted);For large multi-page changes, run once for each page +update-slide. For selecting action and the complete read-modify-write process, see workflow/slides-editing.md。
The user requests to use a template: handle according to workflow/template-editing.md .
Identity selection
Feishu slides are usually the user's own content resources.By default, explicitly prefer using --as user(user identity) to perform slides-related operations, and always explicitly specify the identity.
--as user(recommended): create, read, and manage presentations as the currently logged-in user. Complete user authorization first before execution:
lark-cli auth login --domain slides
--as bot: use only when the user explicitly requests to operate with app identity, or when the bot needs to hold/create resources. When using bot identity, additionally confirm whether the bot really has access to the target presentation.
Execution rules:
- For creating, reading, adding/deleting slides, and continuing to edit an existing PPT via a link provided by the user, by default first use
--as user。 - If permission is insufficient, first check whether bot identity was mistakenly used; do not fall back to bot by default.
- Only switch to
--as bot。
Must do before execution
Important:
references/xml/slides_xml_schema_definition.xmlis the only correct XML protocol source for this skill; other md files are only summaries of it and the CLI schema.
High-frequency read-only:
- xml/xml-schema-quick-ref.md
- planning-layer.md(create new / major rewrite)
- visual-planning.md(create new / major rewrite)
- asset-planning.md(create new / major rewrite)
- workflow/validation-xml.md(after creation / major rewrite)
Before calling related commands, you must read the relevant documentation to understand how to use the commands:
- Create:
cli/lark-slides-create.md、cli/lark-slides-add-slide.md(add page by page / append pages to an existing PPT) - Delete pages:
cli/lark-slides-delete-slide.md - Read:
cli/lark-slides-xml-presentations-get.md - Edit:
workflow/slides-editing.md、cli/lark-slides-replace-slide.md、lark-slides-update-slide.md - Version history:
cli/lark-slides-history.md - Screenshot:
cli/lark-slides-screenshot.md - Image:
cli/lark-slides-media-upload.md - Chart:
xml/slides_chart_demo.xml - Icon:
xml/iconpark.md、scripts/iconpark_tool.py - Troubleshooting:
workflow/error-handling.md - Complete protocol:
xml/slides_xml_schema_definition.xml
Workflow
Design Ideas
Do not generate slides without a sense of design. A pure white background + title + bullets can only serve as a minimal temporary draft, not a formal deliverable.
Before starting to write XML, first determine the deck-level visual strategy in slide_plan.json :
- Themed color scheme: the color scheme must serve this topic, industry, and audience; do not default to a blue business style. If the same set of colors still works when switched to another completely different topic, the color scheme is not specific enough.
- Primary/secondary ratio: choose 1 primary color to carry about 60-70% of the visual weight, 1 auxiliary color for structure and zoning, and 1 accent color only for key numbers, conclusions, or action points. Do not let all colors have equal weight.
- Background consistency: first determine the background strategy for the entire deck, and by default keep the same light/dark tone and base color system; whether light or dark, ensure sufficient contrast between content and background.
- Unified motif: choose one reusable visual motif to run through the entire text, such as numbered nodes, card treatment, semi-bleed image areas, titles, footers. Do not change the decorative language from page to page.
Each page must have at least one visual element: an image, icon, chart, table, flowchart, comparison structure, or large number. A text box itself does not count as a primary visual.
Common page formats:
- Two-column structure: text on the left and image on the right, or image on the left and text on the right; the visual area occupies 35-45% of the width.
- Icon row: icons are placed inside color blocks or circular backgrounds, with a short title and one-sentence explanation on the right.
- Grid: suitable for capabilities, modules, risks, and action items; keep the content in each cell at the same hierarchy level.
- Half-bleed visual: the image occupies the left/right half of the screen, with text overlaid or arranged flush to the edge.
- Large number card: use large numbers for core metrics, with labels and brief interpretations below.
- Comparison columns: before/after, option A/B, and problem/solution are placed side by side left and right, with titles and baselines strictly aligned.
- Timeline/flowchart: express steps with nodes and arrows; the flow direction must be visible at a glance.
Common mistakes that must be avoided:
- Do not reuse the same title + three bullets layout on every page.
- Do not use low-contrast text or low-contrast icons, such as light gray text on a light background.
- Do not let decorative lines pass through text, or let footers, sources, or page numbers squeeze the main content.
- Do not present missing assets as blank image frames; you must follow
fallback_if_missingto generate a replacement image. - Do not use emoji icons anywhere.
Generation process
Step 1: 需求分析 & 读取知识
- 分析主题、受众、页数、风格;
- 若用户要求使用模板,按 workflow/template-editing.md 处理
- 读取 xml/xml-schema-quick-ref.md;新建 / 大幅改写时还要读取 planning-layer.md、visual-planning.md、asset-planning.md
- 涉及图表读取 xml/slides_chart_demo.xml
Step 2: 生成大纲 → 写入 slide_plan.json
- 生成结构化大纲
- 新建 / 大幅改写必须先创建目录并写入 `slide_plan.json`
- plan 字段、路径命名和 `asset_need` 结构按 planning-layer.md / asset-planning.md 执行
Step 3: 按 slide_plan.json 生成 XML → 创建
- 逐页消费 plan:key_message 定主结论,layout_type 定几何,visual_focus 定主视觉,text_density 定文本量
- 缺少真实素材时必须用 `fallback_if_missing` 生成替代图片,不要留空
- 读 cli/lark-slides-create.md 定一步创建还是两步创建,并据此构造 `slides +create`;两步创建再读 cli/lark-slides-add-slide.md 用 `+add-slide` 逐页添加
- 图片按 cli/lark-slides-media-upload.md 处理;复杂 XML、转义和 3350001 排查按 workflow/error-handling.md 执行
Step 4: 审查 & 交付
- 创建完成后,必须用 `slides +xml-get --presentation <xml_presentation_id>` 读取全文 XML,并按 workflow/validation-xml.md 做显式验证记录,包括 XML 文本重叠检查
- 失败或部分成功按 workflow/error-handling.md 处理;局部问题优先用 `+replace-slide` 修正
- 没问题 → 交付:使用 NotifyHuman 工具交付 PPT 链接
Gradients must use the
rgba()format with percentage stops, such aslinear-gradient(135deg,rgba(15,23,42,1) 0%,rgba(56,97,140,1) 100%). Usingrgb()or omitting stops will cause the server to fall back to white.
Outline template
Use the following format when generating an outline:
[PPT 标题] — [定位描述],面向 [目标受众]
页面结构(N 页):
1. 封面页:[标题文案]
2. [页面主题]:[要点1]、[要点2]、[要点3]
3. [页面主题]:[要点描述]
...
N. 结尾页:[结尾文案]
风格:[配色方案],[排版风格]
Core concepts
URL formats and tokens
| URL format | Example | Token type | Handling method |
|---|---|---|---|
/slides/ |
https://example.larkoffice.com/slides/xxxxxxxxxxxxx |
xml_presentation_id |
The token in the URL path is used directly as xml_presentation_id use |
/wiki/ |
https://xxx.feishu.cn/wiki/wikcn_EXAMPLE_NODE_TOKEN_123456 |
wiki_token |
⚠️ Cannot be used directly; you need to query first to obtain the real obj_token |
With
--presentationthe slides shortcut will automatically resolve both of the above URL types.
Special handling for Wiki links (critical!)
Knowledge base links (/wiki/TOKEN) cannot be directly used as xml_presentation_id. When using the Slides shortcut, pass the link directly; the CLI will query the node, validate data.obj_type == "slides" and use data.obj_token。
lark-cli wiki +node-get --node-token 'https://xxx.feishu.cn/wiki/wikcn_EXAMPLE_NODE_TOKEN_123456' --as user --format json
Node resolution must use the same identity as subsequent Slides operations; when downstream explicitly uses --as bot , change this to --as bot。
With --presentation the slides shortcut will automatically resolve /wiki/ URL and validate obj_type。
Resource relationships
Wiki Space (知识空间)
└── Wiki Node (知识库节点, obj_type: slides)
└── obj_token → xml_presentation_id
Slides (演示文稿)
├── xml_presentation_id (演示文稿唯一标识)
├── revision_id (版本号)
└── Slide (幻灯片页面)
└── slide_id (页面唯一标识)
Shortcuts
Slides-related operations use the shortcut (lark-cli slides +<verb> [flags])。
| Shortcut | Description |
|---|---|
+create |
Create a PPT, optionally adding pages in one step |
+add-slide |
Append or insert into an existing presentationone page(--before-slide-id controls the position), XML supports @file / stdin,<img src="@./path"> placeholders are automatically uploaded |
+delete-slide |
By slide_id Deleteone page |
+xml-get |
Read the full text or single-page XML; use --presentation Specify the presentation; for a single page pass --slide-id or --slide-number; use --output to save the XML to a local file (must be a relative path within the CWD, e.g. .lark-slides/plan/<deck>/readback.xml) |
+screenshot |
save the slide page screenshot as a local image; use --slide-number to specify the page number (starting from 1; pass repeatedly for multiple pages) or use --slide-id to specify the page; for a single page use --output .lark-slides/screenshots/<deck-or-task-id>/page-01, for batch use --output-dir .lark-slides/screenshots/<deck-or-task-id>(at most 10 pages at a time); afterward you must read the returned output / screenshots[].path |
+media-upload |
Upload a local image to the specified presentation, returns file_token(used as <img src="...">), maximum 20 MB |
+media-download |
Download a local image based on the Slides image file_token ;--output is optional; if not passed, use --output-dir default value .lark-slides/media and automatically generate a file name; after calling, use the returned path, do not guess the actual path; when direct download has no permission, automatically fall back to source file preview |
+replace-slide |
Perform block-level replacement/insertion on an existing slide page (block_replace / block_insert), automatically injects id and <content/>, without changing page order |
+update-slide |
Hand an entire page's XML to an existing page; the page becomes the way --content describes; can change styles/insert/delete/notes/background all at once,slide_id and page order remain unchanged.Elements not written into --content will be deleted |
Slides operations already covered by this skill must use the shortcuts in the table above; before executing, read the corresponding reference and follow its parameters and constraints.
Core rules
- Plan before writing XML: when creating a new presentation or substantially rewriting pages, you must first write
.lark-slides/plan/<deck-or-task-id>/slide_plan.json; templates, styles, and outlines can only serve as planning input and cannot bypass the planning layer - Creation flow: use
slides +createfor creating a new presentation; whether to create in one step or two steps is determined bycli/lark-slides-create.mdDetermine <slide>The only direct child elements are<style>、<data>、<note>: text and graphics must be placed inside<data>inside- Text is expressed through
<content>: you must use, and cannot write text directly inside the shape; do not confuse XML element<content><p>...</p></content>and<content>'s JSON fields: when writing--parts,--partswhen,block_replaceloading XML uses the standard fieldreplacement,block_insertuseinsertion - Save key IDs: subsequent operations require
xml_presentation_id、slide_id、revision_id - Delete with caution: deletion is irreversible; before deleting, read back to confirm
slide_id - For editing existing pages, prefer updating via the original link: to modify a single shape/img use
+replace-slide(block_replace/block_insert), do not rebuild the entire page; if a page has many changes or the background needs to be changed, use+update-slidefull-page override (preservingslide_idand page order); for multi-page full-page rebuilds, run+update-slideonce for each page; do not useslides +createto create an entire new PPT; to append/insert a single page use+add-slide, to delete a single page use+delete-slide <img src>can only usefile_tokenuploaded to Feishu drive; using http(s) external link URLs is prohibited: the Feishu slides rendering end does not proxy external image links; external src usually does not display in PPT or shows a broken image. The process must be "first save the image locally → useslides +media-uploadto upload, or in+create --slides's XML write the<img src="@./path">placeholder to auto-upload → get thefile_tokenand write it into<img src>." If the user provides a web image link, firstcurl/download it into the CWD and then follow the upload process; do not directly stuff the external URL intosrc。Images max 20 MB(media upload does not support chunking).
Note: if the md content is inconsistent with
xml/slides_xml_schema_definition.xml, the latter prevails.