SkillsGrove
SkillsGrove/Офисные документы/Feng-Y-28/unflatten-ppt/unflatten-ppt

unflatten-ppt

Установка

$npx skills add https://github.com/Feng-Y-28/unflatten-ppt --skill unflatten-ppt
$git clone --depth 1 https://github.com/Feng-Y-28/unflatten-ppt.git /tmp/unflatten-ppt && mkdir -p ~/.claude/skills && cp -r /tmp/unflatten-ppt/. ~/.claude/skills/unflatten-ppt
Пожалуйста, установи для меня этот Agent Skill: https://github.com/Feng-Y-28/unflatten-ppt/tree/ebab22b4f8624be186a3c52d55f5aa8c0b5f631b/ — сначала прочитай его SKILL.md и скрипты и устанавливай в мою папку навыков только после того, как убедишься, что он безопасен.

Кратко

Исходное описание · MITConvert PNG screenshots, raster diagrams, generated figure drafts, or reference images into editable PowerPoint slides. Use when the user asks to turn a PNG/image into PPT, recreate a figure as editable PPT elements, make every object editable, export screenshots for comparison, iterate against a reference image, or build a slide from a raster technical diagram instead of embedding the image as a flat bitmap.
Приведённый ниже SKILL.md воспроизведён из Feng-Y-28/unflatten-ppt (коммит ebab22b) под лицензией MIT. Текст не изменён; опущены только метаданные заголовка файла, изображения показаны как ссылки, а очень длинные файлы сокращены. Авторские права: 2026 Feng-Y-28. Лицензия: LICENSE. Показан только файл с инструкциями; скрипты смотрите в исходном репозитории.

PNG to Editable PPT

This skill rebuilds a raster reference image as an editable PowerPoint slide using native PPT objects: text boxes, shapes, connectors, arrows, tables, and grouped layout elements. Do not satisfy the request by pasting the PNG as a single background image unless the user explicitly asks for a non-editable raster slide.

Core Workflow

  1. Inspect the source PNG dimensions and content.

    • Identify the page size, major regions, text blocks, shapes, arrows, colors, and repeated structures.
    • Use the PNG pixel coordinate system as the first layout coordinate system.
  2. Generate an editable PPT reconstruction.

    • Prefer python-pptx for deterministic construction.
    • Set the slide size to match the PNG aspect ratio.
    • Map pixels to EMUs with a simple helper such as EMU_PER_PX = 9144 when using 96 dpi coordinates.
    • Recreate all important elements as editable PowerPoint objects.
    • Keep source-generation code whenever the slide is complex, so future iterations can be regenerated instead of hand-edited.
  3. Export the slide to PNG and compare.

    • Use scripts/export_ppt_slide.ps1 on Windows when PowerPoint is installed.
    • Use scripts/compare_pngs.py to create a side-by-side comparison and basic image-difference metrics.
    • If PowerPoint export is unavailable, use any available office renderer, then state the limitation.
  4. Iterate.

    • Compare the export against the reference image.
    • Fix layout first: canvas size, outer frame, large blocks, and section boundaries.
    • Then fix text: font sizes, wrapping, alignment, labels, and clipped text.
    • Then fix connectors: arrow direction, endpoints, line thickness, dashed lines, and routing.
    • Repeat until there are no obvious structural errors.
  5. Deliver artifacts.

    • Put the editable .pptx in the requested output directory.
    • Also keep the latest exported PNG and a side-by-side comparison PNG when the user asks for screenshot comparison or iterative refinement.
    • Report exact file paths and any remaining known deviations.

Reconstruction Rules

  • Editable means native PPT objects, not one flattened image.
  • Preserve the diagram semantics over pixel-perfect ornamentation.
  • Use the source image as a visual reference, but do not trust OCR blindly; manually verify labels.
  • Use conservative fonts such as Arial/Calibri unless the source clearly needs another font.
  • For technical figures, preserve identifiers exactly: underscores, parentheses, operators, array indices, and capitalization.
  • Use native table/grid cells for register files, matrices, queues, and repeated boxes.
  • Use native connectors for arrows whenever possible; if python-pptx cannot express a required arrowhead directly, patch the OOXML or document the limitation.
  • Keep all generated filenames descriptive and versioned, for example figure_editable.pptx, figure_export_r1.png, figure_compare_r1.png.

Useful Scripts

  • scripts/export_ppt_slide.ps1: export one PowerPoint slide to PNG through local PowerPoint COM automation.
  • scripts/compare_pngs.py: create a side-by-side comparison PNG and print RMS/mean-difference metrics.

Read references/quality-checklist.md before final delivery.

Typical User Requests

  • "Convert this PNG into an editable PPT."
  • "Make every element editable; do not paste the whole image."
  • "After each version, export a screenshot, compare it with the reference, and iterate."
  • "Rebuild this paper figure, architecture diagram, or flowchart from an image into PowerPoint."
  • "Make this raster diagram into an editable PowerPoint slide."
Полный текст лицензии (MIT)
MIT License

Copyright (c) 2026 Feng-Y-28

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.