slides-generation-skills
by @javainthinking
AI-powered presentation generation using 2slides API. Create slides from text content, match reference image styles, or summarize documents into presentations. Use when users request to "create a presentation", "make slides", "generate a deck", "create slides from this content/document/image", or any presentation creation task. Supports theme selection, multiple languages, and both synchronous and asynchronous generation modes.
clawhub install slides-generation-skills๐ About This Skill
name: 2slides description: AI-powered presentation generation using 2slides API. Create slides from text content, match reference image styles, or summarize documents into presentations. Use when users request to "create a presentation", "make slides", "generate a deck", "create slides from this content/document/image", or any presentation creation task. Supports theme selection, multiple languages, and both synchronous and asynchronous generation modes.
2slides Presentation Generation
Generate professional presentations using the 2slides AI API. Supports content-based generation, style matching from reference images, and document summarization.
Setup Requirements
Users must have a 2slides API key:
1. Visit https://2slides.com/api to create an API key
2. Store the key in environment variable: SLIDES_2SLIDES_API_KEY
export SLIDES_2SLIDES_API_KEY="your_api_key_here"
Workflow Decision Tree
Choose the appropriate approach based on the user's request:
User Request
โ
โโ "Create slides from this content/text"
โ โโ> Use Content-Based Generation (Section 1)
โ
โโ "Create slides like this image"
โ โโ> Use Reference Image Generation (Section 2)
โ
โโ "Create slides from this document"
โ โโ> Use Document Summarization (Section 3)
โ
โโ "Search for themes" or "What themes are available?"
โโ> Use Theme Search (Section 4)
1. Content-Based Generation
Generate slides from user-provided text content.
When to Use
Workflow
Step 1: Prepare Content
Structure the content clearly for best results:
Title: [Main Topic]Section 1: [Subtopic]
Key point 1
Key point 2
Key point 3 Section 2: [Subtopic]
Key point 1
Key point 2
Step 2: Choose Theme (Required)
Search for an appropriate theme (themeId is required):
python scripts/search_themes.py --query "business"
python scripts/search_themes.py --query "professional"
python scripts/search_themes.py --query "creative"
Pick a theme ID from the results.
Step 3: Generate Slides
Use the generate_slides.py script with the theme ID:
# Basic generation (theme ID required)
python scripts/generate_slides.py --content "Your content here" --theme-id "theme123"In different language
python scripts/generate_slides.py --content "Your content" --theme-id "theme123" --language "Spanish"Async mode for longer presentations
python scripts/generate_slides.py --content "Your content" --theme-id "theme123" --mode async
Step 4: Handle Results
Sync mode response:
{
"slideUrl": "https://2slides.com/slides/abc123",
"pdfUrl": "https://2slides.com/slides/abc123/download",
"status": "completed"
}
Provide both URLs to the user:
slideUrl: Interactive online slidespdfUrl: Downloadable PDF versionAsync mode response:
{
"jobId": "job123",
"status": "pending"
}
Poll for results:
python scripts/get_job_status.py --job-id "job123"
2. Reference Image Generation
Generate slides that match the style of a reference image.
When to Use
Workflow
Step 1: Verify Image URL
Ensure the reference image is:
Step 2: Generate Slides
Use the generate_slides.py script with --reference-image:
python scripts/generate_slides.py \
--content "Your presentation content" \
--reference-image "https://example.com/template.jpg" \
--language "Auto"
Optional parameters:
--aspect-ratio "16:9" # width:height format (e.g., "16:9", "4:3")
--resolution "2K" # "1K", "2K" (default), or "4K"
--page 5 # Number of slides (0 for auto-detection, max 100)
--content-detail "concise" # "concise" (brief) or "standard" (detailed)
Note: This uses Nano Banana Pro mode with credit costs:
Step 3: Handle Results
This mode always runs synchronously and returns:
{
"slideUrl": "https://2slides.com/workspace?jobId=...",
"pdfUrl": "https://...pdf...",
"status": "completed",
"message": "Successfully generated N slides",
"slidePageCount": N
}
Provide both URLs to the user:
slideUrl: View slides in 2slides workspacepdfUrl: Direct PDF download (expires in 1 hour)Processing time: ~30 seconds per page (30-60 seconds typical for 1-2 pages)
3. Document Summarization
Generate slides from document content.
When to Use
Workflow
Step 1: Read Document
Use appropriate tool to read the document content:
Step 2: Extract Key Points
Analyze the document and extract:
Step 3: Structure Content
Format extracted information into presentation structure:
Title: [Document Main Topic]Introduction
Context
Purpose
Overview [Section 1 from document]
Key point 1
Key point 2
Supporting detail [Section 2 from document]
Key point 1
Key point 2
Supporting detail Conclusion
Summary
Key takeaways
Next steps
Step 4: Generate Slides
Use content-based generation workflow (Section 1). First search for a theme, then generate:
# Search for appropriate theme
python scripts/search_themes.py --query "business"Generate with theme ID
python scripts/generate_slides.py --content "[Structured content from step 3]" --theme-id "theme123"
Tips:
4. Theme Search
Find appropriate themes for presentations.
When to Use
Workflow
Search themes:
# Search for specific style (query is required)
python scripts/search_themes.py --query "business"
python scripts/search_themes.py --query "creative"
python scripts/search_themes.py --query "education"
python scripts/search_themes.py --query "professional"Get more results
python scripts/search_themes.py --query "modern" --limit 50
Theme selection:
1. Show user available themes with names and descriptions 2. Ask user to choose or let them use default 3. Use the theme ID in generation request
Using the MCP Server
If the 2slides MCP server is configured in Claude Desktop, use the integrated tools instead of scripts.
Two Configuration Modes:
1. Streamable HTTP Protocol (Recommended)
- Simplest setup, no local installation
- Configure: "url": "https://2slides.com/api/mcp?apikey=YOUR_API_KEY"
2. NPM Package (stdio)
- Uses local npm package
- Configure: "command": "npx", "args": ["2slides-mcp"]
Available MCP tools:
slides_generate - Generate slides from contentslides_create_like_this - Generate from reference imagethemes_search - Search themesjobs_get - Check job statusSee mcp-integration.md for complete setup instructions and detailed tool documentation.
When to use MCP vs scripts:
Advanced Features
Sync vs Async Mode
Sync Mode (default):
Async Mode:
get_job_status.pyLanguage Support
Generate slides in multiple languages (use full language name):
--language "Auto" # Automatic detection (default)
--language "English" # English
--language "Simplified Chinese" # ็ฎไฝไธญๆ
--language "Traditional Chinese" # ็น้ซไธญๆ
--language "Spanish" # Espaรฑol
--language "French" # Franรงais
--language "German" # Deutsch
--language "Japanese" # ๆฅๆฌ่ช
--language "Korean" # ํ๊ตญ์ด
And more: Arabic, Portuguese, Indonesian, Russian, Hindi, Vietnamese, Turkish, Polish, Italian
Error Handling
Common issues:
1. Missing API key
Error: API key not found
Solution: Set SLIDES_2SLIDES_API_KEY environment variable
2. Rate limiting
Error: 429 Too Many Requests
Solution: Wait before retrying or check plan limits
3. Invalid content
Error: 400 Bad Request
Solution: Verify content format and parameters
Complete API Reference
For detailed API documentation, see api-reference.md
Includes:
Tips for Best Results
Content Structure:
Theme Selection:
Reference Images:
Document Processing: