Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docgen

БесплатноЗапускает вложенные скриптыНе проверен

Generate documents (PPTX, DOCX, PDF, XLSX, HTML) via AWS Bedrock AgentCore Runtime. Use this skill when the user asks to: - Generate a PPT/presentation /…

tsaolот tsaol★ 69 звёзд на GitHub

Об этом скилле

Document Generation via AgentCore Runtime

Overview

This skill generates professional documents by calling an AWS Bedrock AgentCore Runtime agent. The remote agent uses Claude + Code Interpreter to produce high-quality files — no local office software required.

Supported Document Types

Type Flag Output Use Case
pptx --type pptx PowerPoint Presentations, tech talks
docx --type docx Word Reports, design docs
pdf --type pdf PDF Invoices, formal documents
xlsx --type xlsx Excel Data tables, KPI tracking
frontend-design --type frontend-design HTML Dashboards, landing pages

Prerequisites

  1. AWS credentials configured (~/.aws/credentials, env vars, or IAM role)
  2. AgentCore Runtime deployed with document generation agent
  3. Python 3.10+ with boto3 installed

Required IAM Permissions

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "bedrock-agentcore:InvokeAgentRuntime",
      "Resource": "<your-runtime-arn>"
    }
  ]
}

Environment Variables

Variable Required Description
RUNTIME_ARN Yes AgentCore Runtime ARN
AWS_REGION No AWS region (default: ap-northeast-1)

The script also auto-loads .env from ~/codes/document-generation-mcp/.env if present.

Quick Start

# Generate a PowerPoint
python scripts/docgen.py --type pptx \
  --prompt "Create a 10-slide presentation about cloud computing" \
  --output presentation.pptx

# Generate a Word document
python scripts/docgen.py --type docx \
  --prompt "Write a technical design document about microservices" \
  --output design.docx

# Generate from a prompt file (for long prompts)
python scripts/docgen.py --type pptx \
  --prompt-file my-prompt.txt \
  --output slides.pptx

# Large PPT (15+ slides) — auto-splits into parallel batches
python scripts/docgen.py --type pptx \
  --prompt-file 22-slide-prompt.txt \
  --output big-deck.pptx

# Force single-batch mode (disable auto-split)
python scripts/docgen.py --type pptx \
  --prompt-file prompt.txt \
  --output output.pptx \
  --no-split --timeout 1800

Python API

from scripts.docgen import generate

result = generate(
    skill_type="pptx",
    prompt="Create a 12-slide deck about AI trends in 2026",
    output_path="output/ai-trends.pptx",
)

if result["success"]:
    print(f"Saved: {result['path']} ({result['size']} bytes, {result['elapsed']:.0f}s)")
else:
    print(f"Error: {result['error']}")

How Claude Code Should Use This Skill

When a user asks to generate a document, follow this workflow:

Step 1: Determine the Mode

  • Mode A (Article -> Document): User has an existing article/markdown and wants it converted
  • Mode B (Topic -> Document): User provides a topic and wants a document from scratch

Step 2: Construct the Prompt

The prompt quality determines the output quality. Follow these guidelines:

PPTX Prompt Template

Create a [N]-slide professional presentation about [topic].
Use [color scheme] with [text color] on [background color].

IMPORTANT: Every slide MUST include speaker notes. Add speaker notes using
the python-pptx notes_slide feature: slide.notes_slide.notes_text_frame.text = "notes content".
Speaker notes should be 80-150 words per slide, written in conversational style,
explaining the key talking points. Do NOT just repeat the bullet points.

Slide 1: Title - [title], [subtitle]
Slide 2: [Section] - [key point 1], [key point 2], [key point 3]
Slide 3: [Section] - [data table or key facts]
...
Slide N: Thank You - [closing info]

PPTX Rules:

  • Each slide description should be under 50 words (keywords and data, not paragraphs)
  • Total slides should be <= 22 (more affects generation quality)
  • Use "table with N rows" for data tables
  • Always include speaker notes instructions
  • Specify color scheme explicitly

DOCX Prompt Template

Create a professional [document type] about [topic].
Include sections: [section list].
Section 1: [Title] - [content points]
...

XLSX Prompt Template

Create an Excel spreadsheet for [purpose].
Sheet 1: [name] - columns: [col1], [col2], ...
Sheet 2: [name] - [description]

Step 3: Save the Prompt (Optional)

For debugging and reuse, save the prompt to a file:

# Save to prompt file
cat > prompt.txt << 'EOF'
[your prompt here]
EOF

Step 4: Generate the Document

python <skill-path>/scripts/docgen.py \
  --type pptx \
  --prompt-file prompt.txt \
  --output output/presentation.pptx

Expected generation times:

  • HTML: 30s - 1min
  • PPTX (<=10 slides): 2-5 min
  • PPTX (10-22 slides): 3-15 min
  • DOCX/PDF: 2-5 min
  • XLSX: 2-4 min

Complex presentations (15+ slides with detailed content) can take 10-25 minutes. The default timeout is 1200s (20 min). Use --timeout 1800 for very comp

Полный SKILL.md на GitHub

Установить docgen в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSE.txtscripts/docgen.py

FAQ

Что делает скилл docgen?

Generate documents (PPTX, DOCX, PDF, XLSX, HTML) via AWS Bedrock AgentCore Runtime. Use this skill when the user asks to: - Generate a PPT/presentation / 生成PPT - Generate a Word document / 生成Word文档 - Generate a PDF / 生成PDF - Generate an Excel spreadsheet / 生成Excel表格 - Generate a frontend HTML page / 生成前端页面 - Convert an article to a presentation / 把文章转成PPT - Create a document from a topic / 根据话题生成文档 This skill uses AWS Bedrock AgentCore Runtime (cloud-based, Claude + Code Interpreter).

Как установить скилл docgen?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docgen запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить docgen с