Skip to main content
ClaudeWave
ES, Spanish
Skill674 estrellas del repoactualizado 5mo ago

pptx

This Claude Code skill handles PowerPoint presentations in all forms: creating slide decks from scratch using a structured template system, reading and extracting text from existing .pptx files, and editing or combining presentations. Use it whenever the user references presentations, decks, slides, or .pptx files. The skill provides both a recommended generator script workflow for assembling multi-slide presentations with automatic table of contents and cover slides, plus direct pptxgenjs access for custom creations, with critical emphasis on writing slide content as separate text files and assembling them via Python rather than embedding text directly in code.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/AgentTeam-TaichuAI/ScienceClaw /tmp/pptx && cp -r /tmp/pptx/ScienceClaw/backend/builtin_skills/pptx ~/.claude/skills/pptx
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# PPTX Skill

## Quick Reference

| Task | Approach |
|------|----------|
| Read/analyze content | `python3 -m markitdown presentation.pptx` |
| **Generate structured presentation** | **Use `generate_report.js` — see below** |
| Create custom from scratch | Use pptxgenjs directly (see pptxgenjs section) |

---

## Generating Presentations (Recommended)

For structured presentations with cover slide, auto-generated TOC, content slides, and closing, use the pre-built template:

### Step 1: Copy the generator script

```bash
cp /builtin-skills/pptx/scripts/generate_report.js ./generate_pptx.js
```

### Step 2: Build `slides_data.json` via Python script

**Two phases: write slide content files, then assemble into JSON.**

**CRITICAL**: NEVER write or edit `.json` files directly. Use a Python script with `json.dump()` to guarantee valid JSON output.

**Phase 1 — Write each slide's content as a plain text file** using `write_file`:

For each major topic, `read_file` the relevant research data, then `write_file` the slide content directly:
```
read_file("research_data/literature.md")           # refresh data in context
write_file("slides/slide_01_intro.txt", "...")      # write slide body
write_file("slides/slide_02_analysis.txt", "...")   # next slide
...
```
Each content slide body should be concise but substantive (3-6 bullet points or 2-4 sentences with specific data and citations).

**NEVER write a Python script that contains slide text as string literals.** The slide content goes directly into .txt files via `write_file`, not into Python code.

**Language (CRITICAL):**
- All presentation content (title, subtitle, slide headings, body text, chart labels, speaker notes) MUST be written in the **user's configured language** as specified in the system prompt's `## Language` section.
- If the user's language is Chinese (`zh`), write the entire presentation in Chinese; if English (`en`), write in English. Do NOT mix languages unless quoting a proper noun or technical term that has no standard translation.

**Phase 2 — Assemble into JSON** using a standard assembler script:

```python
import json, glob, os

SLIDES_DIR = "slides"
TITLE = "Presentation Title"
SUBTITLE = "Subtitle or tagline"

# Slide config: (file_pattern, type, title, extra_fields_or_None)
SLIDE_MAP = [
    ("slide_01_*.txt", "section", "Introduction", None),
    ("slide_02_*.txt", "bullets", "Key Findings", None),
    ("slide_03_*.txt", "content", "Market Overview", {"layout": "text-image", "image": "chart.png"}),
    ("slide_04_*.txt", "stat", "Key Metrics", {
        "stats": [
            {"value": "25%", "label": "Revenue Growth"},
            {"value": "15%", "label": "Cost Reduction"},
            {"value": "32%", "label": "Market Share"},
        ]
    }),
    ("slide_05_*.txt", "content", "Trend Analysis", None),
    (None, "chart_pie", "Distribution", {
        "labels": ["Type A", "Type B", "Type C", "Other"],
        "values": [35, 30, 20, 15],
    }),
    (None, "chart_line", "Yearly Trends", {
        "x_labels": ["2020", "2021", "2022", "2023", "2024"],
        "series": [{"name": "Metric", "values": [40, 55, 62, 70, 78]}],
    }),
]

data = {
    "title": TITLE, "subtitle": SUBTITLE,
    "author": "ScienceClaw", "date": "2026-03-09",
    "theme": "midnight", "toc": True, "slides": [],
}

for entry in SLIDE_MAP:
    pattern, stype, title, extra = entry
    slide = {"type": stype, "title": title}

    if pattern:
        matches = sorted(glob.glob(os.path.join(SLIDES_DIR, pattern)))
        if matches:
            body = open(matches[0], encoding="utf-8").read().strip()
            if stype == "bullets":
                slide["items"] = [line.strip() for line in body.split("\n") if line.strip()]
            else:
                slide["body"] = body

    if extra:
        slide.update(extra)
    data["slides"].append(slide)

# Closing slide
data["slides"].append({"type": "closing", "title": "Thank You", "subtitle": "Questions?"})

with open("slides_data.json", "w", encoding="utf-8") as f:
    json.dump(data, f, ensure_ascii=False, indent=2)
print(f"Generated slides_data.json ({len(data['slides'])} slides)")
```

### Step 3: Generate the PPTX

```bash
python3 build_slides_data.py   # outputs slides_data.json
node generate_pptx.js slides_data.json output.pptx
```

### Supported slide types

| Type | Required Fields | Optional Fields |
|------|----------------|-----------------|
| `title` | (auto from top-level) | `title`, `subtitle`, `author`, `date` |
| `agenda` | `items` (string array) | `title` (default: "Agenda") |
| `section` | `title` | `subtitle` |
| `content` | `title` | `body`, `layout`, `image` |
| `bullets` | `title`, `items` | `subtitle` |
| `two_column` | `title`, `left`, `right` | each column: `{heading, body}` or `{heading, items}` |
| `table` | `title`, `headers`, `rows` | `caption` |
| `stat` | `title`, `stats` | stats: `[{value, label}]` (2-4 items) |
| `image` | `title`, `image` | `caption` |
| `chart_bar` | `title`, `categories`, `series` | series: `[{name, values}]` |
| `chart_pie` | `title`, `labels`, `values` | — |
| `chart_line` | `title`, `x_labels`, `series` | series: `[{name, values}]` |
| `quote` | `text` | `author`, `title` |
| `closing` | `title` | `subtitle`, `contact` |

**Chart types for data visualization (use 2-4 per presentation, mix types):**
- `chart_bar` — for comparisons, rankings (e.g. drug efficacy scores)
- `chart_pie` — for proportions, distributions (e.g. mutation type breakdown)
- `chart_line` — for trends over time (e.g. yearly incidence rates)

### Top-level JSON keys

| Key | Required | Description |
|-----|----------|-------------|
| `title` | Yes | Presentation title (cover slide) |
| `subtitle` | No | Subtitle on cover slide |
| `author` | No | Author name |
| `date` | No | Date string |
| `theme` | No | Color theme (see below) |
| `toc` | No | Auto-generate Table of Contents slide (default: true) |
| `slides` | Yes | Array of slide objects |

### Available themes
brainstormingSkill

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

copywritingSkill

When the user wants to write, rewrite, or improve marketing copy for any page — including homepage, landing pages, pricing pages, feature pages, about pages, or product pages. Also use when the user says "write copy for," "improve this copy," "rewrite this page," "marketing copy," "headline help," "CTA copy," "value proposition," "tagline," "subheadline," "hero section copy," "above the fold," "this copy is weak," "make this more compelling," or "help me describe my product." Use this whenever someone is working on website text that needs to persuade or convert.

deep-researchSkill

多源深度调研与专业报告生成。适用场景广泛——只要用户的问题涉及需要深度分析的专业话题,就应使用此技能。包括但不限于:(1) 用户明确要求调研/research/综述/报告/发现;(2) 用户提出一个技术或科学话题,话题复杂度需要多源深度分析;(3) 用户要求对比多种技术方案的优劣;(4) 涉及生物医药、蛋白质、基因、药物靶点等需要专业数据库支撑的问题。核心能力:根据问题性质自动组合 arXiv 论文检索 + ToolUniverse 科学工具(UniProt/OpenTargets/PubMed/FAERS 等 1000+ 工具)+ Web 搜索,多源采集数据,交叉分析,生成专业 PDF/DOCX 研究报告。

docxSkill

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

feishu-setupSkill

自动配置飞书机器人应用。当用户要求配置飞书、创建飞书机器人、接入 Lark/飞书、设置飞书 app_id/app_secret、或询问如何配置飞书 IM 时触发此 skill。该 skill 通过 sandbox 内置浏览器自动完成飞书开放平台上的应用创建、权限配置、事件订阅和发布,用户仅需扫码登录。

find-skillsSkill

MANDATORY: When a user asks to install, find, search, or add ANY skill (e.g. 'install hello-world skill', 'find a skill for X', 'add a skill'), you MUST first run `skills find <query>` to search the skills ecosystem. NEVER create a skill from scratch without searching first. Even if the name sounds simple, always search — it may already exist as a published skill.

pdfSkill

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

read-githubSkill

|