python-pptx-1-template-design
БесплатноБез исполняемых скриптовНе проверенSub-skill of python-pptx: 1. Template Design (+2).
от vamseeachanta★ 21 звезда на GitHubОб этом скилле
1. Template Design (+2)
1. Template Design
"""Best practices for template-based generation."""
# DO: Use consistent placeholder naming
PLACEHOLDERS = {
'title': '{{title}}',
'subtitle': '{{subtitle}}',
'date': '{{date}}',
'author': '{{author}}'
}
# DO: Create reusable slide builders
class SlideBuilder:
def __init__(self, prs):
self.prs = prs
def add_title_slide(self, title, subtitle):
slide = self.prs.slides.add_slide(self.prs.slide_layouts[0])
slide.shapes.title.text = title
if subtitle:
slide.placeholders[1].text = subtitle
return slide
def add_content_slide(self, title, bullets):
slide = self.prs.slides.add_slide(self.prs.slide_layouts[1])
slide.shapes.title.text = title
tf = slide.placeholders[1].text_frame
tf.text = bullets[0]
for bullet in bullets[1:]:
p = tf.add_paragraph()
p.text = bullet
return slide
2. Performance Optimization
"""Performance tips for large presentations."""
# DO: Reuse color objects
COLORS = {
'primary': RgbColor(0x2F, 0x54, 0x96),
'secondary': RgbColor(0x70, 0xAD, 0x47),
'accent': RgbColor(0xED, 0x7D, 0x31)
}
# DO: Batch similar operations
def add_multiple_charts(prs, chart_data_list):
for title, data, chart_type in chart_data_list:
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = title
# Add chart...
3. Error Handling
"""Robust error handling for presentations."""
from pathlib import Path
import logging
logger = logging.getLogger(__name__)
def safe_generate_presentation(template_path, output_path, data):
"""Generate presentation with error handling."""
try:
if not Path(template_path).exists():
raise FileNotFoundError(f"Template not found: {template_path}")
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
prs = Presentation(template_path)
# Process...
prs.save(output_path)
return {"success": True, "path": output_path}
except Exception as e:
logger.exception(f"Presentation generation failed: {e}")
return {"success": False, "error": str(e)}
Установить python-pptx-1-template-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл python-pptx-1-template-design?
Sub-skill of python-pptx: 1. Template Design (+2).
Как установить скилл python-pptx-1-template-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл python-pptx-1-template-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse 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…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use 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…
от Anthropic