← 返回 Skills 市场
tinadu-ai

DeckGlobalizer

作者 NANA · GitHub ↗ · v2.1.1 · MIT-0
cross-platform ✓ 安全检测通过
67
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install deckglobalizer
功能描述
Use this skill when the user wants to translate a PowerPoint (.pptx) file into another language while preserving the original layout, fonts, and visual desig...
使用说明 (SKILL.md)

DeckGlobalizer — High-Fidelity Cross-Language PPT Reconstruction

You are operating as DeckGlobalizer, a precision tool for translating PowerPoint presentations while preserving every aspect of the original visual design. Your output must be indistinguishable from a deck built natively in the target language.


Phase 1 — Visual Audit

Use python-pptx to scan the uploaded .pptx file.

  1. Walk the full slide tree and extract all text frames, shapes, and style properties. When traversing GroupShapes (shape_type == 6), recurse into children — but mark them so they are never mistaken for top-level title shapes (pass a top=False flag).
  2. Identify Style Clusters — groups of text elements sharing the same font family, size, weight, color, and layout role (e.g. slide title, body bullet, caption, label).
  3. Detect any existing target-language text already present (e.g. English captions on a Chinese deck) — these act as alignment anchors for Tone of Voice calibration.
  4. Run an initial font audit: list every typeface name found across all slides, including inside groups and tables. Flag anything unexpected.
  5. Output a Style_Manifest.md with the following table per cluster:
    Cluster Role Font Size Bold Color Count

Stop here. Present the Style Manifest to the user and wait for confirmation before proceeding to Phase 2.


Phase 2 — Semantic Alignment (Tiered Glossary)

Produce a Tiered_Glossary.md with three tiers:

Tier 1 — Industry Standard Terms

Auto-detect the document domain (Finance, Tech, Medical, Legal, etc.) from slide content. Apply the standard professional vocabulary for that domain in the target language. Do not improvise these terms — use established equivalents.

Tier 2 — Proprietary / Invented Concepts

Identify terms that are:

  • High-frequency across slides, OR
  • Positioned at structurally central locations (slide titles, section headers, diagram node labels), OR
  • Appear to be invented or branded (e.g. fund names, product names, framework names)

For each Tier 2 term: do not translate directly. Infer meaning from surrounding context, then offer 2–3 target-language candidates with a brief rationale. Wait for the user to select one before proceeding.

Tier 3 — Scenario Tone of Voice

Detect the document type:

  • Fundraising / Pitch Deck → confident, forward-looking, investor-grade English
  • Product Introduction → clear, benefit-driven, accessible
  • Annual Review / Report → formal, data-forward, conservative
  • Technical Document → precise, jargon-accurate, passive voice acceptable

Apply the corresponding tone consistently throughout all translations.

Stop here. Present the full Tiered Glossary and wait for user sign-off before executing any slide translations.


Phase 3 — Page-by-Page Execution

Process slides one at a time. For each slide, follow this checklist in order:

  1. Merge multi-run paragraphs before translating. Chinese PPTX files often split one sentence across 10–20 runs due to inline formatting. If you translate only the first run, the rest remain in the source language. Before writing any translation, consolidate all runs in a paragraph into the first run (preserving the first run's rPr), then write the full translated string.

  2. Translate all text using the confirmed glossary and tone.

  3. Apply font changes per the target font spec (defined by the user or an active profile). See Font Operation Rules below.

  4. Apply the Layout Compensator rules below.

  5. Verify: confirm no source-language text remains. Show the user a before/after summary and wait for approval before moving to the next slide.


Font Operation Rules

These rules govern how fonts are written into the PPTX XML. Follow them precisely — mistakes here produce invisible rendering errors that are hard to debug.

Classification

  • Classify font choice at the paragraph level, not the run level. All runs within one paragraph must receive the same font. Do not let different runs in one paragraph end up with different fonts.
  • Within a page, elements of the same type (same visual role, same size range) must use the same font. Do not alternate fonts across visually equivalent elements.

Title Detection

A shape qualifies as a "title" only when all of the following are true:

  • It is a top-level shape (not a child inside a GroupShape)
  • Its top coordinate is between 0 and ~200,000 EMU (the very top strip of the slide)
  • It has a text frame

GroupShape children inherit the group's position — their raw top values are relative and must not be used for title detection.

XML Surgery

When writing font information into a run's rPr element:

  1. Never create a new rPr if one does not already exist. Creating a blank rPr forces PowerPoint to fill in default EA fonts (often 华文中宋 or 等线), polluting the entire slide. If rPr is None, skip that run entirely.

  2. Delete before writing. Remove the \x3Ca:sym>, \x3Ca:latin>, \x3Ca:ea>, and \x3Ca:cs> child elements first, then append fresh ones with the correct attributes. Leaving \x3Ca:sym> causes theme-font fallback even when latin is set correctly.

  3. Write all three slots. Set latin, ea, and cs explicitly. Leaving ea unset lets the OS fill in a default CJK font.

  4. Include panose, pitchFamily, and charset on each font element. These ensure correct rendering across platforms.

Global Font Audit

After completing all slides, run a final sweep across the entire file:

  • Extract every typeface value from every run on every slide (including inside groups and table cells)
  • List any font that does not match the target font spec
  • Present to the user for confirmation or auto-fix

Number Verification Step

After completing translation, extract all text containing numbers from both the source and target files and present a side-by-side table for the user to verify.

Pay particular attention to unit conversions. For Chinese source documents:

  • 亿 = 100,000,000 (i.e., 1亿 = 100M; 10亿 = 1B; 130亿 = 13B)
  • 万 = 10,000
  • Watch for mixed formats like $130亿 (dollar sign + Chinese unit) — convert the unit but keep the currency symbol

Do not rely on the user to catch conversion errors. Show the table and ask for explicit confirmation before delivery.


Layout Compensator Rules (Non-Negotiable)

These rules are enforced on every text element, in priority order:

  1. Never move a text box. Coordinates (left, top, width, height) are frozen.
  2. If translated text overflows its text frame, apply fixes in this order:
    • Step 1 — Refine: Shorten the translation without losing meaning. Do not drop any factual claim, number, or named concept — only remove redundant phrasing and decorative language.
    • Step 2 — Spacing: Reduce line spacing (space_after, space_before) and character spacing incrementally, within ±15% of original.
    • Step 3 — Scale: Reduce font size in 0.5pt steps until text fits.
  3. Sibling Consistency Enforcement: If any element in a visual group (e.g. four parallel feature boxes, a row of stat callouts) has its font size reduced, all sibling elements at the same hierarchy level on that slide must be reduced to the same size — even if they individually fit at the larger size.

Implementation Notes

  • Use python-pptx for all file operations. Do not use Office automation or COM.
  • For cross-file slide operations, drop to zipfile + lxml directly.
  • Preserve all non-text elements (images, shapes, icons, charts) exactly.
  • Write output to \x3Coriginal_filename>_\x3Ctarget_lang>.pptx in the same directory.
  • All intermediate files (Style_Manifest.md, Tiered_Glossary.md) are written to the same directory as the source file.
  • All translation is performed by the Claude model itself. This skill does not call external translation APIs (Google Translate, DeepL, Azure Translator, etc.) and does not send document content to any third-party service. Document content never leaves the current session.

Required Python Environment

python-pptx>=0.6.21
lxml>=4.9

Install: pip install python-pptx lxml

安全使用建议
This skill appears to do what it says: inspect and translate PPTX files while preserving layout and fonts. Before using it: 1) Work on copies/backups of your .pptx files (XML-level edits can corrupt files). 2) Ensure the environment has the required Python packages (python-pptx>=0.6.21, lxml>=4.9) or be prepared to let the agent install them. 3) Pay attention to the Phase checkpoints and review the Style_Manifest and Tiered_Glossary before proceeding. 4) Be aware the tool deliberately skips runs with no existing rPr and enforces paragraph-level font rules — test on a representative slide to confirm the behavior matches your expectations. If you need automated installs or networked glossary lookups, ask for clarification or an install spec before enabling the skill.
功能分析
Type: OpenClaw Skill Name: deckglobalizer Version: 2.1.1 The DeckGlobalizer skill is a specialized tool for translating PowerPoint presentations while preserving layout and formatting. It uses standard libraries (python-pptx, lxml) and provides detailed, task-oriented instructions for the AI agent, including multi-phase workflows, font-handling rules, and unit conversion logic (e.g., handling Chinese units like 亿 and 万). The technical instructions for 'XML Surgery' in SKILL.md are consistent with high-fidelity PPTX manipulation and do not show signs of malicious intent, data exfiltration, or unauthorized execution.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
The name/description match the instructions: the skill analyzes and edits .pptx files, builds style and glossary artifacts, and performs slide-by-slide translation and XML-level font handling. The declared Python packages (python-pptx, lxml) are appropriate for this work.
Instruction Scope
Instructions stay within the translation/localization task but perform low-level XML surgery (manipulating run properties, deleting/adding <a:latin>, <a:ea>, etc.) and include rules that can cause runs without existing rPr to be skipped. This is within scope for preserving rendering but is potentially fragile and could leave untranslated text or corrupt formatting if implemented incorrectly. The skill requires human confirmations between phases, which limits blind automation.
Install Mechanism
This is an instruction-only skill with no install spec. The SKILL.md lists required Python packages but does not provide an installation step. That is not inherently malicious, but operators must ensure the runtime environment has python-pptx and lxml available (or the agent will need permission to install them).
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or system access beyond reading/writing the target .pptx files.
Persistence & Privilege
The skill is not always-enabled and does not request persistent system-wide changes. It does not modify other skills' configs or require elevated presence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install deckglobalizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /deckglobalizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.1
Add requires field declaring python-pptx and lxml dependencies. Explicitly state all translation is performed by the Claude model — no external translation APIs are called and document content does not leave the session.
v2.1.0
Clarify layout compensator: refining translation must not drop factual content, numbers, or named concepts. Remove cross-file slide copying section.
v1.0.0
- Initial release of DeckGlobalizer skill for high-fidelity PowerPoint translation. - Translates .pptx files into another language while preserving original layout, fonts, and design. - Multi-phase workflow: Style audit with manifest, tiered glossary with user sign-off, page-by-page translation with layout compensator rules. - Strict text fitting and sibling-consistency logic to maintain professional appearance. - Outputs translated deck and intermediate documentation files in the source file directory.
元数据
Slug deckglobalizer
版本 2.1.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

DeckGlobalizer 是什么?

Use this skill when the user wants to translate a PowerPoint (.pptx) file into another language while preserving the original layout, fonts, and visual desig... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 67 次。

如何安装 DeckGlobalizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install deckglobalizer」即可一键安装,无需额外配置。

DeckGlobalizer 是免费的吗?

是的,DeckGlobalizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

DeckGlobalizer 支持哪些平台?

DeckGlobalizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 DeckGlobalizer?

由 NANA(@tinadu-ai)开发并维护,当前版本 v2.1.1。

💬 留言讨论