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/lib/relationships.js
View on GitHub/**
* Relationships management for .rels files
*/
const { REL_TYPES } = require('./constants');
const { xmlDeclaration } = require('./xml-utils');
/**
* Parse .rels XML into structured data
*/
function parseRelationships(xml) {
const relationships = [];
const pattern = /<Relationship\s+Id="([^"]+)"\s+Type="([^"]+)"\s+Target="([^"]+)"(?:\s+TargetMode="([^"]+)")?\s*\/>/g;
let match;
while ((match = pattern.exec(xml)) !== null) {
relationships.push({
id: match[1],
type: match[2],
target: match[3],
targetMode: match[4] || null,
});
}
return relationships;
}
/**
* Generate .rels XML from relationships array
*/
function generateRelationships(relationships) {
let xml = xmlDeclaration();
xml += '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n';
for (const rel of relationships) {
xml += ` <Relationship Id="${rel.id}" Type="${rel.type}" Target="${rel.target}"`;
if (rel.targetMode) {
xml += ` TargetMode="${rel.targetMode}"`;
}
xml += '/>\n';
}
xml += '</Relationships>';
return xml;
}
/**
* Get next available rId
*/
function getNextRId(relationships) {
const ids = relationships
.map(r => parseInt(r.id.replace('rId', ''), 10))
.filter(n => !isNaN(n));
return 'rId' + (ids.length > 0 ? Math.max(...ids) + 1 : 1);
}
/**
* Add a relationship
*/
function addRelationship(relationships, type, target, targetMode = null) {
const id = getNextRId(relationships);
relationships.push({
id,
type,
target,
targetMode,
});
return id;
}
/**
* Remove a relationship by ID
*/
function removeRelationship(relationships, id) {
const index = relationships.findIndex(r => r.id === id);
if (index !== -1) {
relationships.splice(index, 1);
}
return relationships;
}
/**
* Find relationship by target
*/
function findByTarget(relationships, target) {
return relationships.find(r => r.target === target || r.target.endsWith(target));
}
/**
* Find relationship by type
*/
function findByType(relationships, type) {
return relationships.filter(r => r.type === type);
}
/**
* Find relationship by ID
*/
function findById(relationships, id) {
return relationships.find(r => r.id === id);
}
/**
* Add slide relationship to presentation
*/
function addSlideRelationship(relationships, slideNum) {
return addRelationship(relationships, REL_TYPES.slide, `slides/slide${slideNum}.xml`);
}
/**
* Add layout relationship to slide
*/
function addLayoutRelationship(relationships, layoutNum) {
return addRelationship(relationships, REL_TYPES.slideLayout, `../slideLayouts/slideLayout${layoutNum}.xml`);
}
/**
* Add image relationship
*/
function addImageRelationship(relationships, imagePath) {
return addRelationship(relationships, REL_TYPES.image, imagePath);
}
/**
* Get standard root relationships
*/
function getStandardRootRels() {
return [
{
id: 'rId1',
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',
target: 'ppt/presentation.xml',
},
{
id: 'rId2',
type: 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',
target: 'docProps/core.xml',
},
{
id: 'rId3',
type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties',
target: 'docProps/app.xml',
},
];
}
/**
* Update relationship target (for renumbering slides etc.)
*/
function updateTarget(relationships, id, newTarget) {
const rel = findById(relationships, id);
if (rel) {
rel.target = newTarget;
}
return relationships;
}
module.exports = {
parseRelationships,
generateRelationships,
getNextRId,
addRelationship,
removeRelationship,
findByTarget,
findByType,
findById,
addSlideRelationship,
addLayoutRelationship,
addImageRelationship,
getStandardRootRels,
updateTarget,
};
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 |