jpskill.com
🛠️ 開発・MCP コミュニティ

libreoffice-impress

Use when creating, editing, formatting, or extracting LibreOffice Impress (.odp) presentations via UNO, including session-based slide edits, structured targets, lists, tables, charts, media, notes, master pages, patch workflows, and snapshots.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o libreoffice-impress.zip https://jpskill.com/download/18633.zip && unzip -o libreoffice-impress.zip && rm libreoffice-impress.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18633.zip -OutFile "$d\libreoffice-impress.zip"; Expand-Archive "$d\libreoffice-impress.zip" -DestinationPath $d -Force; ri "$d\libreoffice-impress.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して libreoffice-impress.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → libreoffice-impress フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
13

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

LibreOffice Impress

UNO を利用した Impress プレゼンテーション作業には、バンドルされている impress モジュールを使用します。 すべてのパスは絶対パスである必要があります。バンドルされているモジュールは、このスキルのディレクトリの scripts/ に存在するため、PYTHONPATH=<skill_base_dir>/scripts を設定してください。 セットアップまたは実行時の問題が発生した場合は、references/troubleshooting.md を確認してください。

API サーフェス

# セッション以外のユーティリティ
create_presentation(path)
get_slide_count(path)
export_presentation(path, output_path, format)   # formats: "pdf", "pptx"
snapshot_slide(doc_path, slide_index, output_path, width=1280, height=720)

# セッション (主要な編集 API)
open_impress_session(path) -> ImpressSession

ImpressSession のメソッド:
  get_slide_count() -> int
  get_slide_inventory(target: ImpressTarget) -> dict[str, object]
  add_slide(index=None, layout="BLANK")
  delete_slide(target: ImpressTarget)
  move_slide(target: ImpressTarget, to_index)
  duplicate_slide(target: ImpressTarget)
  read_text(target: ImpressTarget) -> str
  insert_text(text, target: ImpressTarget | None = None)
  replace_text(target: ImpressTarget, new_text)
  format_text(target: ImpressTarget, formatting: TextFormatting)
  insert_list(items: list[ListItem], ordered: bool, target: ImpressTarget | None = None)
  replace_list(target: ImpressTarget, items: list[ListItem], ordered: bool | None = None)
  insert_text_box(slide: ImpressTarget, text, placement: ShapePlacement, name=None)
  insert_shape(slide: ImpressTarget, shape_type, placement: ShapePlacement, fill_color=None, line_color=None, name=None)
  delete_item(target: ImpressTarget)
  insert_image(slide: ImpressTarget, image_path, placement: ShapePlacement, name=None)
  replace_image(target: ImpressTarget, image_path=None, placement: ShapePlacement | None = None)
  insert_table(slide: ImpressTarget, rows, cols, placement: ShapePlacement, data=None, name=None)
  update_table(target: ImpressTarget, data)
  insert_chart(slide: ImpressTarget, chart_type, data, placement: ShapePlacement, title=None, name=None)
  update_chart(target: ImpressTarget, chart_type=None, data=None, placement: ShapePlacement | None = None, title=None)
  insert_media(slide: ImpressTarget, media_path, placement: ShapePlacement, name=None)
  replace_media(target: ImpressTarget, media_path=None, placement: ShapePlacement | None = None)
  set_notes(target: ImpressTarget, text)
  get_notes(target: ImpressTarget) -> str
  list_master_pages() -> list[str]
  apply_master_page(target: ImpressTarget, master_target: ImpressTarget)
  set_master_background(target: ImpressTarget, color)
  import_master_page(template_path) -> str
  patch(patch_text, mode="atomic") -> PatchApplyResult
  export(output_path, format)
  reset()
  close(save=True)

# スタンドアロンのパッチユーティリティ
patch(path, patch_text, mode="atomic") -> PatchApplyResult

構造化されたターゲット: ImpressTarget

from impress import ImpressTarget

ImpressTarget(
    kind=(
        "slide" | "shape" | "text" | "table" | "chart" |
        "media" | "notes" | "master_page" | "list" | "insertion" | "image"
    ),
    slide_index=None,
    shape_name=None,
    shape_index=None,
    shape_type=None,
    placeholder=None,
    text=None,
    after=None,
    before=None,
    occurrence=None,
    master_name=None,
)

ターゲットの種類

種類 サポートされるフィールド 使用法
slide slide_index スライドのインベントリ、削除、移動、複製、マスターページ適用
shape slide_index に加えて shape_name または shape_index 1つの汎用的な図形の読み取り/削除
image slide_index に加えて shape_name または shape_index 1つの画像の置換/削除
table slide_index に加えて shape_name または shape_index 1つのテーブルの更新/削除
chart slide_index に加えて shape_name または shape_index 1つのグラフの更新/削除
media slide_index に加えて shape_name または shape_index 1つのメディアオブジェクトの置換/削除
text スライドスコープのセレクターに加えて textafterbeforeoccurrence テキストの読み取り、置換、削除、または書式設定
list スライドスコープのテキストセレクター 1つの構造化されたリストブロックの置換/削除
insertion スライドスコープのセレクターに加えてアンカー テキストまたはリストの挿入
notes slide_index に加えてオプションのテキスト境界 スピーカーノートの読み取りまたは置換
master_page master_name 1つのマスターページの解決

解決ルール

  • スライドインデックスはゼロから始まります。
  • shape_nameshape_index は相互に排他的です。
  • placeholder ターゲットは、titlebodysubtitle などの明示的な値をサポートします。
  • afterbefore を使用して、解決されたテキストを含むオブジェクト内のテキストまたはリストの解決を絞り込みます。
  • オブジェクトターゲットの場合、shape_name を優先します。スライドの順序が安定している場合にのみ shape_index を使用してください。
  • delete_item() は、スライド以外の削除ターゲットを受け入れます: textnoteslistshapeimagetablechart、または media

書式設定ペイロード: TextFormatting

from impress import TextFormatting

TextFormatting(
    bold=None,
    italic=None,
    underline=None,
    font_name=None,
    font_size=None,
    color=None,          # 名前付きの色または整数
    align=None,          # "left" | "center" | "right" | "justify"
)

注:

  • 少なくとも1つの書式設定フィールドを設定する必要があります。
  • color は、名前付きの色または 0xRRGGBB 整数を受け入れます。
  • 段落の配置は、文字のスタイル設定と同じ書式設定ペイロードを通じて適用されます。

ジオメトリペイロード: ShapePlacement

from impress import ShapePlacement

ShapePlacement(x_cm=1.0, y_cm=2.0, width_cm=8.0, height_cm=4.0)
  • ジオメトリの値はセンチメートル単位です。
  • 幅と高さは正の値でなければなりません。

リストアイテム

from impress import ListItem

ListItem(text="Confirm scope", level=0)
  • level はゼロから始まるネストです。
  • ネストはレベルをスキップできません。
  • リストの編集は構造的です。手動で - プレフィックスを追加しないでください。
  • ヘッドレススナップショットレンダリングでは、リストのメタデータが正しい場合でも、箇条書きが視覚的に描画されない場合があります。

Patch DSL

順序付けられた操作を適用するには、patch() または session.patch() を使用します。


[operation]
type = replac

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

LibreOffice Impress

Use the bundled impress modules for UNO-backed Impress presentation work. All paths must be absolute. Bundled modules live under scripts/ in this skill directory, so set PYTHONPATH=<skill_base_dir>/scripts. If setup or runtime issues appear, check references/troubleshooting.md.

API Surface

# Non-session utilities
create_presentation(path)
get_slide_count(path)
export_presentation(path, output_path, format)   # formats: "pdf", "pptx"
snapshot_slide(doc_path, slide_index, output_path, width=1280, height=720)

# Session (primary editing API)
open_impress_session(path) -> ImpressSession

ImpressSession methods:
  get_slide_count() -> int
  get_slide_inventory(target: ImpressTarget) -> dict[str, object]
  add_slide(index=None, layout="BLANK")
  delete_slide(target: ImpressTarget)
  move_slide(target: ImpressTarget, to_index)
  duplicate_slide(target: ImpressTarget)
  read_text(target: ImpressTarget) -> str
  insert_text(text, target: ImpressTarget | None = None)
  replace_text(target: ImpressTarget, new_text)
  format_text(target: ImpressTarget, formatting: TextFormatting)
  insert_list(items: list[ListItem], ordered: bool, target: ImpressTarget | None = None)
  replace_list(target: ImpressTarget, items: list[ListItem], ordered: bool | None = None)
  insert_text_box(slide: ImpressTarget, text, placement: ShapePlacement, name=None)
  insert_shape(slide: ImpressTarget, shape_type, placement: ShapePlacement, fill_color=None, line_color=None, name=None)
  delete_item(target: ImpressTarget)
  insert_image(slide: ImpressTarget, image_path, placement: ShapePlacement, name=None)
  replace_image(target: ImpressTarget, image_path=None, placement: ShapePlacement | None = None)
  insert_table(slide: ImpressTarget, rows, cols, placement: ShapePlacement, data=None, name=None)
  update_table(target: ImpressTarget, data)
  insert_chart(slide: ImpressTarget, chart_type, data, placement: ShapePlacement, title=None, name=None)
  update_chart(target: ImpressTarget, chart_type=None, data=None, placement: ShapePlacement | None = None, title=None)
  insert_media(slide: ImpressTarget, media_path, placement: ShapePlacement, name=None)
  replace_media(target: ImpressTarget, media_path=None, placement: ShapePlacement | None = None)
  set_notes(target: ImpressTarget, text)
  get_notes(target: ImpressTarget) -> str
  list_master_pages() -> list[str]
  apply_master_page(target: ImpressTarget, master_target: ImpressTarget)
  set_master_background(target: ImpressTarget, color)
  import_master_page(template_path) -> str
  patch(patch_text, mode="atomic") -> PatchApplyResult
  export(output_path, format)
  reset()
  close(save=True)

# Standalone patch utility
patch(path, patch_text, mode="atomic") -> PatchApplyResult

Structured Targets: ImpressTarget

from impress import ImpressTarget

ImpressTarget(
    kind=(
        "slide" | "shape" | "text" | "table" | "chart" |
        "media" | "notes" | "master_page" | "list" | "insertion" | "image"
    ),
    slide_index=None,
    shape_name=None,
    shape_index=None,
    shape_type=None,
    placeholder=None,
    text=None,
    after=None,
    before=None,
    occurrence=None,
    master_name=None,
)

Target kinds

Kind Supported fields Use
slide slide_index Slide inventory, deletion, move, duplicate, master-page application
shape slide_index plus shape_name or shape_index Read/delete one generic shape
image slide_index plus shape_name or shape_index Replace/delete one image
table slide_index plus shape_name or shape_index Update/delete one table
chart slide_index plus shape_name or shape_index Update/delete one chart
media slide_index plus shape_name or shape_index Replace/delete one media object
text slide-scoped selectors plus text, after, before, occurrence Read, replace, delete, or format text
list slide-scoped text selectors Replace/delete one structural list block
insertion slide-scoped selectors plus anchors Insert text or a list
notes slide_index plus optional text bounds Read or replace speaker notes
master_page master_name Resolve one master page

Resolution rules

  • Slide indices are zero-based.
  • shape_name and shape_index are mutually exclusive.
  • placeholder targets support explicit values such as title, body, and subtitle.
  • Use after and before to narrow text or list resolution inside one resolved text-bearing object.
  • For object targets, prefer shape_name; use shape_index only when slide order is stable.
  • delete_item() accepts any non-slide delete target: text, notes, list, shape, image, table, chart, or media.

Formatting Payload: TextFormatting

from impress import TextFormatting

TextFormatting(
    bold=None,
    italic=None,
    underline=None,
    font_name=None,
    font_size=None,
    color=None,          # named color or integer
    align=None,          # "left" | "center" | "right" | "justify"
)

Notes:

  • At least one formatting field must be set.
  • Color accepts a named color or 0xRRGGBB integer.
  • Paragraph alignment is applied through the same formatting payload as character styling.

Geometry Payload: ShapePlacement

from impress import ShapePlacement

ShapePlacement(x_cm=1.0, y_cm=2.0, width_cm=8.0, height_cm=4.0)
  • Geometry values are in centimetres.
  • Width and height must be positive.

List Items

from impress import ListItem

ListItem(text="Confirm scope", level=0)
  • level is zero-based nesting.
  • Nesting cannot skip levels.
  • List editing is structural; do not add manual - prefixes.
  • Headless snapshot rendering may not visibly paint bullets even when list metadata is correct.

Patch DSL

Use patch() or session.patch() to apply ordered operations.

[operation]
type = replace_text
target.kind = text
target.slide_index = 2
target.placeholder = body
target.text = Quarterly revenue rose 18%
new_text = Quarterly revenue rose 21%

[operation]
type = insert_list
target.kind = insertion
target.slide_index = 2
target.shape_name = Agenda Box
target.after = Action Items
list.ordered = false
items <<JSON
[
  {"text": "Confirm scope", "level": 0},
  {"text": "Review outputs", "level": 0},
  {"text": "Update notes", "level": 1}
]
JSON

[operation]
type = delete_item
target.kind = chart
target.slide_index = 4
target.shape_name = Disposable Chart

Supported operation types

  • add_slide
  • delete_slide
  • move_slide
  • duplicate_slide
  • insert_text
  • replace_text
  • format_text
  • insert_list
  • replace_list
  • insert_text_box
  • insert_shape
  • delete_item
  • insert_image
  • replace_image
  • insert_table
  • update_table
  • insert_chart
  • update_chart
  • insert_media
  • replace_media
  • set_notes
  • apply_master_page
  • set_master_background

Patch value rules

  • Use target.* fields for the primary target.
  • Use master.* fields for apply_master_page.
  • Use format.* fields for TextFormatting.
  • Use placement.* fields for ShapePlacement.
  • Use list.ordered plus JSON items for list operations.
  • items and data must be valid JSON.
  • Heredoc blocks are supported with <<TAG ... TAG for multiline text or JSON.

Modes

  • atomic stops on first failure, restores the original file bytes, and persists nothing.
  • best_effort keeps successful earlier operations and records later failures.

PatchApplyResult fields:

  • mode
  • overall_status = "ok" | "partial" | "failed"
  • operations = list of PatchOperationResult
  • document_persisted

For standalone patch(path, ...), document_persisted means the changes were saved to disk. For session.patch(...), it means the patch produced successful mutations in the current open session state.

Example: Edit a Deck in Session

from pathlib import Path

from impress import (
    ImpressTarget,
    ListItem,
    ShapePlacement,
    TextFormatting,
    open_impress_session,
)
from impress.core import create_presentation

output = str(Path("test-output/demo.odp").resolve())
create_presentation(output)

with open_impress_session(output) as session:
    session.add_slide(layout="TITLE_AND_CONTENT")
    session.replace_text(
        ImpressTarget(kind="text", slide_index=1, placeholder="title"),
        "Executive Summary",
    )
    session.replace_text(
        ImpressTarget(kind="text", slide_index=1, placeholder="body"),
        "Quarterly revenue rose 18%.",
    )
    session.insert_text_box(
        ImpressTarget(kind="slide", slide_index=1),
        "Action Items",
        ShapePlacement(1.0, 5.0, 10.0, 4.0),
        name="Agenda Box",
    )
    session.insert_list(
        [
            ListItem(text="Confirm scope", level=0),
            ListItem(text="Review output", level=0),
            ListItem(text="Update packaging", level=1),
        ],
        ordered=False,
        target=ImpressTarget(
            kind="insertion",
            slide_index=1,
            shape_name="Agenda Box",
            after="Action Items",
        ),
    )
    session.format_text(
        ImpressTarget(
            kind="text",
            slide_index=1,
            placeholder="body",
            text="Quarterly revenue rose 18%.",
        ),
        TextFormatting(bold=True, align="center"),
    )

Example: Patch an Existing Presentation

from impress import patch

result = patch(
    "/abs/path/demo.odp",
    """
[operation]
type = replace_text
target.kind = text
target.slide_index = 1
target.placeholder = body
new_text = Quarterly revenue rose 21%.

[operation]
type = insert_media
target.kind = slide
target.slide_index = 1
media_path = /abs/path/demo.wav
placement.x_cm = 1.0
placement.y_cm = 9.0
placement.width_cm = 5.0
placement.height_cm = 3.0
name = Demo Media

[operation]
type = delete_item
target.kind = media
target.slide_index = 1
target.shape_name = Demo Media
""",
    mode="best_effort",
)

print(result.overall_status)

Snapshots

from pathlib import Path
from impress import snapshot_slide

result = snapshot_slide(doc_path, 0, "/tmp/slide1.png")
print(result.file_path, result.width, result.height)
Path(result.file_path).unlink(missing_ok=True)

Use snapshots to verify slide layout after text edits, master-page changes, table/chart placement, or other visual operations.

Common Mistakes

  • Passing a relative path; UNO-facing Impress APIs expect absolute file paths.
  • Using one-based slide indices.
  • Using fragile single-word text anchors when a fuller phrase is available.
  • Expecting exact shape names after LibreOffice-native slide duplication; UNO may rename duplicates such as Name 1.
  • Supplying malformed JSON in items or data patch fields.
  • Calling session methods after session.close().

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。