Creating Presentations
Before writing any code, confirm two things are known: audience and purpose/context of the deck. If either is missing from the user's request, ask immediately:
- Siapa audiens presentasi ini (BoD/Management, Tim Teknis, Klien, Public)?
- Apa tujuan utama dan konteks deck (Quarterly Business Review, Project Update, Approval Proposal, dll)?
Once both are known (or already provided), go straight to generation. Don't re-ask if the user already gave this context.
Minimal working generator skeleton:
Pythonfrom pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) NAVY = RGBColor(0x0F, 0x1B, 0x2D) SLATE = RGBColor(0x2E, 0x3B, 0x4E) ACCENT = RGBColor(0x1F, 0x6F, 0xEB) # royal blue WHITE = RGBColor(0xFF, 0xFF, 0xFF) LIGHT_GRAY = RGBColor(0xE6, 0xE9, 0xEE) blank = prs.slide_layouts[6] def add_background(slide, color=NAVY): bg = slide.shapes.add_shape(1, 0, 0, prs.slide_width, prs.slide_height) bg.fill.solid() bg.fill.fore_color.rgb = color bg.line.fill.background() bg.shadow.inherit = False slide.shapes._spTree.remove(bg._element) slide.shapes._spTree.insert(2, bg._element) return bg def add_title(slide, text, top=Inches(0.5)): box = slide.shapes.add_textbox(Inches(0.6), top, Inches(12.1), Inches(1)) tf = box.text_frame tf.text = text p = tf.paragraphs[0] p.font.size = Pt(34) p.font.bold = True p.font.color.rgb = WHITE return box slide = prs.slides.add_slide(blank) add_background(slide) add_title(slide, "Quarterly Business Review — Q3 2024") prs.save("output.pptx")
Progress checklist for every deck request:
- Step 1: Confirm/ask Audience and Purpose/Context
- Step 2: Draft slide outline (title, agenda, 1 message per content slide, closing)
- Step 3: Apply design system (16:9, color palette, typography hierarchy)
- Step 4: Write python-pptx code generating each slide with real content
- Step 5: Execute code to produce the actual
.pptxfile - Step 6: Deliver the downloadable file path to the user
1. Verification & Context Gatekeeping
Never skip this. If audience/context are ambiguous, ask the two questions above before producing any slide or code. If the request is clearly informal/internal with enough detail already (e.g. "buatkan deck update proyek X untuk tim engineering, isinya progress sprint ini"), treat that as sufficient context and proceed.
2. Design & Content Principles
- Ratio: Always 16:9 —
Inches(13.333) x Inches(7.5). - Density: Max 3–5 bullet points per slide. Prefer card/column layouts over dense bullet lists for comparisons, stats, or multi-topic slides.
- Palette: Deep Navy (
#0F1B2D) or Slate Grey (#2E3B4E) as base/background, Royal Blue (#1F6FEB) or Teal (#14B8A6) as accent, White/Light Gray for text. No raw neon colors. - Typography hierarchy:
- Title: 32–40pt, bold
- Subtitle: 18–22pt, medium
- Body/bullets: 14–18pt, concise, action-oriented phrasing (verb-first)
- One idea per slide. If content needs more than 5 points, split into two slides or a summary + appendix.
3. File Generation
- Generate real
.pptxvia executed Python code — never describe slides without producing the file. - Build reusable helper functions (
add_background,add_title,add_card,add_bullet_list) to keep styling consistent across slides. - Use shapes (rounded rectangles) for "cards" to group related stats or points, with subtle padding (0.3–0.5 inch) and consistent corner radius.
- After generation, confirm the output file exists and give the user the file name/path.
Example 1:
Input: "Buatkan presentasi update proyek migrasi cloud untuk tim manajemen, fokus ke timeline, risiko, dan budget."
Output: Deck 16:9 bernama cloud_migration_update.pptx dengan slide: Cover → Agenda → Executive Summary (3 poin kunci) → Timeline (visual milestone cards) → Risks (3 card merah/kuning/hijau by severity) → Budget (table/chart ringkas) → Next Steps → Closing. Palet navy + royal blue, font Calibri/Arial, max 5 bullet per slide.
Example 2: Input: "Tolong buatkan deck pitch startup fintech." Output: Karena audiens dan konteks (investor? internal? demo day?) belum jelas, tanyakan dulu: "Siapa audiens presentasi ini (investor, internal team, calon klien)?" dan "Apa tujuan deck ini (fundraising pitch, product demo, partnership proposal)?" sebelum membuat file.
- Selalu gunakan layout blank (
slide_layouts[6]) dan bangun elemen manual agar styling konsisten dan tidak terbatas tema bawaan. - Gunakan grid/alignment konsisten (margin kiri-kanan 0.6", spacing antar elemen 0.2–0.3").
- Untuk data numerik, gunakan big-number callouts (angka besar + label kecil) dibanding tabel polos saat memungkinkan.
- Simpan warna dan ukuran font sebagai konstanta di awal skrip agar mudah di-reuse antar slide.
- Beri judul slide yang deskriptif dan berorientasi insight (contoh: "Revenue Tumbuh 23% QoQ" bukan sekadar "Revenue").
- Jangan langsung generate file sebelum audiens/konteks dikonfirmasi — ini menghasilkan deck generik yang salah sasaran.
- Jangan memakai rasio 4:3 (default python-pptx) — selalu set eksplisit ke 16:9.
- Jangan menumpuk lebih dari 5 bullet points atau paragraf panjang dalam satu slide.
- Jangan gunakan warna neon mentah atau kombinasi warna kontras rendah (misal teks abu-abu di atas navy gelap tanpa cukup contrast ratio).
- Jangan hanya mendeskripsikan isi slide dalam teks chat — skill ini wajib menghasilkan file
.pptxnyata.