Skip to content
cccskills
FreePublished on GitHub

tekion-slide-generator-v4

TEKION Slide Generator v4 — プレゼンスライド生成(OpenAI GPT-image-2 デフォルト / Gemini 3.1 Flash 両対応)。「スライドを作って」「プレゼン資料」で発動。Markdown/テキスト→デザインガイドライン→並列画像生成→PPTX/PDF。

日本語テキスト精度重視の営業資料・提案書はOpenAI、大量生成や実在ブランド/人物はGemini。Visual/Balanced 2スタイル、ロゴ/参考画像、グラウンディング、Thinking制御対応。

The English summary is being prepared. Showing the original description.

Works withOpenAIGemini
See how to install

Files included (50)

  • SKILL.md16.4 KB
  • .github/workflows/release.yml3.0 KB
  • .gitignore1.0 KB
  • agents/nanobanana-prompt-generator-subagent.md11.8 KB
  • assets/logo.png13.9 KB
  • CONTRIBUTING.md4.1 KB
  • design-setup/README.md3.3 KB
  • design-setup/scripts/derive_palette.py1.6 KB
  • design-setup/scripts/slugify.py1.2 KB
  • design-setup/SKILL.md31.5 KB
  • docs/branding.md7.2 KB
  • docs/installation.md4.8 KB
  • docs/screenshots/branding.png976.4 KB
  • docs/screenshots/cover.png803.0 KB
  • docs/screenshots/pipeline.png1.1 MB
  • docs/screenshots/providers.png1.1 MB
  • docs/screenshots/quality.png1.3 MB
  • docs/screenshots/solution.png1.0 MB
  • docs/screenshots/styles.png1.4 MB
  • docs/skill-guide.md21.6 KB
  • docs/style-prompt-diff.md12.6 KB
  • LICENSE1.0 KB
  • README.md15.3 KB
  • references/architecture.md2.6 KB
  • references/design_guidelines_template.md7.5 KB
  • references/presets/example-preset-presentation.md5.7 KB
  • references/presets/example-preset.md9.7 KB
  • references/quality-checklist.md601 B
  • references/troubleshooting.md879 B
  • requirements.txt66 B
  • scripts/compare_providers.py9.3 KB
  • scripts/export_to_pdf.py6.0 KB
  • scripts/export_to_pptx.py7.3 KB
  • scripts/footer_utils.py4.8 KB
  • scripts/generate_prompts_from_json.py17.8 KB
  • scripts/generate_slide_with_retry.py14.8 KB
  • scripts/generate_slides_parallel.py11.1 KB
  • scripts/merge_chunks.py3.6 KB
  • scripts/providers/__init__.py439 B
  • scripts/providers/base.py3.1 KB
  • scripts/providers/openai.py10.9 KB
  • scripts/providers/registry.py984 B
  • scripts/regenerate_slide.py7.3 KB
  • scripts/render_test.py9.3 KB
  • scripts/setup.sh4.4 KB
  • scripts/validate_slides_json.py8.9 KB
  • templates/prompt_template_balanced.j26.6 KB
  • templates/prompt_template_visual.j27.0 KB
  • templates/prompt_template.j26.1 KB
  • tests/test_v3_flash_features.py28.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

TEKION Slide Generator v4

実行モード

mode: auto  # Pre-flight〜Phase 5を承認なしで連続実行
pause_only_on: [route_ambiguous, api_key_missing]
chain_commands: true  # bashは && で連結

定数

SKILL_DIR="<path-to-this-skill>"
PYTHON="python3"

前提条件

  • Python 3.10+
  • Gemini API Key(.env.local または GEMINI_API_KEY 環境変数) — --provider gemini 時
  • OpenAI API Key(.env.local または OPENAI_API_KEY 環境変数) — --provider openai 時
  • SubAgent定義(ルートB使用時): ~/.claude/agents/nanobanana-prompt-generator-subagent.md(setup.sh が ${SKILL_DIR}/agents/ から自動インストール)

初回セットアップ:

bash ${SKILL_DIR}/scripts/setup.sh

言語ルール

display_language: "ターゲット聴衆に合わせる(素材の言語ではない)"
target_fields: [title, subtitle, key_message, content]
english_allowed: "固有名詞のみ (Cursor, MCP等)"
content_suffix: "※スライド上の全テキストは{lang}で表示すること。"

スタイル選択

Phase 3 のプロンプト生成で --style フラグを指定、またはスライド毎に JSON で _style を付与することで、 スライドの雰囲気(文字量・ビジュアル比率・余白)を切り替えられます。

判断基準スタイルテンプレート
「登壇」「ピッチ」「Keynote風」「ビジュアル重視」「写真主役」visualprompt_template_visual.j2
「営業資料」「提案書」「バランス」「図解と文字の両立」(デフォルト)balancedprompt_template_balanced.j2

visual スタイル(ピッチデッキ風)

  • Apple Keynote / TED Talk の余白美学、Less is more
  • タイトル15文字 + キーメッセージ1文(最大2行)
  • 画面の**60-80%**を1つの大胆なビジュアル(全面写真・巨大数字・大きなシンボル)
  • 複数カード・網羅リストは禁止、大胆な余白
  • 用途: 登壇・ピッチ・表紙・中扉・感情に訴える1枚

balanced スタイル(営業資料・提案書風/デフォルト)

  • Pitch.com / MorningBrew / Figma Slides の洗練
  • 見出し + 3-5項目の簡潔な箇条書き / 2-3ブロックの図解
  • テキスト40-60% / ビジュアル40-60%のバランス
  • 情報網羅は求めず、要点を絞る
  • 用途: 営業資料・提案書・プラン比較・実績紹介(今回のVibeCoder Bootcamp資料相当)

スライド毎のオーバーライド(_style)

slides_plan.json で個別指定可能:

{
  "source_file": "00_cover",
  "_style": "visual",    ← 表紙だけ visual にする
  "title": "...",
  "content": "..."
}

_style が未指定なら --style のデフォルトを継承。

ユースケース別レコメンド

用途推奨備考
登壇用ピッチ資料visual表紙・章扉・キーメッセージを visual で
営業資料・提案書balanced今回の VibeCoder Bootcamp 相当
表紙+本編の混在--style balanced + 表紙だけ _style: visual最も良く使うパターン

ルート選択

判断基準ルート
「サクッと」「一括で」「まとめてスライドにして」B(高速)
「いい感じに」「ちゃんと」「プレゼン用に」A(高品質)
迷ったら聞く: 「丁寧に作る?サクッと作る?」—
  • ルートA: 10-15枚、見た目重視。JSON手動作成5-10分 + 生成2-3分
  • ルートB: 20枚以上、速度重視。SubAgent並列JSON自動生成、全自動2-3分

Provider選択

デフォルトは OpenAI (gpt-image-2)。特段の理由がない限り OpenAI を使う。

判断基準Provider
指定なし(デフォルト)openai
「OpenAIで」「GPTで」「gpt-image-2で」openai
「Geminiで」「nano bananaで」「3.1 Flashで」gemini
日本語テキスト精度・営業資料・提案書openai
Google検索グラウンディング必要gemini
20枚以上の大量生成でコスト抑えたいgemini(並列度20・無料枠)
透明背景 / 参考画像多数(最大16枚)openai

比較したい場合: compare_providers.py で同じプロンプトで両方生成(後述)。

レート制限の目安(OpenAI)

TierIPM推奨--max-parallel
153
2208
35010
415020
525020+

Pre-flight

  1. .env.local から GEMINI_API_KEY を確認(プロジェクトルート → ~/.claude/.env.local の順)
  2. 未設定 → STOP(APIキー取得案内: https://aistudio.google.com/apikey)
  3. 依存チェック:
python3 -c "import PIL, pptx, requests, jinja2; print('OK')" 2>/dev/null || bash ${SKILL_DIR}/scripts/setup.sh

Phase 0: セッション準備

TIMESTAMP=$(date +%Y-%m-%d_%H%M) && OUTPUT_DIR="[指定された出力先]" && SESSION_DIR="${OUTPUT_DIR}/slides_output/${TIMESTAMP}" && mkdir -p ${SESSION_DIR}/{json,prompts,images}

Phase 1: デザインガイドライン作成

テンプレート: ${SKILL_DIR}/references/design_guidelines_template.md

プリセット使用時:

design-setup スキルでブランドを設定済みなら references/presets/.active_preset にプリセット名が記録されている。それを優先し、無ければ example-preset.md にフォールバックする。

ACTIVE_PRESET_FILE="${SKILL_DIR}/references/presets/.active_preset"
if [ -f "${ACTIVE_PRESET_FILE}" ]; then
  PRESET_NAME=$(cat "${ACTIVE_PRESET_FILE}")
  PRESET_PATH="${SKILL_DIR}/references/presets/${PRESET_NAME}"
  [ -f "${PRESET_PATH}" ] || PRESET_PATH="${SKILL_DIR}/references/presets/example-preset.md"
else
  PRESET_PATH="${SKILL_DIR}/references/presets/example-preset.md"
fi
cp "${PRESET_PATH}" "${SESSION_DIR}/design_guidelines.md"
echo "Using preset: $(basename "${PRESET_PATH}")"

カスタム作成時 — テンプレート参照し以下を決定:

  1. カラーパレット(テーマに合った色)
  2. 写真スタイル(ターゲット層の年代・性別・シーン)
  3. トーン(1-2文で方向性)
  4. フォントサイズ(ターゲットに応じて調整)
cat > ${SESSION_DIR}/design_guidelines.md << 'EOF'
[カスタマイズした内容]
EOF

Phase 2: slides_plan.json 作成(最重要)

route_a: 手動作成

入力を読み、各スライドの content を丁寧に書く。

content に含める項目:

  • <!-- Pattern X: 説明 --> — レイアウトヒント
  • 表示テキスト全文(タイトル、箇条書き、数値データ)
  • 背景写真指示(被写体、構図、雰囲気)
  • 図解・アイコン・グラフの内容
  • カラー使い分け(アクセント色の配置)
  • 言語強制: ※スライド上の全テキストは{lang}で表示すること。

構成目安: 表紙(G) → 課題提起(C/D) → ソリューション(B/C) → 市場(J) → ビジネスモデル(E) → 差別化(H/A) → ロードマップ(I) → まとめ(D) → CTA(G)

route_b: SubAgent並列

  1. MDファイルを Glob で検出
  2. 3-5個ずつチャンク分割
  3. 各チャンクに nanobanana-prompt-generator-subagent を並列起動(同一メッセージ内で複数Task呼び出し)
  4. 統合:
${PYTHON} ${SKILL_DIR}/scripts/merge_chunks.py \
  --input-dir ${SESSION_DIR}/json \
  --output ${SESSION_DIR}/json/slides_plan.json

グラウンディング制御

_grounding条件
true実在する製品・都市・ブランド・市場データ
false(デフォルト)抽象図解・テキスト中心・表紙/中扉・オリジナルイラスト

JSONスキーマ

{
  "slides": [
    {
      "slide_number": 0,
      "source_file": "00_cover",
      "title": "タイトル",
      "subtitle": "サブタイトル",
      "content": "<!-- Pattern G --> ...",
      "key_message": "核心メッセージ1文",
      "_grounding": false
    }
  ],
  "total_slides": 12
}

フィールド:

  • 必須: slide_number(数値), source_file(文字列), title, subtitle, content
  • オプション: key_message(文字列), _grounding(真偽値)
  • 禁止: slide_type, layout, visual_description(デザイン判断はGeminiが行う)

命名規則: 表紙 "00_cover" / 本編 "01_xxx"〜"97_xxx" / まとめ "98_summary" / CTA "99_cta"

バリデーション

cat > ${SESSION_DIR}/json/slides_plan.json << 'JSONEOF'
{作成したJSON}
JSONEOF
${PYTHON} ${SKILL_DIR}/scripts/validate_slides_json.py --file ${SESSION_DIR}/json/slides_plan.json

Phase 3: プロンプト生成 + グラウンディングマップ

.active_style ファイル(design-setup が書き出す)があればその値を --style に渡す。無ければ balanced。

ACTIVE_STYLE_FILE="${SKILL_DIR}/references/presets/.active_style"
if [ -f "${ACTIVE_STYLE_FILE}" ]; then
  STYLE=$(cat "${ACTIVE_STYLE_FILE}")
  [ -z "${STYLE}" ] && STYLE=balanced
else
  STYLE=balanced
fi

${PYTHON} ${SKILL_DIR}/scripts/generate_prompts_from_json.py \
  --session-dir ${SESSION_DIR} \
  --json-file json/slides_plan.json \
  --output-dir prompts \
  --design-guidelines ${SESSION_DIR}/design_guidelines.md \
  --style "${STYLE}" \
  --image-size 2K

スタイル切替:

  • --style balanced (デフォルト) — 営業資料・提案書風
  • --style visual — ピッチデッキ風(文字極少、ビジュアル主役)
  • JSON で個別指定 — 各スライドに "_style": "visual" を書けば、そのスライドだけ Visual に

JSONでの混在例:

{"source_file": "00_cover", "_style": "visual", "title": "...", "content": "..."},
{"source_file": "01_body", "title": "...", "content": "..."}

→ 表紙だけ Visual、本編は --style のデフォルト(balanced)を継承。

Phase 3.5: プロンプト検証(任意)

${PYTHON} ${SKILL_DIR}/scripts/render_test.py \
  --session-dir ${SESSION_DIR} \
  --design-guidelines ${SESSION_DIR}/design_guidelines.md

Phase 3.7: リファレンス画像マップ作成(任意)

特定のスライドに参照画像(キャラクター・ロゴ・写真等)をGeminiに渡したい場合、リファレンス画像マップを作成する。

cat > ${SESSION_DIR}/reference_image_map.json << 'JSONEOF'
{
  "Ryoko": "/path/to/ryoko_avatar.jpeg",
  "5-1.1_オープニング_07": "/path/to/specific_image.png"
}
JSONEOF

マッチングルール:

  • キーがスライドのベース名に部分一致すれば適用される
  • 例: "Ryoko" → 5-3.6_総合ケーススタディ_Ryoko_01.png にマッチ
  • 完全一致キーが優先される

ユーザーが画像を添付した場合、${SESSION_DIR}/images/ にコピーしてマップに登録する。

Phase 4: スライド画像生成

OpenAI GPT-image-2(デフォルト)

if [ -f .env.local ]; then source .env.local; elif [ -f ~/.claude/.env.local ]; then source ~/.claude/.env.local; fi && \
${PYTHON} ${SKILL_DIR}/scripts/generate_slides_parallel.py \
  --prompts-dir ${SESSION_DIR}/prompts \
  --output-dir ${SESSION_DIR}/images \
  --api-key "${OPENAI_API_KEY}" \
  --max-parallel 10 --max-retries 3 \
  --image-size 2K \
  --logo ${SKILL_DIR}/assets/logo.png \
  --reference-image-map ${SESSION_DIR}/reference_image_map.json

--provider openai は省略可能(デフォルト)。並列数はTier 3想定で10、Tier 5なら20+まで増やせます。

画質: デフォルトは medium(速度・コスト・見栄えのバランス重視)。最高画質が必要なときのみ --quality high を明示する。

  • medium(デフォルト): 通常の営業資料・提案書・大量生成。
  • high: 表紙・登壇用ピッチ・印刷物・最終納品など、最高画質が必要な場面のみ。
  • ユーザーが「ハイクオリティで」「最高画質で」「印刷用に」「登壇用に」と明言した場合は --quality high を付与する。

Gemini(サブ・大量生成向け)

if [ -f .env.local ]; then source .env.local; elif [ -f ~/.claude/.env.local ]; then source ~/.claude/.env.local; fi && \
${PYTHON} ${SKILL_DIR}/scripts/generate_slides_parallel.py \
  --provider gemini \
  --prompts-dir ${SESSION_DIR}/prompts \
  --output-dir ${SESSION_DIR}/images \
  --api-key "${GEMINI_API_KEY}" \
  --max-parallel 20 --max-retries 3 \
  --image-size 2K \
  --thinking-level High \
  --grounding-map ${SESSION_DIR}/grounding_map.json \
  --logo ${SKILL_DIR}/assets/logo.png \
  --reference-image-map ${SESSION_DIR}/reference_image_map.json

注意事項:

  • --logo は常に付与する — ユーザーが明示的に「ロゴ不要」と言った場合のみ省略
  • OpenAI時はロゴ・参考画像があるスライドは自動で /images/edits にルーティング
  • OpenAI時は --thinking-level / --grounding-map は無視される(警告表示)
  • OpenAI時の解像度マップ: 1K=1792x1008, 2K=2752x1536, 4K=3840x2160(すべて16:9)
パラメータデフォルト選択肢適用
--providergeminigemini, openai両方
--image-size2K512px, 1K, 2K, 4K両方
--logo${SKILL_DIR}/assets/logo.png常に付与両方
--reference-image-mapなしJSONファイルパス両方
--thinking-levelHighminimal, HighGeminiのみ
--grounding-mapなしJSONファイルパスGeminiのみ
--qualitymediumauto, low, medium, highOpenAIのみ(最高画質要求時のみ high)
--backgroundautoauto, transparent, opaqueOpenAIのみ

プロバイダ比較(実測)

同じプロンプトで Gemini / OpenAI を並列生成し、比較レポートを出力:

${PYTHON} ${SKILL_DIR}/scripts/compare_providers.py \
  --prompts-dir ${SESSION_DIR}/prompts \
  --output-dir ${SESSION_DIR}/compare \
  --gemini-api-key "${GEMINI_API_KEY}" \
  --openai-api-key "${OPENAI_API_KEY}" \
  --image-size 2K \
  --limit 5 \
  --logo ${SKILL_DIR}/assets/logo.png

出力: ${SESSION_DIR}/compare/{gemini,openai}/*.png と comparison.md, comparison.json

Phase 4.5: 単一スライド再生成(任意)

${PYTHON} ${SKILL_DIR}/scripts/regenerate_slide.py \
  --slide {source_file} \
  --session-dir ${SESSION_DIR} \
  --api-key "${GEMINI_API_KEY}" \
  --max-retries 3 \
  --image-size 2K \
  --thinking-level High \
  --logo ${SKILL_DIR}/assets/logo.png

グラウンディング有効時は --grounding を追加。 バージョニング: _01.png → _01_v2.png → _01_v3.png(Phase 5は最新を自動選択)

Phase 5: PPTX/PDF生成

${PYTHON} ${SKILL_DIR}/scripts/export_to_pptx.py \
  --input-dir ${SESSION_DIR}/images --output ${OUTPUT_DIR}/${OUTPUT_NAME}.pptx && \
${PYTHON} ${SKILL_DIR}/scripts/export_to_pdf.py \
  --input-dir ${SESSION_DIR}/images --output ${OUTPUT_DIR}/${OUTPUT_NAME}.pdf

参照ドキュメント

ファイル内容
references/architecture.mdアーキテクチャ図 + API仕様
references/troubleshooting.mdトラブルシューティング
references/quality-checklist.md品質チェックリスト
references/design_guidelines_template.mdデザインガイドラインテンプレート
references/presets/プリセット集
templates/prompt_template.j2Jinja2テンプレート

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

TEKION Slide Generator v4 のブランドデザインを対話形式でカスタマイズするセットアップスキル。branding.md の Asset 層・Guideline 層(ロゴ/配色/フォント/トーン/ブランドムード/参考デザイン/禁止事項)を 1 問ずつ対話で設定し、次回のスライド生成に自動適用されるプリセットを生成する。「デザインを設定したい」「ブランドをカスタマイズしたい」「テーマを変えたい」「自社カラーに設定して」「ロゴを設定して」で発動。

The English summary is being prepared. Showing the original description.

rsensui2/tekion-slide-generator8Updated May 25, 2026

See all skills by rsensui2

Report a problem with this skill