gai-cli-pptx
v1.0.1
Published
CLI tool for converting JSON to PowerPoint presentations
Maintainers
Readme
name: gai-pptx description: "Skill for generating a PowerPoint presentation from a Markdown document. Use when: an agent needs to convert a Markdown document into a .pptx presentation using gai-pptx." homepage: https://github.com/kakkoii1337/gai-cli-pptx
SKILL: Generating a PowerPoint Presentation from a Markdown Document
This guide explains how to convert a Markdown document into a PowerPoint presentation using gai-cli-pptx.
Overview
- Step 1 — Derive a JSON structure file from the Markdown document
- Step 2 — Call
gai-cli-pptxwith the JSON to generate the PPTX
Step 1: Derive the JSON Structure from the Markdown Document
The Process
Given a Markdown document:
- Read the document and identify its top-level sections (H1/H2 headings).
- Map each section to a slide. The document title becomes the title slide; each major section becomes a content slide.
- Distil each section into a title, optional subtitle, and 3–5 concise bullet points. Do not copy sentences verbatim — summarise.
- Identify the appropriate slide fields from the schema below and populate them.
- Include slide numbers on every slide using the
slideNumberfield. - Add a
labReferenceon any slide that corresponds to a lab section in the source document. Use the format"🛠️ Lab Practice: See Lab Section N - <Title>". This renders as a highlighted call-out box at the bottom of the slide:
{ "labReference": "🛠️ Lab Practice: See Lab Section 1 - Project Setup" }- Add speaker notes containing the full verbatim content from the source document for that section — not a summary. Every piece of theory text should be preserved in
notesso nothing is lost from the original material.
Worked Example
Source document: test/hdwallet.md
Output: test/sample.json
Read the document structure
# Hierarchical Deterministic (HD) Wallets ← document title
## 1. From Keys to Wallets ← section 1
### Core Concepts ← subsection
### Mnemonic Seed Phrases ← subsection
### Protecting Your Mnemonic ← subsection
## 🛠️ Lab Practice: Using Mnemonic Phrase ← section 2 (lab)
## 2. Derivation Paths ← section 3
## 🛠️ Lab Practice: Using Derivation Paths ← section 4 (lab)Decide on slides
| Slide | Source | |-------|--------| | Title slide | Document title (H1) | | "What is an HD Wallet?" | Section 1 + subsections collapsed | | "Derivation Paths" | Section 2 |
Lab practice sections are omitted from slides (too procedural) but captured in speaker notes.
Distil content into bullets
Section 1 has four subsections. Each becomes one bullet:
| Markdown content | Bullet text | |-----------------|-------------| | "generate and manage unlimited addresses from a single master seed" | "Generates multiple addresses from a single seed phrase" | | "Same seed always produces same address sequence" | "Deterministic: same seed always produces same addresses" | | "One mnemonic backs up entire wallet" | "One mnemonic backs up the entire wallet" | | "Typically consist of 12 or 24 words... BIP39 standard" | "BIP39 standard: 12 or 24 words" |
Section 2 lists derivation paths as code — use "fontFace": "Courier New" to preserve monospace appearance.
Populate the JSON
{
"metadata": {
"title": "HD Wallets",
"author": "kakkoii1337",
"company": "GAI",
"subject": "Blockchain Education"
},
"theme": {
"titleColor": "#2E86AB",
"textColor": "#333333",
"accentColor": "#A23B72",
"backgroundColor": "#F8F9FA"
},
"slides": [
{
"title": "Hierarchical Deterministic (HD) Wallets"
},
{
"title": "What is an HD Wallet?",
"bullets": [
{ "text": "Generates multiple addresses from a single seed phrase", "fontSize": 18 },
{ "text": "Deterministic: same seed always produces same addresses", "fontSize": 18 },
{ "text": "One mnemonic backs up the entire wallet", "fontSize": 18 },
{ "text": "BIP39 standard: 12 or 24 words", "fontSize": 18 }
],
"notes": "Cover the core concepts of HD wallets"
},
{
"title": "Derivation Paths",
"subtitle": "How addresses are generated",
"bullets": [
{ "text": "m/44'/60'/0'/0/0 — First address", "fontSize": 18, "fontFace": "Courier New" },
{ "text": "m/44'/60'/0'/0/1 — Second address", "fontSize": 18, "fontFace": "Courier New" },
{ "text": "m/44'/60'/0'/0/2 — Third address", "fontSize": 18, "fontFace": "Courier New" }
],
"notes": "Explain derivation path segments: m / purpose / coin / account / change / index"
}
]
}Slide Field Reference
| Field | Type | When to use |
|-------|------|-------------|
| title | string | Every slide |
| subtitle | string | When a section has a clear sub-theme |
| bullets | array | Main content — prefer 3–5 items |
| bullets[].text | string | Distilled point, not a full sentence |
| bullets[].fontSize | number | 16 default, 18 for fewer bullets |
| bullets[].indentLevel | number | 1 for sub-points |
| bullets[].fontFace | string | "Courier New" for code/paths |
| description | string | A single closing or contextual line |
| labReference | string | Call-out box for lab exercise references |
| notes | string | Speaker notes — detail that won't fit on slide |
| background | string | Hex colour override for this slide only |
Rules of Thumb
- One section → one slide. Merge short subsections; never split a single concept across slides.
- Bullets are summaries, not quotes. Strip filler words; keep the fact.
- Code stays monospace. Set
"fontFace": "Courier New"for any paths, commands, or identifiers. - Notes capture the rest. Anything cut from the slide goes into
notesso the presenter has it. - Aim for 5–10 slides regardless of document length. Compress aggressively.
Step 2: Call gai-cli-pptx to Generate the PPTX
Once the JSON file is ready, run:
npx gai-cli-pptx <source-json-file> <dest-pptx-file>Example
npx gai-cli-pptx test/sample.json test/sample.pptxThe output path is printed to stdout on success. Verify the file exists before proceeding.
