pptx-render
Use when the user asks to "render pptx", "show pptx slide", "compare with pptx", "pptx to image", "export pptx slide", "original slide", "show me the original", "what does the pptx look like", or needs to extract a specific PPTX slide's content for visual comparison.
What this skill does
**Announce:** "I'm using pptx-render to extract PPTX slide content."
# PPTX Slide Inspector
Extracts content from PPTX slides using `python-pptx`. Primary use case: understanding what a PPTX slide contains (shapes, text, positions, images) for comparison against Typst slides, especially diagrams and visual items (VIS-* in content inventories).
## Prerequisites
| Tool | Source |
|------|--------|
| `python-pptx` | pixi project dependency |
## Step 1: Identify the PPTX File and Slide Number
If the user references a content inventory item (e.g., VIS-3, DQ-7), look up its PPTX slide number:
```bash
grep "VIS-3\|the-item-id" inventory/content-inventory-XX.md
```
## Step 2: Extract Slide Shapes
```python
from pptx import Presentation
import json
prs = Presentation('path/to/slides.pptx')
slide = prs.slides[SLIDE_NUM - 1] # 0-indexed
for shape in slide.shapes:
info = {
'name': shape.name,
'left_in': round(shape.left / 914400, 2),
'top_in': round(shape.top / 914400, 2),
'width_in': round(shape.width / 914400, 2),
'height_in': round(shape.height / 914400, 2),
}
if shape.has_text_frame:
info['text'] = shape.text_frame.text
if shape.shape_type == 13: # MSO_SHAPE_TYPE.PICTURE
info['is_image'] = True
if shape.has_table:
info['is_table'] = True
info['rows'] = len(shape.table.rows)
info['cols'] = len(shape.table.columns)
print(json.dumps(info))
```
## Step 3: Extract Images (if needed)
To save embedded images from a slide:
```python
from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE_TYPE
prs = Presentation('path/to/slides.pptx')
slide = prs.slides[SLIDE_NUM - 1]
for i, shape in enumerate(slide.shapes):
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
image = shape.image
ext = image.content_type.split('/')[-1]
with open(f'/tmp/pptx-slide-{SLIDE_NUM}-img-{i}.{ext}', 'wb') as f:
f.write(image.blob)
print(f'Saved image {i}: {image.content_type} ({shape.width/914400:.1f}x{shape.height/914400:.1f} in)')
```
## Step 4: Interpret the Layout
Shape positions use inches from top-left corner:
- `left_in` / `top_in`: position of shape's top-left corner
- Standard slide is 10" × 7.5" (widescreen) or 10" × 5.63" (16:9)
- Shapes with `is_image: true` and generic names ("Picture 5") are usually clipart
- Group shapes may contain sub-shapes (connectors, arrows) — inspect `.shapes` on groups
## Classifying Slide Content
| Shape Pattern | Likely Content |
|--------------|----------------|
| Multiple text boxes + arrows/lines at specific positions | **Substantive diagram** — reproduce in Typst |
| Single large `Picture` shape filling the slide | **Clipart/stock photo** — skip or replace |
| `Table` shape | **Data table** — reproduce as Typst `#table` |
| Text boxes only, no connectors | **Text slide** — no diagram needed |
| Group shapes with AutoShapes inside | **Flow diagram** — extract sub-shapes |
## Quick Reference
```python
# One-liner to dump all shapes from slide N
uv run python3 -c "
from pptx import Presentation; import json
prs = Presentation('PPTX_PATH')
for s in prs.slides[N-1].shapes:
d = {'name': s.name, 'text': s.text_frame.text if s.has_text_frame else None,
'pos': f'{s.left/914400:.1f},{s.top/914400:.1f}',
'size': f'{s.width/914400:.1f}x{s.height/914400:.1f}'}
print(json.dumps(d))
"
```
## Note on soffice
`soffice --headless` (LibreOffice via nix-darwin) is available but unreliable — it silently fails (returns 0, no output) due to profile lock issues. Use `python-pptx` instead.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.