From claude-skills
Creates and modifies PowerPoint PPTX presentations via direct XML manipulation with Node.js scripts. Supports adding/editing slides, layouts, images, shapes, POTX templates. Activates on 'presentation', 'slides', 'deck', '.pptx'.
npx claudepluginhub trkbt10/claude-skillsThis skill uses the workspace's default tool permissions.
PowerPointプレゼンテーションをXML直接編集で作成。
package-lock.jsonpackage.jsonreferences/ooxml-reference.mdreferences/slide-patterns.mdscripts/add-image.jsscripts/add-shape.jsscripts/add-slide.jsscripts/apply-potx.jsscripts/clone-slide.jsscripts/create-base.jsscripts/delete-slide.jsscripts/edit-text.jsscripts/generate-base.jsscripts/lib/constants.jsscripts/lib/content-types.jsscripts/lib/relationships.jsscripts/lib/xml-utils.jsscripts/list-layouts.jsscripts/list-slides.jsscripts/pack.jsCreates, edits, and analyzes PPTX presentations using markdown conversion for text and Python unpack for XML access to slides, layouts, notes, comments, themes.
Create, edit, analyze .pptx presentations: extract text to markdown, unpack/edit XML for slides, layouts, notes, comments using Python scripts.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
PowerPointプレゼンテーションをXML直接編集で作成。
必ず最初にユーザーに確認する:
何をしたいですか?
- 新規作成: 新しいプレゼンテーションを作成
- テーマ適用: 既存のPPTXに新しいテーマ(POTX)を適用してデザインを変更
- 編集: 既存のPPTXの内容を編集(テーマ変更なし)
プレゼンテーションのテンプレート(POTX)はお持ちですか?
持っている場合: テンプレートのテーマ、色、レイアウトを適用します 持っていない場合: クリエイティブなテンプレートを探すお手伝いをしましょうか?
以下のサイトで無料のPOTX/PPTXテンプレートを入手可能:
| サイト | 特徴 |
|---|---|
| Slidesgo | モダン、多彩なスタイル、Google Slides/PPTX両対応 |
| SlidesCarnival | ビジネス向け、シンプル、完全無料 |
| ALLPPT | 大量のテンプレート、業界別カテゴリ |
| Canva | デザイン性高い、PPTXエクスポート可能 |
| Microsoft 365 | 公式、Office最適化 |
ユーザーへの提案例:
| シナリオ | ワークフロー |
|---|---|
| テンプレートあり(新規作成) | テンプレート適用 |
| テンプレートなし(新規作成) | ベースから作成 |
| 既存PPTXにテーマ適用 | 既存ファイルへのテーマ適用 |
| 既存ファイル編集(テーマ変更なし) | 編集ワークフロー |
# 1. ベース展開
node scripts/unpack.js assets/base.pptx ./work
# 2. テンプレート適用
node scripts/apply-potx.js ./work user-template.potx
# 3. レイアウト確認
node scripts/list-layouts.js ./work
# 4. スライド構築
node scripts/add-slide.js ./work --layout 2
node scripts/edit-text.js ./work --slide 2 --placeholder title --text "タイトル"
# 5. パック
node scripts/pack.js ./work output.pptx
# 1. ベース展開
node scripts/unpack.js assets/base.pptx ./work
# 2. スライド構築
node scripts/add-slide.js ./work --layout 1 # タイトルスライド
node scripts/add-slide.js ./work --layout 2 # コンテンツスライド
# 3. テキスト編集
node scripts/edit-text.js ./work --slide 1 --placeholder ctrTitle --text "タイトル"
# 4. パック
node scripts/pack.js ./work output.pptx
既存のPPTXファイルに新しいテーマ(POTX)を適用して、デザインを一新する。 スライドの内容は保持しつつ、色、フォント、背景、レイアウトスタイルが変更される。
# 1. 既存PPTXを展開
node scripts/unpack.js existing-presentation.pptx ./work
# 2. 現在の構造を確認
node scripts/list-slides.js ./work
node scripts/list-layouts.js ./work
# 3. テーマ(POTX)を適用
node scripts/apply-potx.js ./work new-theme.potx
# 4. 新しいレイアウトを確認
node scripts/list-layouts.js ./work
# 5. (オプション)内容の微調整
# テーマ変更後、レイアウトの調整が必要な場合
node scripts/edit-text.js ./work --slide 1 --placeholder title --text "調整後タイトル"
# 6. パック
node scripts/pack.js ./work themed-output.pptx
POTXファイルがなくても、PPTXファイルからテーマを抽出できる:
# PPTXファイルでも同じコマンドで適用可能
node scripts/apply-potx.js ./work design-source.pptx
# 1. 展開
node scripts/unpack.js existing.pptx ./work
# 2. 構造確認
node scripts/list-slides.js ./work
# 3. 編集
node scripts/edit-text.js ./work --slide 1 --placeholder title --text "新タイトル"
# 4. パック
node scripts/pack.js ./work updated.pptx
| スクリプト | 用途 | 使用例 |
|---|---|---|
unpack.js | PPTX展開 | node scripts/unpack.js input.pptx ./work |
pack.js | PPTX作成 | node scripts/pack.js ./work output.pptx |
apply-potx.js | テンプレート適用 | node scripts/apply-potx.js ./work template.potx |
add-slide.js | スライド追加 | node scripts/add-slide.js ./work --layout 2 |
delete-slide.js | スライド削除 | node scripts/delete-slide.js ./work --slide 3 |
clone-slide.js | スライド複製 | node scripts/clone-slide.js ./work --source 1 |
edit-text.js | テキスト編集 | node scripts/edit-text.js ./work --slide 1 --placeholder title --text "..." |
add-image.js | 画像追加 | node scripts/add-image.js ./work --slide 1 --image logo.png |
list-layouts.js | レイアウト一覧 | node scripts/list-layouts.js ./work |
list-slides.js | スライド一覧 | node scripts/list-slides.js ./work |
visualize-slide.js | ASCII構造表示 | node scripts/visualize-slide.js ./work --slide 1 |
add-shape.js | シェイプ自由配置 | node scripts/add-shape.js ./work --slide 1 --type textbox ... |
| # | 名前 | プレースホルダー |
|---|---|---|
| 1 | Title Slide | ctrTitle, subTitle |
| 2 | Title and Content | title, body |
| 3 | Section Header | title, body |
| 4 | Two Content | title, body×2 |
| 5 | Comparison | title, body×4 |
| 6 | Title Only | title |
| 7 | Blank | (なし) |
| 8 | Content with Caption | title, body×2 |
| 9 | Picture with Caption | title, body, pic |
| 10 | Title and Vertical Text | title, body |
| 11 | Vertical Title and Text | title, body |
標準レイアウトでは表現できない場合、add-shape.jsでシェイプを自由配置。
# スライドのシェイプ配置をASCIIアートで表示
node scripts/visualize-slide.js ./work --slide 1
出力例:
+----------------------------------------------------------------------+
| |
| +--------------------------+ |
| | [1] | |
| +--------------------------+ |
| |
+----------------------------------------------------------------------+
Shapes:
[1] TextBox 4
Position: (2.00", 3.00") Size: 5.00" × 1.00"
Text: "Custom Text..."
# テキストボックス追加(テーマ色対応)
node scripts/add-shape.js ./work --slide 1 --type textbox \
--text "見出し" --x 2 --y 1 --width 5 --height 1 \
--color accent1 --font-size 24 --bold
# 矩形追加
node scripts/add-shape.js ./work --slide 1 --type rect \
--x 1 --y 5 --width 10 --height 0.5 --fill accent2
テンプレート適用後、以下のテーマ色が使用可能:
| 色名 | 用途 |
|---|---|
dk1, dk2 | ダーク(テキスト向け) |
lt1, lt2 | ライト(背景向け) |
accent1〜accent6 | アクセントカラー |
hlink, folHlink | ハイパーリンク |
RGB直接指定も可能: --color FF0000
| オプション | 説明 |
|---|---|
--type | textbox または rect |
--x, --y | 位置(インチ) |
--width, --height | サイズ(インチ) |
--text | テキスト内容 |
--color | テキスト色(テーマ色 or RGB) |
--fill | 塗りつぶし色 |
--font-size | フォントサイズ(pt) |
--bold, --italic | 太字/斜体 |
--align | left, center, right |
複雑なシェイプや高度な書式は ./work/ppt/slides/slideN.xml を直接編集。
詳細は references/slide-patterns.md を参照。
# markitdownでテキスト内容を確認(インストール済みの場合)
python -m markitdown output.pptx
# スライド一覧
node scripts/list-slides.js ./work
# XMLを直接読む
# slideN.xmlの<p:sp>要素でシェイプ構造を確認
生成後、ユーザーにPowerPoint/Google Slidesで開いて確認してもらう。