AGENT SKILL

beamer-ppt

A conversational assistant skill for creating professional LaTeX Beamer presentations through natural dialogue. Users create slides page-by-page with flexible layouts and instant PDF preview. Supports both Chinese (ctex) and English typesetting with multi-project management and undo/redo capabilities.

License 许可
MIT
最近更新
2026-09-18
Stars
★ 234
Forks
36

01 前言 Front Matter

name
beamer-ppt
description
A conversational assistant skill for creating professional LaTeX Beamer presentations through natural dialogue. Users create slides page-by-page with flexible layouts and instant PDF preview. Supports both Chinese (ctex) and English typesetting with multi-project management and undo/redo capabilities.

02 资源文件 31

03 SKILL.md 正文

Beamer PPT Typesetting Assistant

Create professional LaTeX Beamer presentations through conversational interaction.

When to Use This Skill

Use this skill when users want to:

  • Create academic presentations (thesis defense, conference talks, lab group meetings)
  • Build business presentations (product demos, project reports, pitch decks)
  • Design lecture slides for teaching or tutorials
  • Generate LaTeX Beamer code without deep LaTeX expertise
  • Convert content ideas into professionally typeset slides

Core Capabilities

Conversational Slide Creation

Guide users through creating slides one-by-one via natural dialogue. Collect content incrementally, suggest improvements, and confirm before proceeding.

Flexible Layouts

Offer preset layouts from @scripts/layouts/ or interpret custom layout descriptions in natural language. Support single-column, multi-column, image-text combinations, and special arrangements.

Instant PDF Preview

Compile LaTeX after each slide and display the resulting PDF. Enable immediate visual feedback and iteration.

Multi-Project Support

Maintain multiple presentation projects simultaneously. Track project state, enable switching between projects, and resume interrupted sessions.

Language Independence

Separate conversation language from presentation language. Support Chinese (via ctex package) and English typesetting regardless of the dialogue language.

Undo/Redo and History

Maintain complete session history with automatic snapshots. Enable rollback to any previous state and recovery from crashes.

Visual Mode Configuration

Model Capability Detection

At project initialization, determine the AI model's visual capabilities:

[Skill] Please confirm your AI model's capabilities:
A) My model supports image understanding (GPT-4V, Claude 3, etc.)
B) My model does NOT support images (text-only model)

This determines how we preview and refine slides.

Store this choice in beamer-skill.json:

{
  "settings": {
    "visual_mode": "enabled" | "disabled"
  }
}

Allow mode switching mid-session:

[User] /mode visual
[Skill] Switched to visual mode. PDF previews will be converted to images.

[User] /mode text
[Skill] Switched to text mode. Please describe issues you see in the PDF.

PDF-to-Image Tool Detection

When visual mode is enabled, check for required tools at project initialization:

[Skill] Checking PDF-to-image tools...

✓ pdftoppm found (optimal)
⚠ ImageMagick found (fallback)
✗ pdf2image not found

Visual preview: Available
Resolution: 150 DPI (optimal for speed/quality balance)

Tool Priority:

  1. pdftoppm (poppler-utils) - Fastest, best quality

    • macOS: brew install poppler
    • Ubuntu: sudo apt-get install poppler-utils
    • Windows: Download Xpdf tools
  2. ImageMagick (convert) - Fallback option

    • Available on most systems
    • Slower but reliable
  3. pdf2image (Python) - Alternative

    • Requires: pip install pdf2image poppler

Automatic Degradation: If no tools available:

[Skill] ⚠ No PDF-to-image tools detected.

Automatically switching to text-only mode.
You can still create presentations, but I'll rely on
your descriptions to make adjustments.

To enable visual preview later, install:
- macOS: brew install poppler
- Ubuntu: sudo apt-get install poppler-utils
- Windows: https://www.xpdfreader.com/download.html

Or switch anytime with: /mode text

Visual Mode Workflow

When Visual Mode is Enabled:

After compilation:

[Skill] Compiling... ✓ Success!
        Converting to image... ✓ Done!

[Preview Image: page-3.png]

Visual inspection:
✓ Text fits within margins
✓ Image proportions correct
⚠ Title is quite long (3 lines), consider shortening
✓ Good contrast and readability

Options:
A) Accept and continue
B) Fix the long title
C) Other adjustments

When Visual Mode is Disabled:

After compilation:

[Skill] Compiling... ✓ Success!

PDF saved to: ./my-presentation/.beamer-skill/preview/page-3.pdf

Since I cannot view images, please describe what you see:
A) Looks good, continue
B) Text is too small/large
C) Image looks stretched/squashed
D) Text overflows the slide
E) Other issue (please describe)

For detailed visual checks, refer to @references/visual-checklist.md

Visual Inspection Checklist

When visual mode is enabled, systematically check each slide for:

Critical Issues (must fix):

  • Text overflow beyond slide boundaries
  • Image aspect ratio distortion (stretched/squashed)
  • Severe compression artifacts
  • Poor contrast making text illegible

Important Issues (should fix):

  • Font too small/large for content
  • Image quality problems (blurry/pixelated)
  • Alignment problems
  • Title wrapping to too many lines

Enhancement Opportunities:

  • Color harmony
  • Whitespace balance
  • Font hierarchy clarity
  • Consistency across slides

Reference detailed checklist at @references/visual-checklist.md

Getting Started

Starting a New Project

Recognize project initiation requests such as:

  • "帮我做一个关于机器学习的PPT" (Create a presentation about machine learning)
  • "Create a presentation for my thesis defense"
  • "I need slides for a conference talk"

Guide the user through:

  1. Selecting presentation language (Chinese/English)
  2. Choosing a template from available options
  3. Creating slides page-by-page with preview
  4. Refining content based on feedback

Working with Existing Projects

Support project management commands:

  • "打开项目毕业论文答辩" - Open existing project by name
  • "切换到项目组会汇报" - Switch between active projects
  • "继续上次的编辑" - Resume from last saved state
  • "列出所有项目" - Show available projects

Workflow

1. Project Initialization

When starting a new project, present language options:

[Skill] Welcome! I'll help you create a professional Beamer presentation.

Choose presentation language:
A) 中文(简体)- Chinese with ctex package
B) English - Standard English typesetting
C) Other

Note: This determines the PPT content language, independent of our conversation.

Store the language choice in the project configuration and apply appropriate LaTeX packages.

2. Template Selection

After language selection, present template categories:

Academic Templates:

  1. Thesis Defense - Formal academic style for degree presentations
  2. Group Meeting Report - Lab meeting format with progress focus
  3. Conference Talk - Compact format for time-limited talks

Business Templates: 4. Product Demo - Modern style for product introductions 5. Project Report - Professional format for status updates

Teaching Templates: 6. Lecture Slides - Classroom format with clear sections 7. Tutorial - Step-by-step guide format

Load template configuration from @assets/templates/*/template.json files.

3. Page-by-Page Creation

Guide through each slide systematically:

[Skill] ─────────────────────────────────────
        Page 1: Title Slide
        ─────────────────────────────────────
        
        Enter presentation title:

[User] Deep Learning for Medical Image Analysis

[Skill] Enter author name:

[User] John Smith

[Skill] Generating code... Compiling preview...
        
        [Preview Image]
        
        Satisfied?
        A) Yes, continue to next page
        B) Modify layout
        C) Modify content
        D) Delete and redo

Continue this pattern for each slide type defined in the template.

4. Compilation and Preview Process

Step-by-Step Compilation:

After content collection for each slide:

[Skill] Step 1: Generating LaTeX code
        ✓ Frame code written to main.tex
        
        Step 2: Compiling with xelatex
        ✓ Compilation successful
        
        Step 3: Converting to preview format

Compilation Command:

# Standard compilation
xelatex -interaction=nonstopmode -file-line-error main.tex

# With bibliography (if citations present)
xelatex -interaction=nonstopmode main.tex
bibtex main
xelatex -interaction=nonstopmode main.tex
xelatex -interaction=nonstopmode main.tex

Preview Generation:

For visual mode (with tools available):

# Extract current page as PNG (150 DPI)
pdftoppm -f <page_num> -l <page_num> -png -r 150 \
         main.pdf \
         .beamer-skill/preview/page-<page_num>

# Alternative with ImageMagick
convert -density 150 main.pdf[<page_num-1>] \
        .beamer-skill/preview/page-<page_num>.png

Preview File Locations:

  • PDF: .beamer-skill/preview/page-XX.pdf
  • PNG (visual mode): .beamer-skill/preview/page-XX.png
  • Resolution: 150 DPI (optimal balance)

Visual Mode Preview:

[Skill] ✓ Compilation successful
        ✓ Converted to image

[Display: .beamer-skill/preview/page-3.png]

Visual analysis:
✓ Text within boundaries
✓ Image proportions correct  
⚠ Title wraps to 3 lines
✓ Good contrast

Options:
A) Accept and continue
B) Adjust title length
C) Modify layout

Text-Only Mode Preview:

[Skill] ✓ Compilation successful

PDF saved: .beamer-skill/preview/page-3.pdf

Since visual mode is disabled, please review manually
and describe any issues you notice.

Common issues to check:
- Text overflowing slide boundaries
- Images stretched or squashed
- Font too small/large
- Poor alignment

Options:
A) Looks good, continue
B) Describe issues for me to fix

Automatic Error Recovery:

If compilation fails:

[Skill] ⚠ Compilation failed

Error: File `results.png' not found
Location: Slide 3, line 15

Options:
A) Check figures/ folder and retry
B) Skip this image temporarily
C) Use placeholder text instead

If PDF-to-image conversion fails in visual mode:

[Skill] ⚠ PDF conversion failed (tool not available)

Automatically switching to text-only mode for this session.

PDF is still available at: .beamer-skill/preview/page-3.pdf
Please review manually and describe any issues.

To re-enable visual mode, install:
- macOS: brew install poppler
- Ubuntu: sudo apt-get install poppler-utils

5. Layout Options

Standard Layouts (reference @scripts/layouts/):

From single-column/:

  • text-only.tex - Pure text paragraphs
  • bullet-list.tex - Bulleted or numbered lists

From two-column/:

  • image-left.tex - Image on left, text on right
  • image-right.tex - Text on left, image on right

Custom Layouts:

Interpret natural language descriptions:

[User] I want a title at top, then left side big image taking 2/3 width,
       right side three small images stacked vertically

[Skill] Understood! Adjusting to:
        
        ┌─────────────────────┐
        │      Title          │
        ├──────────┬──────────┤
        │          │  Small 1 │
        │   Big    ├──────────┤
        │  (66%)   │  Small 2 │
        │          ├──────────┤
        │          │  Small 3 │
        └──────────┴──────────┘

Generate appropriate LaTeX code using columns, minipages, or custom arrangements.

6. Quick Commands

Support power-user commands for efficiency:

Command Action
/next Proceed to next slide
/list Display all slides with indices
/goto <n> Jump to slide n for editing
/preview Recompile and preview current slide
/delete Remove current slide
/copy Duplicate current slide
/undo Revert last action
/redo Reapply undone action
/theme Change Beamer theme
`/mode [visual text]`
/help Display command reference

Mode Switching:

[User] /mode visual
[Skill] Switched to visual mode.
        PDF previews will be converted to images.
        Requirements: pdftoppm or ImageMagick

[User] /mode text
[Skill] Switched to text-only mode.
        Please describe issues you see in the PDF.
        Useful for text-only AI models.

File Organization

Project Structure

Each presentation project creates a dedicated directory:

my-presentation/
├── main.tex              # Main LaTeX file (always compilable)
├── beamer-skill.json     # Project configuration
├── figures/              # Image resources directory
└── .beamer-skill/        # Skill working directory
    ├── snapshots/        # Undo/redo history
    └── preview/          # Generated preview images

Maintain main.tex in a compilable state at all times. Store project metadata in beamer-skill.json.

Image Resources

Place all images in the figures/ folder:

  • Supported formats: PNG, JPG, PDF, EPS
  • Recommended maximum size: 5MB per image
  • Use relative paths: ./figures/image.png

Automatically:

  • Scan figures folder when inserting images
  • Validate file existence before compilation
  • Suggest optimal sizing parameters
  • Handle path conversion between platforms

Language Support

Chinese Typesetting

When Chinese language is selected:

  • Include ctex package automatically
  • Configure Chinese fonts by OS:
    • Windows: SimSun (serif), SimHei (sans-serif)
    • macOS: PingFang SC
    • Linux: Noto CJK
  • Apply 1.3x line spacing for readability
  • Enable Chinese paragraph indentation
  • Configure proper punctuation spacing
  • Use xelatex compiler (required)

English Typesetting

When English language is selected:

  • Use standard Latin Modern fonts
  • Apply academic/business optimized layouts
  • Enable proper hyphenation
  • Configure appropriate spacing

Mixed Content

Support limited language mixing:

  • Chinese presentations may include English technical terms
  • English presentations may include Chinese characters if needed
  • Handle font switching automatically via ctex or fontspec
  • Warn user if extensive mixing may cause issues

Error Handling

Compilation Errors

Handle common LaTeX issues gracefully:

Missing Images:

  • Detect missing file errors
  • Prompt for correct path or image upload
  • Offer to skip image or use placeholder

Missing Packages:

  • Identify missing package errors
  • Suggest installation commands (tlmgr, apt, etc.)
  • Offer to use alternative packages if available

Font Issues:

  • Detect font not found errors
  • Fallback to available system fonts
  • Suggest manual font configuration

Syntax Errors:

  • Parse LaTeX error logs
  • Attempt auto-fix for common issues
  • Present clear error messages to user

File System Errors

Disk Space:

  • Monitor available space before compilation
  • Suggest cleanup if space is low
  • Offer to delete old snapshots

Permissions:

  • Check write permissions on project directory
  • Provide fix instructions for permission issues
  • Suggest alternative locations if needed

Special Characters:

  • Auto-rename files with problematic characters
  • Escape special characters in LaTeX content
  • Validate paths before use

Environment Issues

LaTeX Not Installed:

  • Detect missing LaTeX installation
  • Provide platform-specific installation guides
  • Suggest minimal distributions for quick start

Missing Compiler:

  • Verify xelatex availability for Chinese
  • Suggest lualatex as alternative
  • Provide compiler configuration options

Outdated Packages:

  • Check package versions when errors occur
  • Suggest updates via tlmgr or package manager
  • Offer workarounds for compatibility issues

Advanced Features

Batch Operations

Enable modifications across multiple slides:

  • "Change all slides to 14pt font"
  • "Switch theme to Madrid for entire presentation"
  • "Adjust line spacing to 1.5 for all content slides"
  • "Replace logo on all slides"

Parse requests and apply changes systematically while validating results.

Page Reordering

Support slide reordering commands:

  • "Move page 3 after page 5"
  • "Swap page 2 and page 7"
  • "Move pages 8-10 to the beginning"
  • "Delete pages 4-6"

Update slide numbering and cross-references automatically.

Snapshots and History

Maintain comprehensive history:

  • Create automatic snapshots after each confirmed slide
  • Support explicit checkpoints: "Save checkpoint named 'before revision'"
  • Display history browser with timestamps
  • Enable recovery if conversation is interrupted
  • Store snapshots in .beamer-skill/snapshots/

Layout Templates

Allow saving custom layouts:

[User] Save current page as template

[Skill] Template name: Three-column timeline
       Description: Timeline with left timestamps, center events, right details
       Saved to: scripts/layouts/custom/
       Available in future projects!

Store user-created layouts for reuse across projects.

Tips and Best Practices

For Users

  1. Start Simple: Begin with standard layouts, customize after mastering basics
  2. Preview Often: Check each slide immediately to catch issues early
  3. Organize Images: Place all images in figures/ before starting
  4. Use Checkpoints: Save named checkpoints before major changes
  5. Incremental Building: Create one page at a time to avoid overwhelm
  6. Project Naming: Use descriptive names for easy project switching

For Skill Execution

  1. Validate Paths: Always verify image paths exist before including in LaTeX
  2. Check Compilability: Ensure main.tex is valid after each modification
  3. Preserve State: Save project state frequently to prevent data loss
  4. Clean Output: Remove auxiliary files after successful compilation
  5. Error Context: Provide helpful context with error messages

Troubleshooting

Compilation is Slow

Causes and Solutions:

  • Large images: Suggest compression or resizing
  • Complex layouts: Simplify or use draft mode
  • Many slides: Compile only current slide for preview

PDF Preview Not Showing

Diagnostic Steps:

  1. Check compilation success in terminal output
  2. Verify LaTeX installation: xelatex --version
  3. Check file permissions in project directory
  4. Verify PDF viewer availability

Chinese Characters Not Displaying

Solutions:

  1. Ensure xelatex is used (not pdflatex)
  2. Check Chinese font installation: fc-list :lang=zh
  3. Try font configuration in .font-config.tex
  4. Verify ctex package is included

Lost Work After Crash

Recovery Options:

  1. Run "继续上次的编辑" or "resume last session"
  2. Check .beamer-skill/snapshots/ for recent versions
  3. Look for auto-save files in project directory
  4. Restore from git if version controlled

References

For detailed technical information, reference these files:

  • @references/latex-basics.md - LaTeX fundamentals and common commands
  • @references/beamer-themes.md - Available themes and customization options
  • @references/visual-checklist.md - Visual quality inspection checklist
  • @README.md - Detailed usage examples and configuration options

License

MIT License - See LICENSE file for details.

04 同仓库更多 Skills

franklee16
franklee16/academic-research-skills

thu-digitizer

Extract and validate numeric data from chart images, PDF figures, and official source-data files locally and reproducibly, with calibrated axes, compact-scatter recovery plus residual audits, grouped/stacked bars, visible-label pie/donut validation, original-pixel aligned lattice composites such as UpSet plots, PDF vector inspection, line tracing, histograms, boxplots, error bars, CSV/JSON evidence, source-data cross-validation, and regression evaluation. Use when a user asks to recover or recreate chart data, extract scatter points, bars, printed pie/donut labels, or aligned memberships, check a PDF chart, assess digitization accuracy, validate against source data, or improve a chart-digitization workflow from corrected examples.

★ 234
franklee16
franklee16/academic-research-skills

scientific-visualization

Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.

★ 234
franklee16
franklee16/academic-research-skills

theoretical-economics-claude-skill

Human-in-the-loop theoretical economics research pipeline: from economic intuition to manuscript skeleton in 10 structured stages with quality gates.

★ 234
franklee16
franklee16/academic-research-skills

interview-guide-design

把一个研究题目、研究思路或研究问题,落成一份能用于学术研究、案例研究、学位论文、课题调研的质性访谈提纲时,使用此 skill。触发信号很宽:用户说"做/设计访谈提纲""访谈大纲怎么设计才规范""结构性访谈提纲""把研究问题/题目变成访谈问题""帮我弄份访谈提纲去问问他们""怎么访谈才能挖到深层的东西""interview guide / interview protocol / key informant / elite interview",无论措辞多口语、有没有提方法论,都应触发。典型情形:要去访谈领导 / 干部 / 管理者 / 专家 / 科室主任 / 一线员工或老师 / 关键知情人,了解某个现象、做法或机制;半结构化 / 结构化 / 关键知情人 / 精英访谈皆可;中英双语;社科 / 管理 / 教育 / 公共政策 / 医疗等领域;也常与案例研究、或与一份配套问卷的混合方法调研一起出现。它把研究问题按 Castillo-Montoya 的 IPR 框架与 Yin/Stake 的案例研究规范,拆成"主问题—追问—探测",保障与研究问题对齐、可信度(trustworthiness)与三角验证就绪,标注方法论依据与权威出处,产出研究者版 + 现场详版/简版。不要用于:量化问卷 / 量表设计(走 questionnaire-design)、求职面试、以传播或叙事为目的的人物访谈(媒体/播客/记者深度报道/纪录片/口述史,非以回答研究问题为目的)、访谈录音转写、焦点小组/座谈会提纲(群体互动动态与主持伦理不同,本 skill 不覆盖)、以及访谈完成后的编码与主题分析。

★ 234
franklee16
franklee16/academic-research-skills

mixed-methods-instrument-design

基于同一项研究的研究目的、研究问题、理论框架与人群设计,协同产出彼此对齐的量化问卷/调查表和质性访谈提纲时使用;也可在用户明确要求时把经审核的问卷创建为问卷星未发布草稿并继续管理。触发信号包括“问卷和访谈一起设计”“根据研究思路同步出调查问卷与访谈提纲”“混合方法研究工具”“不同人群分别做问卷和访谈”“推送到问卷星”“创建在线问卷”“survey + interview guide”“convergent / explanatory sequential / exploratory sequential mixed methods instruments”。适用于社会科学、管理、教育、公共政策、医疗及其他经验研究;允许量化与质性部分使用相同或不同样本。产出研究设计判定、中央映射矩阵、问卷与变量字典、完整访谈三版、联合展示模板和预测试方案;默认用户成品仍是一份完整 Word。不要用于只设计单一访谈提纲(走 interview-guide-design)、只设计单一问卷、把现成工具做成网页、访谈转写、正式数据分析,或在没有研究问题的情况下机械拼接两套题目。

★ 234
franklee16
franklee16/academic-research-skills

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review writing use peer-review.

★ 234