24111999/claude-skills / slide-studio
slide-studio
UnverifiedCreate and modify PowerPoint presentations (PPTX) through direct XML manipulation. Use this skill when: (1) Creating presentations from scratch, (2) Adding/editing/deleting slides, (3) Inserting images or custom shapes, (4) Applying POTX templates for consistent branding, (5) Editing existing PPTX files, (6) Working with slide layouts and placeholders, (7) User asks to make a "presentation", "slides", "deck", or mentions ".pptx". Supports all 11 standard Office slide layouts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.3 KB |
| assets/base.pptx | binary | 17.6 KB |
| assets/claude-skills-v1.5.zip | binary | 1.3 MB |
| package-lock.json | manifest | 4.5 KB |
| package.json | manifest | 422 B |
| references/ooxml-reference.md | markdown | 4.5 KB |
| references/slide-patterns.md | markdown | 5.2 KB |
| scripts/add-image.js | script | 7.0 KB |
| scripts/add-shape.js | script | 7.9 KB |
| scripts/add-slide.js | script | 9.2 KB |
| scripts/apply-potx.js | script | 9.0 KB |
| scripts/clone-slide.js | script | 5.3 KB |
| scripts/create-base.js | script | 16.0 KB |
| scripts/delete-slide.js | script | 3.2 KB |
| scripts/edit-text.js | script | 5.8 KB |
| scripts/generate-base.js | script | 24.7 KB |
| scripts/lib/constants.js | script | 3.2 KB |
| scripts/lib/content-types.js | script | 3.8 KB |
| scripts/lib/relationships.js | script | 3.9 KB |
| scripts/lib/xml-utils.js | script | 4.6 KB |
| scripts/list-layouts.js | script | 2.2 KB |
| scripts/list-slides.js | script | 3.4 KB |
| scripts/pack.js | script | 3.0 KB |
| scripts/skills_claude_poetship.zip | binary | 498.2 KB |
| scripts/unpack.js | script | 1.6 KB |
| scripts/visualize-slide.js | script | 6.0 KB |
scripts/pack.js
View on GitHub#!/usr/bin/env node
/**
* Creates PPTX from a working directory
* Usage: node pack.js <working-directory> <output.pptx>
*/
const fs = require('fs');
const path = require('path');
const JSZip = require('jszip');
/**
* Recursively get all files in a directory
*/
function getAllFiles(dirPath, basePath = dirPath) {
const files = [];
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dirPath, entry.name);
const relativePath = path.relative(basePath, fullPath);
// Skip macOS system files but keep .rels files (required by OOXML)
if (entry.name === '.DS_Store') continue;
if (entry.isDirectory()) {
files.push(...getAllFiles(fullPath, basePath));
} else {
files.push(relativePath);
}
}
return files;
}
async function pack(workDir, outputPptx) {
const absWork = path.resolve(workDir);
const absOutput = path.resolve(outputPptx);
// Validate working directory
if (!fs.existsSync(absWork)) {
throw new Error(`Working directory not found: ${absWork}`);
}
// Verify essential PPTX files exist
const contentTypesPath = path.join(absWork, '[Content_Types].xml');
if (!fs.existsSync(contentTypesPath)) {
throw new Error('Invalid PPTX structure: [Content_Types].xml not found');
}
// Create ZIP
const zip = new JSZip();
// Get all files
const files = getAllFiles(absWork);
// PPTX requires specific ordering: [Content_Types].xml should be first
// Sort files to ensure proper order
const sortedFiles = files.sort((a, b) => {
// [Content_Types].xml first
if (a === '[Content_Types].xml') return -1;
if (b === '[Content_Types].xml') return 1;
// _rels directory early
if (a.startsWith('_rels/') && !b.startsWith('_rels/')) return -1;
if (!a.startsWith('_rels/') && b.startsWith('_rels/')) return 1;
// Alphabetical otherwise
return a.localeCompare(b);
});
// Add files to ZIP
for (const file of sortedFiles) {
const fullPath = path.join(absWork, file);
const content = fs.readFileSync(fullPath);
zip.file(file, content);
}
// Generate ZIP content
const zipContent = await zip.generateAsync({
type: 'nodebuffer',
compression: 'DEFLATE',
compressionOptions: { level: 6 },
});
// Remove existing output if present
if (fs.existsSync(absOutput)) {
fs.unlinkSync(absOutput);
}
// Write output file
fs.mkdirSync(path.dirname(absOutput), { recursive: true });
fs.writeFileSync(absOutput, zipContent);
console.log(`Created: ${absOutput}`);
return absOutput;
}
// CLI execution
if (require.main === module) {
const [, , workDir, outputPptx] = process.argv;
if (!workDir || !outputPptx) {
console.error('Usage: node pack.js <working-directory> <output.pptx>');
process.exit(1);
}
pack(workDir, outputPptx)
.then(() => process.exit(0))
.catch((err) => {
console.error('Error:', err.message);
process.exit(1);
});
}
module.exports = { pack };
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', 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 or .dotx 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. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse 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. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |