slide-making-skill
PptxGenJSを使って、PowerPointのスライドを1枚単位で作成・修正する際に、サイズ調整、配置、文字や画像の挿入、デザイン設定、そしてPowerPoint形式での出力まで、一連の作業をスムーズに行うSkill。
📜 元の英語説明(参考)
Implement single-slide PowerPoint pages with PptxGenJS. Use when writing or fixing slide JS files: dimensions, positioning, text/image/chart APIs, styling rules, and export expectations for native .pptx output.
🇯🇵 日本人クリエイター向け解説
PptxGenJSを使って、PowerPointのスライドを1枚単位で作成・修正する際に、サイズ調整、配置、文字や画像の挿入、デザイン設定、そしてPowerPoint形式での出力まで、一連の作業をスムーズに行うSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o slide-making-skill.zip https://jpskill.com/download/19711.zip && unzip -o slide-making-skill.zip && rm slide-making-skill.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19711.zip -OutFile "$d\slide-making-skill.zip"; Expand-Archive "$d\slide-making-skill.zip" -DestinationPath $d -Force; ri "$d\slide-making-skill.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
slide-making-skill.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
slide-making-skillフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
PptxGenJS スライド作成スキル
このスキルでは、PptxGenJS (JavaScript) を使用してネイティブな .pptx スライドを生成する方法を説明します。
PptxGenJS リファレンス
PptxGenJS API の完全なリファレンスについては、pptxgenjs.md をお読みください。これには以下が含まれます。
- セットアップと基本構造
- テキストと書式設定
- リストと箇条書き
- 図形と影
- 画像とアイコン
- スライドの背景
- 表とグラフ
フォントルール
フォントファミリーの標準
| 言語 | デフォルト | 代替 |
|---|---|---|
| 中国語 | Microsoft YaHei (微软雅黑) | — |
| 英語 | Arial | Georgia, Calibri, Cambria, Trebuchet MS |
fontFace: "Microsoft YaHei" // 中国語テキスト
fontFace: "Arial" // 英語テキスト (または承認された代替フォント)
クロスプラットフォームの互換性のために、システムセーフなフォントを使用してください。ヘッダーと本文で異なるフォントを使用できます(例:Georgia + Calibri)。
本文テキストに太字を使用しない
プレーンな本文テキストおよびキャプション/凡例テキストは、太字を使用してはなりません。
- 本文の段落、説明 → 標準の太さ
- キャプション、凡例、脚注 → 標準の太さ
- 太字はタイトルと見出しのみに予約してください
// ✅ 正しい
slide.addText("Main Title", { bold: true, fontSize: 36, fontFace: "Arial" });
slide.addText("Body text here.", { bold: false, fontSize: 14, fontFace: "Arial" });
// ❌ 間違い
slide.addText("Body text here.", { bold: true, fontSize: 14 });
カラーパレットルール (必須)
厳格なパレット順守
提供されたカラーパレットのみを使用してください。色を作成したり、変更したりしないでください。
- すべての色はユーザー提供のパレットから取得する必要があります
- パレット外の色は使用しないでください
- パレットの色を変更しないでください(明るさ、彩度、混合)
- 唯一の例外:
transparencyプロパティ (0-100) を使用して透明度を追加します
// ✅ 正しい: パレットカラーの使用
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: theme.primary } });
slide.addText("Title", { color: theme.accent });
// ❌ 間違い: パレット外の色
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: "1a1a2e" } });
グラデーションなし
グラデーションは禁止されています。単色のみを使用してください。
// ✅ 正しい: 単色
slide.background = { color: theme.bg };
// ✅ 正しい: オーバーレイに単色 + 透明度
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: theme.accent, transparency: 50 } });
アニメーションなし
アニメーションとトランジションは禁止されています。すべてのスライドは静的でなければなりません。
ページ番号バッジ (必須)
表紙を除くすべてのスライドには、右下隅にページ番号バッジを含める必要があります。
- 位置: x: 9.3", y: 5.1"
- 現在の番号のみを表示します(例:
3または03)。"3/12" のようには表示しません。 - パレットの色を使用し、控えめにしてください。
円形バッジ (デフォルト)
slide.addShape(pres.shapes.OVAL, {
x: 9.3, y: 5.1, w: 0.4, h: 0.4,
fill: { color: theme.accent }
});
slide.addText("3", {
x: 9.3, y: 5.1, w: 0.4, h: 0.4,
fontSize: 12, fontFace: "Arial",
color: "FFFFFF", bold: true,
align: "center", valign: "middle"
});
ピル型バッジ
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 9.1, y: 5.15, w: 0.6, h: 0.35,
fill: { color: theme.accent },
rectRadius: 0.15
});
slide.addText("03", {
x: 9.1, y: 5.15, w: 0.6, h: 0.35,
fontSize: 11, fontFace: "Arial",
color: "FFFFFF", bold: true,
align: "center", valign: "middle"
});
テーマオブジェクト契約 (必須)
コンパイルスクリプトは、これらの正確なキーを持つテーマオブジェクトを渡します。
| キー | 目的 | 例 |
|---|---|---|
theme.primary |
最も濃い色、タイトル | "22223b" |
theme.secondary |
暗いアクセント、本文テキスト | "4a4e69" |
theme.accent |
中間調のアクセント | "9a8c98" |
theme.light |
明るいアクセント | "c9ada7" |
theme.bg |
背景色 | "f2e9e4" |
background、text、muted、darkest、lightest のような他のキー名は絶対に使用しないでください。
サブエージェントの出力形式
各サブエージェントは、完全な実行可能な JS ファイルを出力します。
// slide-01.js
const pptxgen = require("pptxgenjs");
const slideConfig = {
type: 'cover',
index: 1,
title: 'Presentation Title'
};
// ⚠️ 同期である必要があります (非同期ではない)
function createSlide(pres, theme) {
const slide = pres.addSlide();
slide.background = { color: theme.bg };
slide.addText(slideConfig.title, {
x: 0.5, y: 2, w: 9, h: 1.2,
fontSize: 48, fontFace: "Arial", // 英語テキストは Arial を使用
color: theme.primary, bold: true, align: "center"
});
return slide;
}
// スタンドアロンプレビュー - スライド固有のファイル名を使用 (slide-XX-preview.pptx)
if (require.main === module) {
const pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
const theme = {
primary: "22223b",
secondary: "4a4e69",
accent: "9a8c98",
light: "c9ada7",
bg: "f2e9e4"
};
createSlide(pres, theme);
// 競合を避けるため、XX を実際のスライドインデックス (01, 02 など) に置き換えてください
pres.writeFile({ fileName: "slide-01-preview.pptx" });
}
module.exports = { createSlide, slideConfig };
重要な落とし穴
createSlide() で async/await を絶対に使用しない
// ❌ 間違い - compile.js は await しません
async function createSlide(pres, theme) { ... }
// ✅ 正しい
function createSlide(pres, theme) { ... }
16進数カラーに「#」を絶対に使用しない
color: "FF0000" // ✅ 正しい
color: "#FF0000" // ❌ ファイルを破損させます
16進数文字列で不透明度をエンコードしない
shadow: { color: "00000020" } // ❌ ファイルを破損させます
shadow: { color: "000000", opacity: 0.12 } // ✅ 正しい
タイトルでのテキスト折り返しを防ぐ
// ✅ 長いタイトルには fit:'shrink' を使用します
slide.addText("Long Title Here", {
x: 0.5, y: 2, w: 9, h: 1,
fontSize: 48, fit: "shrink"
});
クイックリファレンス
- 寸法: 10" × 5.625" (LAYOUT_16x9)
- 色: # なしの6文字の16進数 (例:
"FF0000") - 英語フォント: Arial (デフォルト)、または承認された代替フォント
- 中国語フォント: Microsoft YaHei
- ページバッジの位置: x: 9.3", y: 5.1"
QA (必須)
t を仮定します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
PptxGenJS Slide Making Skill
This skill teaches how to generate native .pptx slides using PptxGenJS (JavaScript).
PptxGenJS Reference
Read pptxgenjs.md for the complete PptxGenJS API reference, including:
- Setup & basic structure
- Text & formatting
- Lists & bullets
- Shapes & shadows
- Images & icons
- Slide backgrounds
- Tables & charts
Font Rules
Font Family Standards
| Language | Default | Alternatives |
|---|---|---|
| Chinese | Microsoft YaHei (微软雅黑) | — |
| English | Arial | Georgia, Calibri, Cambria, Trebuchet MS |
fontFace: "Microsoft YaHei" // Chinese text
fontFace: "Arial" // English text (or approved alternative)
Use system-safe fonts for cross-platform compatibility. Header/body can use different fonts (e.g., Georgia + Calibri).
No Bold for Body Text
Plain body text and caption/legend text must NOT use bold.
- Body paragraphs, descriptions → normal weight
- Captions, legends, footnotes → normal weight
- Reserve bold for titles and headings only
// ✅ Correct
slide.addText("Main Title", { bold: true, fontSize: 36, fontFace: "Arial" });
slide.addText("Body text here.", { bold: false, fontSize: 14, fontFace: "Arial" });
// ❌ Wrong
slide.addText("Body text here.", { bold: true, fontSize: 14 });
Color Palette Rules (MANDATORY)
Strict Palette Adherence
Use ONLY the provided color palette. Do NOT create or modify colors.
- All colors must come from the user-provided palette
- Do NOT use colors outside the palette
- Do NOT modify palette colors (brightness, saturation, mixing)
- Only exception: Add transparency using the
transparencyproperty (0-100)
// ✅ Correct: Using palette colors
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: theme.primary } });
slide.addText("Title", { color: theme.accent });
// ❌ Wrong: Colors outside palette
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: "1a1a2e" } });
No Gradients
Gradients are prohibited. Use solid colors only.
// ✅ Correct: Solid colors
slide.background = { color: theme.bg };
// ✅ Correct: Solid + transparency for overlay
slide.addShape(pres.shapes.RECTANGLE, { fill: { color: theme.accent, transparency: 50 } });
No Animations
Animations and transitions are prohibited. All slides must be static.
Page Number Badge (REQUIRED)
All slides except Cover Page MUST include a page number badge in the bottom-right corner.
- Position: x: 9.3", y: 5.1"
- Show current number only (e.g.
3or03), NOT "3/12" - Use palette colors, keep subtle
Circle Badge (Default)
slide.addShape(pres.shapes.OVAL, {
x: 9.3, y: 5.1, w: 0.4, h: 0.4,
fill: { color: theme.accent }
});
slide.addText("3", {
x: 9.3, y: 5.1, w: 0.4, h: 0.4,
fontSize: 12, fontFace: "Arial",
color: "FFFFFF", bold: true,
align: "center", valign: "middle"
});
Pill Badge
slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
x: 9.1, y: 5.15, w: 0.6, h: 0.35,
fill: { color: theme.accent },
rectRadius: 0.15
});
slide.addText("03", {
x: 9.1, y: 5.15, w: 0.6, h: 0.35,
fontSize: 11, fontFace: "Arial",
color: "FFFFFF", bold: true,
align: "center", valign: "middle"
});
Theme Object Contract (MANDATORY)
The compile script passes a theme object with these exact keys:
| Key | Purpose | Example |
|---|---|---|
theme.primary |
Darkest color, titles | "22223b" |
theme.secondary |
Dark accent, body text | "4a4e69" |
theme.accent |
Mid-tone accent | "9a8c98" |
theme.light |
Light accent | "c9ada7" |
theme.bg |
Background color | "f2e9e4" |
NEVER use other key names like background, text, muted, darkest, lightest.
Subagent Output Format
Each subagent outputs a complete, runnable JS file:
// slide-01.js
const pptxgen = require("pptxgenjs");
const slideConfig = {
type: 'cover',
index: 1,
title: 'Presentation Title'
};
// ⚠️ MUST be synchronous (not async)
function createSlide(pres, theme) {
const slide = pres.addSlide();
slide.background = { color: theme.bg };
slide.addText(slideConfig.title, {
x: 0.5, y: 2, w: 9, h: 1.2,
fontSize: 48, fontFace: "Arial", // English text uses Arial
color: theme.primary, bold: true, align: "center"
});
return slide;
}
// Standalone preview - use slide-specific filename (slide-XX-preview.pptx)
if (require.main === module) {
const pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
const theme = {
primary: "22223b",
secondary: "4a4e69",
accent: "9a8c98",
light: "c9ada7",
bg: "f2e9e4"
};
createSlide(pres, theme);
// Replace XX with actual slide index (01, 02, etc.) to avoid conflicts
pres.writeFile({ fileName: "slide-01-preview.pptx" });
}
module.exports = { createSlide, slideConfig };
Critical Pitfalls
NEVER use async/await in createSlide()
// ❌ WRONG - compile.js won't await
async function createSlide(pres, theme) { ... }
// ✅ CORRECT
function createSlide(pres, theme) { ... }
NEVER use "#" with hex colors
color: "FF0000" // ✅ CORRECT
color: "#FF0000" // ❌ CORRUPTS FILE
NEVER encode opacity in hex strings
shadow: { color: "00000020" } // ❌ CORRUPTS FILE
shadow: { color: "000000", opacity: 0.12 } // ✅ CORRECT
Prevent text wrapping in titles
// ✅ Use fit:'shrink' for long titles
slide.addText("Long Title Here", {
x: 0.5, y: 2, w: 9, h: 1,
fontSize: 48, fit: "shrink"
});
Quick Reference
- Dimensions: 10" × 5.625" (LAYOUT_16x9)
- Colors: 6-char hex without # (e.g.,
"FF0000") - English font: Arial (default), or approved alternatives
- Chinese font: Microsoft YaHei
- Page badge position: x: 9.3", y: 5.1"
QA (Required)
Assume there are problems. Your job is to find them.
Your first render is almost never correct. Approach QA as a bug hunt, not a confirmation step. If you found zero issues on first inspection, you weren't looking hard enough.
Content QA
python -m markitdown slide-XX-preview.pptx
Check for missing content, typos, wrong order.
Check for leftover placeholder text:
python -m markitdown slide-XX-preview.pptx | grep -iE "xxxx|lorem|ipsum|placeholder"
If grep returns results, fix them before declaring success.
Verification Loop
- Generate slide → Extract text with
python -m markitdown slide-XX-preview.pptx→ Review content - List issues found (if none found, look again more critically)
- Fix issues
- Re-verify — one fix often creates another problem
- Repeat until verification reveals no new issues
Do not declare success until you've completed at least one fix-and-verify cycle.