slidej について
slidejは、JSONからPowerPoint資料を生成し、PPTXをJSONに解析するツールです。スライドを構造化データで作成・確認したいユーザー向けに、テンプレートや各種要素、アニメーション設定を備えています。
主な機能
- 01JSONからPPTXを生成
- 02PPTXをJSONに解析
- 03複数のプレゼンテーションテンプレート
- 04テキスト、図形、画像、表を設定
- 05要素のアニメーションと順序を指定
活用シーン
- 01構造化コンテンツから資料を作成
- 02既存のPPTXをJSONに変換して確認
- 03表や図を含むレポートを作成
- 04スライド要素のアニメーションを構成
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ h4pplness/ slidej --skill slidejインストール後、Claude Code で/slidejを入力して読み込まれたか確認します。
詳細
SlideJ — エージェントガイド
クイックスタート
# JSON -> PPTX
slidej generate input.json -o output.pptx
slidej gen input.json -o output.pptx # alias
# PPTX -> JSON
slidej parse input.pptx -o output.json
slidej parse input.pptx # stdout
slidej parse input.pptx --no-images -o out.json
# Templates
slidej template list # list all
slidej template info <name> # show style guide
slidej template use <name> -o deck.json # export for editing
slidej template save input.json <name> -d "Description" -t "tag1,tag2"
slidej template remove <name>
# Helpers
slidej schema # print JSON schema
slidej example -o example.json # demo deck
テンプレート
| テンプレート | スタイル | 最適な用途 |
|---|---|---|
title-slide | ダークなヒーロー画面、中央揃え | タイトル画面、セクション区切り |
pitch-deck | プロフェッショナルなダークからライトへの配色 | ピッチ、提案 |
report | すっきりした企業向けデザイン、表 | レポート、ダッシュボード |
minimal | 余白、タイポグラフィ | 学術用途、テキスト中心の内容 |
dark-modern | ダークな UI、グラデーションのアクセント | テクノロジー、SaaS デモ |
sunset-wave | 温かみのあるグラデーション、有機的なデザイン | クリエイティブ、ストーリーテリング |
candy-pop | 白地に大胆なポップアート | イベント、キャンペーン |
ocean-aurora | 深みのある寒色系、輝き | テクノロジーの紹介、プレミアム |
neon-garden | 黒地にネオン | クリエイティブエージェンシー、エンターテインメント |
JSON 構造
ルート
{
"width": 13.333,
"height": 7.5,
"meta": { "title": "Title", "author": "Author" },
"theme": {
"colors": { "accent1": "4472C4", "accent2": "ED7D31" },
"majorFont": "Calibri Light",
"minorFont": "Calibri"
},
"slides": [...]
}
スライド
{
"background": "1A1A2E",
"transition": "fade",
"elements": [...]
}
背景:16 進数文字列 "1A1A2E"、またはグラデーションオブジェクト:
{
"type": "gradient",
"stops": [
{ "position": 0, "color": "0B0B1F" },
{ "position": 100, "color": "162447" }
],
"angle": 135
}
トランジション:"fade" | "push" | "wipe" | "split" | "cover" | "cut" | "dissolve" | "random"、またはオブジェクト { "type": "fade", "speed": "med", "advanceAfter": 3000 }。
要素
すべての要素に、インチ単位の position: { x, y, w, h } を必ず指定してください。
スライドサイズ:幅 13.333" x 高さ 7.5"。セーフマージン:各辺 0.5"。
ルール
- 色は # を付けない 16 進数です。
"#FF0000"ではなく"FF0000"を使用してください。 - フォントサイズの単位は ポイントです。テキストのサイズは自動調整されません。テキストがはみ出す場合は、
fontSizeを小さくするか、ボックスを大きくしてください。 - 画像の
srcパスは、JSON ファイルのディレクトリを基準に解決されます。 - 改行には、テキスト文字列内で
"\n"を使用してください。
テキスト
{
"type": "text",
"text": "Hello World",
"position": { "x": 1, "y": 1, "w": 10, "h": 1.5 },
"fontSize": 36,
"bold": true,
"color": "FFFFFF",
"fontFamily": "Calibri Light",
"align": "center",
"vertAlign": "middle"
}
複数の段落(各項目が個別の段落になります):
"text": [
{ "text": "Heading", "fontSize": 28, "bold": true, "color": "FFFFFF" },
{ "text": "Subtitle", "fontSize": 16, "color": "AAAAAA" }
]
1 つの段落内で複数の書式を使う場合:
"text": [
{
"align": "center",
"runs": [
{ "text": "Bold part ", "bold": true, "color": "FF0000" },
{ "text": "normal part", "color": "333333" }
]
}
]
箇条書き:
"text": [
{ "text": "First point", "bullet": true },
{ "text": "Second point", "bullet": true }
]
オプション:fill、line、shadow、rotation、margin、lineSpacing、italic、underline、strike。
図形
{
"type": "shape",
"shapeType": "roundRect",
"position": { "x": 1, "y": 1, "w": 4, "h": 3 },
"fill": "4472C4",
"line": { "color": "333333", "width": 2 },
"text": "Label",
"fontSize": 18,
"color": "FFFFFF",
"align": "center",
"vertAlign": "middle"
}
図形の種類:rect、roundRect、ellipse、triangle、diamond、pentagon、hexagon、octagon、star5、star6、rightArrow、leftArrow、upArrow、downArrow、line、cloud、heart、lightningBolt、callout1、callout2、chevron、donut、blockArc、arc、pie、plaque、can、parallelogram、trapezoid。
塗りつぶしにはグラデーションを使用できます:
"fill": {
"type": "gradient",
"stops": [
{ "position": 0, "color": "4472C4" },
{ "position": 100, "color": "2E5CA8" }
],
"angle": 135
}
オプション:noFill(輪郭線のみ)、adjust(形状の調整)、shadow、rotation。
画像
{
"type": "image",
"src": "assets/photo.png",
"position": { "x": 2, "y": 2, "w": 5, "h": 3 }
}
オプション:hyperlink、crop: { left, top, right, bottom }、line、rotation。
表
{
"type": "table",
"position": { "x": 0.5, "y": 2, "w": 12, "h": 4 },
"headerRow": true,
"fontSize": 14,
"rows": [
["Column A", "Column B", "Column C"],
["Data 1", "100", "OK"]
]
}
スタイル付きセル:{ "text": "Header", "bold": true, "fill": "4472C4", "color": "FFFFFF", "align": "center" }。
表はアニメーションをサポートしません。
グループ
グループは複数の要素を 1 つの単位にまとめます。子要素には絶対座標を使用します(グループを基準とした相対座標ではありません)。
{
"type": "group",
"position": { "x": 0, "y": 0, "w": 8, "h": 8 },
"rotation": 0,
"children": [
{ "type": "shape", "shapeType": "ellipse", "position": { "x": 0, "y": 0, "w": 8, "h": 8 }, "fill": "FAFAFA" },
{ "type": "shape", "shapeType": "ellipse", "position": { "x": 3.8, "y": 0, "w": 0.4, "h": 0.4 }, "fill": "FF0000" }
],
"animations": [
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious", "order": 0 },
{ "type": "spin", "degrees": 90, "duration": 800, "trigger": "afterPrevious", "order": 1 }
]
}
重要なポイント:
- グループの
rotationは初期回転(度数)を設定します。これは固定された基準角度です。 - グループのアニメーションはグループ全体に適用されます。すべての子要素が一緒に移動、フェード、回転します。
- グループの
rotationとspinアニメーションは組み合わせて使えます。スライドごとに異なる基準rotationを設定し、同じspinを追加することで、連続回転の効果を作成できます(例:基準角度を 0、72、144... とし、毎回spinを 72 にする)。 - グループ内の子要素には個別のアニメーションを設定できません。アニメーションが適用されるのはグループ自体のみです。
アニメーション
テキスト、図形、画像、グループの各要素に "animations": [...] を追加します。
"animations": [
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious", "delay": 0 }
]
トリガー(アニメーションの順序を制御)
| トリガー | 動作 |
|---|---|
onClick | マウスクリック時に再生します(デフォルト)。新しいクリックグループを開始します。 |
withPrevious | 直前のアニメーションと同時に再生します。 |
afterPrevious | 直前のアニメーションの終了後に再生します。 |
スライド上の最初の afterPrevious アニメーションは、スライド表示時に自動再生されるため、クリックは不要です。要素を自動的に表示する標準的な方法です。
すべてのアニメーションタイプ
開始(要素が表示されます):
| タイプ | 必須フィールド | 説明 |
|---|---|---|
appear | — | 即座に表示 |
fadeIn | — | 不透明度 0 -> 100% |
flyIn | direction | 指定した方向から飛び込む |
wipeIn | direction | 指定した方向からワイプ表示 |
zoomIn | — | 0% から 100% に拡大 |
splitIn | — | 両開きドアのように表示 |
bounceIn | — | オーバーシュートしながら拡大 |
floatIn | — | フェード + 上方向への垂直移動 |
swivel | — | フェード + 水平方向への展開 |
dissolveIn | — | ディゾルブ効果 |
終了(要素が消えます):
| タイプ | 必須フィールド | 説明 |
|---|---|---|
fadeOut | — | 不透明度 100% -> 0 |
flyOut | direction | 指定した方向へ飛び出す |
wipeOut | direction | 指定した方向へワイプアウト |
zoomOut | — | 100% から 0% に縮小 |
floatOut | — | フェード + 遠ざかるように移動 |
dissolveOut | — | ディゾルブで消える |
強調(要素はすでに表示されています):
| タイプ | 必須フィールド | 説明 |
|---|---|---|
pulse | scale(デフォルト 110) | 一時的にサイズを脈動させる |
spin | degrees(デフォルト 360) | その場で回転 |
growShrink | scale | 拡大/縮小 |
colorChange | color | 塗りつぶしを新しい色にアニメーション |
transparency | opacity | 不透明度 % までアニメーション |
teeter | degrees | 前後に揺らす |
blink | — | 素早く表示/非表示 |
モーション:
| タイプ | 必須フィールド | 説明 |
|---|---|---|
motionPath | points 配列または path+direction+distance | パスに沿って移動 |
方向の値(flyIn/Out、wipeIn/Out 用)
top、bottom、left、right、topLeft、topRight、bottomLeft、bottomRight
アニメーションパターン
パターン 1:順番に開始(要素が1つずつ表示される)
各要素で、delay を増やしながら afterPrevious を使用します。
// Element 1 — auto-plays on slide entry (first afterPrevious = auto-play)
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious" }
// Element 2 — starts after element 1 finishes, plus 200ms pause
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious", "delay": 200 }
// Element 3 — starts after element 2 finishes, plus 200ms pause
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious", "delay": 200 }
パターン 2:同時に開始(複数の要素が一度に表示される)
同時に表示する要素には withPrevious を使用します。
// Element 1
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious" }
// Element 2 — plays at the same time as Element 1
{ "type": "fadeIn", "duration": 500, "trigger": "withPrevious" }
パターン 3:スライド表示時にシーケンスを自動再生
すべて afterPrevious にすると、スライドの表示時にシーケンス全体が自動再生されます。
// Title fades in automatically
{ "type": "fadeIn", "duration": 800, "trigger": "afterPrevious" }
// Subtitle fades in after title, with a 300ms gap
{ "type": "fadeIn", "duration": 600, "trigger": "afterPrevious", "delay": 300 }
// Divider line wipes in after subtitle
{ "type": "wipeIn", "direction": "right", "duration": 400, "trigger": "afterPrevious", "delay": 200 }
// Content cards fly in one by one
{ "type": "flyIn", "direction": "bottom", "duration": 600, "trigger": "afterPrevious", "delay": 200 }
{ "type": "flyIn", "direction": "bottom", "duration": 600, "trigger": "afterPrevious", "delay": 200 }
パターン 4:1つの要素に複数のアニメーションを設定
1つの要素に、順番に再生される複数のアニメーションを設定できます。order を使用して順序を制御します。
"animations": [
{ "type": "fadeIn", "duration": 300, "trigger": "afterPrevious", "order": 0 },
{ "type": "spin", "degrees": 72, "duration": 900, "trigger": "afterPrevious", "order": 1 }
]
パターン 5:スライドをまたいで回転するホイール
基本の rotation がスライドごとに変わるグループと、spin アニメーションを使用します。
// Slide 2: rotation 0, spin +72
{ "type": "group", "rotation": 0, "animations": [
{ "type": "fadeIn", "duration": 300, "trigger": "afterPrevious", "order": 0 },
{ "type": "spin", "degrees": 72, "duration": 900, "trigger": "afterPrevious", "order": 1 }
]}
// Slide 3: rotation 72, spin +72
{ "type": "group", "rotation": 72, "animations": [
{ "type": "fadeIn", "duration": 300, "trigger": "afterPrevious", "order": 0 },
{ "type": "spin", "degrees": 72, "duration": 900, "trigger": "afterPrevious", "order": 1 }
]}
// Slide 4: rotation 144, spin +72
{ "type": "group", "rotation": 144, "animations": [...same...] }
各スライドは、前のスライドが終わった位置から開始します(基本の rotation = 前の基本値 + spin の角度)。
パターン 6:クリックして表示(インタラクティブ)
クリック時にのみ表示する要素には onClick を使用します。
// Visible immediately
{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious" }
// Appears on first click
{ "type": "fadeIn", "duration": 500, "trigger": "onClick" }
// Appears on second click
{ "type": "flyIn", "direction": "left", "duration": 600, "trigger": "onClick" }
レイアウトリファレンス
スライド:13.333" x 7.5"。セーフエリア:x=0.5〜x=12.833、y=0.5〜y=7.0。
Y=0.4–0.5 Title area (h ~ 1.0–1.5)
Y=1.8–2.0 Content start (h ~ 4.0)
Y=6.0–6.5 Footer / source (h ~ 0.5)
一般的な列レイアウト
| レイアウト | 列 1 | 列 2 | 列 3 |
|---|---|---|---|
| 2列 | x=0.5, w=5.9 | x=6.8, w=5.9 | — |
| 3列 | x=0.5, w=3.8 | x=4.7, w=3.8 | x=8.9, w=3.8 |
| 4列 | x=0.5, w=2.83 | x=3.67, w=2.83 | x=6.83, w=2.83 |
列間の間隔:約 0.4"。
N 個の項目を水平方向に中央揃え
式:itemW、gap、N 個の項目が与えられた場合:
- totalW = N * itemW + (N-1) * gap
- startX = (13.333 - totalW) / 2
- 各項目:x = startX + i * (itemW + gap)
項目を円形に配置
中心が (cx, cy)、半径が R の円周上に N 個の項目をサイズ s で配置する場合:
- angle_i = i * (360 / N) - 90(上から開始)
- x = cx + R * cos(angle_i) - s/2
- y = cy + R * sin(angle_i) - s/2
コンポーネント(概要)
これらは自動的にプリミティブなグループに展開されます。position と、任意で animations を指定します。
progressBar
{ "type": "progressBar", "position": { "x": 1, "y": 1, "w": 5, "h": 0.5 },
"value": 72, "color": "4472C4", "trackColor": "E6E6E6", "showLabel": true }
progressRing
{ "type": "progressRing", "position": { "x": 1, "y": 1, "w": 2, "h": 2 },
"value": 65, "color": "70AD47", "trackColor": "E6E6E6", "thickness": 0.16, "showLabel": true }
barChart
{ "type": "barChart", "position": { "x": 1, "y": 3, "w": 6, "h": 3 },
"data": [40, 70, 55, 90], "labels": ["Q1", "Q2", "Q3", "Q4"],
"colors": ["4472C4", "5B9BD5", "70AD47", "ED7D31"], "showValues": true, "axis": true }
kpiCard
{ "type": "kpiCard", "position": { "x": 1, "y": 1, "w": 3, "h": 1.5 },
"value": "$1.2M", "label": "Revenue", "delta": "+12%", "accent": "5B9BD5" }
ratingStars
{ "type": "ratingStars", "position": { "x": 1, "y": 1, "w": 4, "h": 0.9 },
"rating": 4, "max": 5, "color": "FFC000", "emptyColor": "D9D9D9" }
timeline
{ "type": "timeline", "position": { "x": 1, "y": 1.5, "w": 11, "h": 2 },
"items": [{ "label": "2021", "sub": "Founded" }, { "label": "2022", "sub": "Seed" }],
"dotColor": "4472C4", "lineColor": "CCCCCC" }
processFlow
{ "type": "processFlow", "position": { "x": 1, "y": 5, "w": 6, "h": 0.8 },
"steps": ["Plan", "Build", "Test", "Ship"],
"colors": ["4472C4", "5B9BD5", "70AD47", "ED7D31"], "shape": "chevron" }
完全な例:タイトルスライド + コンテンツスライド
{
"width": 13.333, "height": 7.5,
"meta": { "title": "Demo", "author": "Agent" },
"theme": {
"colors": { "accent1": "4472C4", "accent2": "ED7D31" },
"majorFont": "Calibri Light", "minorFont": "Calibri"
},
"slides": [
{
"background": { "type": "gradient", "stops": [{ "position": 0, "color": "0B0B1F" }, { "position": 100, "color": "162447" }], "angle": 135 },
"transition": "fade",
"elements": [
{
"type": "text", "text": "Presentation Title",
"position": { "x": 0.8, "y": 2.5, "w": 11.7, "h": 1.2 },
"fontSize": 48, "bold": true, "color": "FFFFFF", "align": "center", "fontFamily": "Calibri Light",
"animations": [{ "type": "fadeIn", "duration": 800, "trigger": "afterPrevious" }]
},
{
"type": "text", "text": "Subtitle goes here",
"position": { "x": 2, "y": 3.8, "w": 9.3, "h": 0.6 },
"fontSize": 20, "color": "8899BB", "align": "center", "fontFamily": "Calibri Light",
"animations": [{ "type": "fadeIn", "duration": 600, "trigger": "afterPrevious", "delay": 300 }]
},
{
"type": "shape", "shapeType": "rect",
"position": { "x": 4.3, "y": 4.6, "w": 4.7, "h": 0.022 },
"fill": "4472C4",
"animations": [{ "type": "wipeIn", "direction": "right", "duration": 500, "trigger": "afterPrevious", "delay": 200 }]
}
]
},
{
"background": "FFFFFF",
"transition": "fade",
"elements": [
{
"type": "text", "text": "Section Title",
"position": { "x": 0.5, "y": 0.4, "w": 12.3, "h": 1 },
"fontSize": 36, "bold": true, "color": "2D3436", "align": "center",
"animations": [{ "type": "fadeIn", "duration": 500, "trigger": "afterPrevious" }]
},
{
"type": "shape", "shapeType": "roundRect",
"position": { "x": 0.5, "y": 1.8, "w": 3.8, "h": 2.5 },
"fill": "4472C4",
"text": [
{ "text": "Card 1", "fontSize": 20, "bold": true, "color": "FFFFFF" },
{ "text": "Description here", "fontSize": 14, "color": "CCDDFF" }
],
"align": "center", "vertAlign": "middle",
"animations": [{ "type": "flyIn", "direction": "bottom", "duration": 600, "trigger": "afterPrevious", "delay": 200 }]
},
{
"type": "shape", "shapeType": "roundRect",
"position": { "x": 4.7, "y": 1.8, "w": 3.8, "h": 2.5 },
"fill": "ED7D31",
"text": [
{ "text": "Card 2", "fontSize": 20, "bold": true, "color": "FFFFFF" },
{ "text": "More details", "fontSize": 14, "color": "FFE0C0" }
],
"align": "center", "vertAlign": "middle",
"animations": [{ "type": "flyIn", "direction": "bottom", "duration": 600, "trigger": "afterPrevious", "delay": 200 }]
},
{
"type": "shape", "shapeType": "roundRect",
"position": { "x": 8.9, "y": 1.8, "w": 3.8, "h": 2.5 },
"fill": "70AD47",
"text": [
{ "text": "Card 3", "fontSize": 20, "bold": true, "color": "FFFFFF" },
{ "text": "Third point", "fontSize": 14, "color": "D4EFCC" }
],
"align": "center", "vertAlign": "middle",
"animations": [{ "type": "flyIn", "direction": "bottom", "duration": 600, "trigger": "afterPrevious", "delay": 200 }]
}
]
}
]
}
ワークフロー:既存の PPTX を変更する
slidej parse original.pptx --no-images -o deck.json # Step 1: parse
# Edit deck.json (remove `id`, `name`, `srcBase64` fields if present)
slidej generate deck.json -o updated.pptx # Step 2: regenerate
ワークフロー:テンプレートから作成
slidej template list # browse
slidej template info pitch-deck # see style guide
slidej template use pitch-deck -o deck.json # export
# Edit deck.json
slidej generate deck.json -o presentation.pptx # generate