技能位置

SkillDocs & knowledge

The single authoritative LegalWork Skill for creating, editing, styling, validating, and exporting every presentation. It combines Kimi-derived presentation style/detail rules, the editable PPTD project format, structural/style validation, visual QA, and deterministic local PPTX generation in one workflow. Use for any PPT, PPTX, PowerPoint, presentation, slide deck, courseware, training deck, infographic, or poster task; never route new PPT creation through the generic document Skill.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 技能位置 skill

What this skill tells your AI

The instructions your AI receives, as published by sunyifeisb-art/legalwork in skills/open-kimi-ppt/SKILL.md and read by ahel’s review.

本技能已内嵌至 LegalWork,技能目录为 skills/open-kimi-ppt/(即本目录)。下文命令中 <本技能目录> 指该目录绝对路径。规则库在 reference/,导出脚本在 scripts/

单一入口契约(必须遵守)

本 Skill 是 PPT 的唯一权威入口。Kimi 风格决策、PPTD 生成、结构检查和本地导出是一个不可拆分的工作流:

  1. 禁止用 document_skill_executepptx/from-json 新建 PPT,也禁止调用方自行用 python-pptx、OfficeMCP 或普通标题+项目符号模板替代本 Skill。runner 内部封装的本地渲染器不受此限。
  2. 新建 PPT 必须选择一个 slides_categories 场景,并把该场景落实为 PPTD 的集中式 theme.colorstheme.textStyles,而不是把风格停留在文字说明里。
  3. 统一执行程序只有 scripts/skill_runner.py。最终交付必须由它执行 checkexport;不要直接调用底层导出模块。
  4. runner 会自行加载并记录 PPTD、通用类别和所选场景规范,检查画布边界、重复元素、占位符、主题色和文字样式,再用内置本地渲染器确定性生成 PPTX;不登录 Kimi、不打开公共编辑器、不等待网页下载。只有返回 engine:"open-kimi-ppt"exporter:"local-python-pptx"styleValidated:true、有效 slidesbytesoutput 才算完成。

Definition

open-kimi-ppt is a presentation creation and export skill built around Moonshot AI's PPTD format and Kimi-derived design rules, with a bundled deterministic local PPTX renderer. It defines a YAML-format intermediate DSL (.pptd) that abstracts OOXML and keeps each page self-contained.

The default output is not PPTD-only. Unless the user explicitly opts out, always produce both:

  1. the complete editable PPTD project directory (.pptd + pages/ + media/ and other referenced dependencies);
  2. the matching locally generated .pptx, with fade slide transitions applied by default.

Existing PPTX files may also be converted into PPTD for editing, after which both outputs are delivered again.

The pptd format

The .pptd format is a simplified abstraction layer over OOXML that follows basic YAML syntax. This abstraction preserves the core content of OOXML (theme, page layout, element positions and definitions, etc.) while removing complex nesting logic such as Masters; every page is self-contained — what you see is what you get. Read reference/pptd.md for the complete definition of this DSL.

PPT production workflow

step0. Check local prerequisites

Default delivery includes deterministic local PPTX export (and optional browser-based visual QA), which needs a local Python toolchain. scripts/skill_runner.py export 会统一检查并调用这些依赖;不要另找 PPT 生成器。环境要求为:

  1. python3 3.10+: run python3 --version (on Windows, python may be the correct command). Local PPTX delivery requires PyYAML and python-pptx.
  2. Node.js / Chrome / network are not required for PPTX export. They are only optional dependencies for the separate browser editor or image-based visual QA workflow.

step1. Read the context thoroughly

Read all files uploaded by the user, the provided URLs, and the pptd format guide reference/pptd.md to fully understand the user's requirements.

step2. Understand the user's requirements

Understand the user's requirements based on the context:

  1. First determine the purpose of the request
  • Create a PPT: create a new presentation (from scratch, or from an existing pptx template)
  • Edit a PPT: edit the user's uploaded PPT (local modifications, single-page beautification, etc.)
  • Replicate a PPT: replicate a presentation from a non-pptx format (images, PDF, etc.) into pptd format
  1. Then determine the design direction
  • Self-directed design: no preference, or only simple style constraints given; you need to fill in or create the design
  • Design system: a preset design system from the skill (reference/design_system/) is specified, or the user provides a complete and detailed design scheme covering all color, font, layout, and component specifications
  • Use a template: a template is provided and must be used
  • Style transfer: a style reference source is provided (images, web pages, etc.)
  1. Then determine the input type
  • Topic only: only a PPT topic direction or content requirements for the presentation are given, with no concrete content
  • Full document: the user provides a complete document (paper, research report, press release, etc.)
  • Outline: the user provides a page-by-page outline, speech script, or similar content
  • When the "user input type" is [Full document] or [Outline] and it is not specified whether expansion is allowed: since a page-by-page outline, speech script, or user document can hardly support the full content of a presentation, prefer using search to expand with more relevant material, cases, etc., unless the user explicitly says not to expand
  1. Finally determine the exact page count
  • If the user requests a specific page count, the user's requirement takes priority
  • Page-by-page outline/script provided: match the number of pages in the outline/script
  • When a complete and relatively structured document is provided: ask the user how much document content one page should cover, and give an estimated total page count; when only a topic is provided: suggest a recommended page count and confirm with the user
Clarification and follow-up questions

When any of the following situations arise, resolve them by asking the user (use the agent's ask/clarification tool when available)

  1. Requirements are ambiguous
  • The user's intent is unclear or hard to understand
  • The files/URLs provided by the user are inaccessible
  1. Conflicting intents
  • The user's intents contradict each other. For example:
    • A design system is selected while also requesting a style that is completely inconsistent with that design system (e.g., using a McKinsey style while requiring large areas of whitespace on pages) / using a template / referencing an image style
    • Requesting both "make 10 pages" and "deliver 30+ pages of output"
  1. Unable to determine the user's requirements on your own
  • When the purpose, design direction, input type, page count, etc. are hard to determine by yourself

step3. Generate the presentation based on the user's requirements

Before generating, first read reference/pptd.md to understand the pptd format definition and constraints.

Replicating a PPT
  • Analyze the images to estimate element positions, fonts and sizes, etc., and replicate 1:1 as closely as possible.
  • For parts that are difficult to make out, use methods such as grid lines and close-up views to improve understanding.
  • Replicate simple content in the image with elements; icons may be approximated with icons provided by Font Awesome. For content that cannot be approximated with icons or shapes, such as photos and avatars, use tools such as bash or python to crop and split the original image, then add the resulting image elements to the presentation
Editing a PPT
  • Convert the user's uploaded pptx file to .pptd format
  • Review the converted pages (structure and key visual details). Read a few key pages individually afterwards.
  • Locate the pages to edit, and be careful not to affect parts outside the intended scope.

Conversion from pptx to pptd is not perfectly lossless. If the user later reports format errors, garbled content, etc., compare against the original pptx and repair the pptd with reference to the comparison

Generating a PPT

When generating a PPT, adopt different production approaches for different user [design directions]

Self-directed design
  1. Read the design guide reference/slides_categories.md, and read the scenario document corresponding to the user's query
  2. Produce the presentation based on the above
Generating content in other formats
  • When the user explicitly asks for an infographic, poster, or a highly visual single-page design, read reference/general-poster.md and implement it as a single-page or few-page editable PPTD; when the user only asks for an image, still build it with PPTD first, then output the image via screenshot or rendering. Do not load this reference file for ordinary PPT requests.
Design system
  1. Read the general constraints section of the reference/slides_categories.md guide, and read the scenario document corresponding to the user's query as the design foundation
  2. Read the specified design system as the presentation style: either the user-provided design scheme, or the matching preset under reference/design_system/ (search by name / path the user specified; prefer the folder's design.md when present). It is strictly forbidden to reference or mix in other design styles
  3. Produce the presentation with reference to the above
  4. Do not auto-pick a preset during self-directed design; only use reference/design_system/ when a preset is explicitly specified
Using a template
  1. Convert the user's uploaded pptx file into pptd form
  2. Review the converted pages to understand the template's visual style (color scheme, font style, element characteristics, layout characteristics, content density, etc.)
  3. Identify page types; focus on reading special pages such as the cover, summary pages, and section dividers (single-page screenshots, .page files), extracting their page layouts, content structures, reusable components (icons, shapes, smartart, reusable body layout schemes, etc.), and element styles (e.g., whitespace/line/card separators, square/rounded corners, etc.)
  4. Produce the presentation using the template
Style transfer
  1. Analyze the reference file's visual style (color scheme, font style, element characteristics, layout characteristics, content density, etc.), page layouts, content structures, reusable components (icons, shapes, smartart, reusable body layout schemes, etc.), and element styles (e.g., whitespace/line/card separators, square/rounded corners, etc.).
  • If the user provides a style reference URL, do not only read the text content; refer to and learn from the page's visual effect more to help understand the style
  1. Produce the presentation using the reference file's style characteristics. You are encouraged to reuse illustrations, fonts, font-size hierarchies, elements, etc. from the original pdf/url
Images and Visual Materials
  1. Images are an effective way to enrich a presentation's visual impact. Appropriate images should be used not only on covers and section dividers, but also on body pages to enrich the page, aid understanding, or support decision-making
  2. Images are used to show concrete subjects, explain content, provide evidence, or establish a scene. Logos, icons, decorative textures, and very small thumbnails do not count as substantive imagery.
  3. When a page involves products, people, places, buildings, events, cases, interfaces, experimental subjects, or spatial environments, prioritize corresponding real images or screenshots. If real images and screenshots cannot be obtained, generated images may be used instead.
  4. Image priority: images provided by the user; images from official websites, official reports, and credible sources; searched images that are directly relevant to the content; images generated for conceptual expression or atmosphere.
  5. After deciding which images are needed, complete image search, generation, and downloading in a batch before designing pages around their proportions. Save images in the media directory, keep them clear, and never stretch or distort them.
  6. Analytical, technical, and academic PPTs should use corresponding evidence images when products, experiments, interfaces, cases, or on-site materials are available. Do not reduce every page to text, color blocks, and shapes.
  7. Do not add irrelevant images merely to meet a quantity target. Every image must be directly relevant to the page's conclusion or communication goal.
Content Guidelines
  1. Language style: unless the user explicitly requests otherwise, strictly avoid overly abstract expressions and uncommon metaphors
  • Do not overuse metaphors, slogans, or abstract jargon such as distribution, an N-step argument, everything at a glance, a closed loop, hands-on practice, verification, deconstruction, second-class citizens, poison pills, or wall clocks
  • Do not use common AI phrasing such as “not X, but Y,” “X is Y,” “why / based on what / how,” “key takeaway,” or “N battlefronts / paths”
  • Do not use overly colloquial expressions such as “where should the ammunition go,” “the Nth thing,” “can't pick the right one,” or “cannot be used as X”

step4. PPT validation

  1. Validate the generated pptd against the format definition in reference/pptd.md (required fields, types, bounds, theme tokens, resource paths, etc.) and repair issues over multiple rounds
  2. Visual review with exported page images — required before PPTX export when the model supports image input (multimodal):
    • Run scripts/export_images.py. It loads the deck into Kimi's public editor, chooses 导出 → 图片, downloads the images ZIP, unzips it, and stitches all pages into one overview image:

      cd <本技能目录> && python3 scripts/export_images.py \
        /abs/path/project/deck.pptd \
        --output /abs/path/project/.qa-images
      

      The script prints a JSON summary mapping each stitched label (P1Pn, 1-based page order) to its .page file.

    • Read the stitched overview image (.qa-images/overview.jpg) and check every page against this list:

      1. 图片是否清晰、不变形(无拉伸、压缩、模糊)
      2. 文字是否压在关键画面(人脸、产品主体、Logo 等)上
      3. 元素坐标是否超出页面边界
      4. 边界与配色对比是否足够(文字与背景、相邻色块之间)
      5. 排版是否统一(对齐、间距、字号层级、页边距)
      6. 文字是否可能溢出文本框(文本过长、行距过密、字号过大)
      7. 内容是否被上层元素遮挡
    • For any suspicious page, read its full-resolution image (.qa-images/pages/<n>.jpeg) to confirm the problem before editing.

    • Fix issues in the corresponding .page file, then re-run scripts/export_images.py --force and review the new overview; repeat until every page passes.

    • Do not export the PPTX until the visual review passes. .qa-images/ is an intermediate QA artifact and may be deleted after delivery.

  3. When the model cannot read images, fall back to a structural review of the generated pages (bounds, overflow-prone long text, contrast, hierarchy, layout density) over multiple rounds, and state that image-based visual QA was skipped.

step5. PPT output and delivery

  1. Always produce a self-contained project directory. Keep the .pptd manifest and every referenced dependency together; never deliver a standalone manifest without its referenced files. Use this layout unless an existing project already has a valid equivalent structure:

    deck/
      deck.pptd
      pages/
        *.page
      media/
        *                # when the deck has local media
      deck.pptx          # generated by default
    
  2. Generate the .pptx by default after PPTD validation, even when the user only asks to create or edit a presentation. Skip PPTX export only when the user explicitly requests PPTD-only output or the environment cannot run the exporter; in the latter case, report the exact blocker and still deliver the complete PPTD project.

  3. Deliver with normal clickable local links using absolute paths. In the final response, link all of the following:

    • the project directory;
    • the .pptd manifest;
    • the pages/ directory and media/ directory when present;
    • the generated .pptx file.
  4. PPTX conversion: use the unified scripts/skill_runner.py export entrypoint. It validates the selected Kimi scenario style and PPTD project first, then calls the bundled deterministic local renderer, saves the resulting PPTX locally, and validates the ZIP/slide structure.

  5. Default PPTX options:

    • page transition: fade (淡入淡出), written to every slide after local export;
    • font names and sizes are preserved in the PPTX, but font files are not embedded by the local renderer;
    • the transition default may be explicitly overridden with --transition none.
  6. Unified check/export commands:

    cd <本技能目录> && python3 scripts/skill_runner.py check \
      /abs/path/project/deck.pptd --scenario education-training
    
    cd <本技能目录> && python3 scripts/skill_runner.py export \
      /abs/path/project/deck.pptd --scenario education-training \
      --output /abs/path/project/deck.pptx
    

    --scenario 必须根据任务选择:analysis-decisionbusiness-planmanagement-reportacademic-researcheducation-trainingtech-engineeringbrand-creative。runner 会把实际采用的规范及哈希写入项目内 .open-kimi-style.json,作为风格链路的可审计证据。

    A project directory may be passed instead of the manifest only when it contains exactly one .pptd file. Existing output files are not overwritten unless --force is passed.

  7. Local export requirements and boundaries:

    • requires python3, PyYAML, and python-pptx; it does not open or log into Kimi and does not require Node.js, Chrome, or a PPTX conversion service;
    • local PNG/JPEG/GIF files inside the PPTD project are embedded directly; remote images are downloaded only when the PPTD explicitly references their URLs;
    • advanced browser-only effects that cannot be represented exactly are approximated, and every approximation/failure is returned in warnings instead of silently dropping content;
    • font family and size declarations are preserved, but font files are not embedded, so playback machines should have the selected fonts installed;
    • do not claim PowerPoint/WPS/Keynote playback compatibility solely because ZIP validation succeeds.
  8. After export, verify that the output exists and report the generated path. Confirm that every slide has exactly one root-level fade transition in valid CT_Slide order (cSld, optional clrMapOvr, transition, optional timing/extLst) and that the PPTX ZIP passes integrity checks. A byte-string search for <p:fade> is insufficient because Office ignores transitions nested inside cSld. For higher-risk decks, additionally inspect font parts and representative rendered/opened pages as appropriate.

  9. When the user wants to open or edit a PPTD project manually, the optional local browser editor may be started with npx open-kimi-ppt-skill serve. This editor is never part of automatic PPTX delivery; all automatic exports must keep using skill_runner.py export locally.

  10. Do not require or recommend a Kimi login for delivery. The generated PPTX and self-contained PPTD project are the primary deliverables.

  11. Element animations (page.animations in PPTD — entrance / emphasis / exit / motion-path; see reference/pptd.md §6): use them only when the user explicitly requests animations, or when the deck is clearly intended for live presentation / slideshow playback and animation provides a clear benefit for staged disclosure, process demonstration, causal explanation, pacing, visual impact, or brand storytelling. By default, do not add element animations to reading-oriented, self-study, print, or primarily send-and-browse decks. Prefer 1–3 animation groups per page and simple effects such as fade, fly, and zoom. This is separate from the default PPTX slide-level fade page transition written by the runner.

  12. Speaker notes (notes on each .page): use them only when the user explicitly requests them; otherwise, do not add them.

  13. Parallel tool calls: during PPT production, make tool calls in parallel whenever possible; in each round, write multiple page files in parallel to reduce the number of steps.

Signals

GitHub stars
57
Forks
9
Last commit
Sep 2026

ahel review

  • K6low
    bundled executables the agent is told to run
  • K1binfo
    installs-packages (in scripts/export_pptx.py)
  • K1binfo
    installs-packages (in scripts/local_export_pptx.py)

Automated review, not a security audit. Ruleset v1+k2.

Advanced
Catalog kind
skill
Gateway key
open-kimi-ppt
Source
github.com/sunyifeisb-art/legalwork