Agent 生成器
- 作者仓库星标 435
- 作者仓库 nvim
Presentation Skill
Thin wrapper that routes presentation operations to the presentation-agent.
Context Pointers
Reference (do not load eagerly):
- Path:
.claude/context/formats/subagent-return.md - Purpose: Return validation
- Load at: Subagent execution only
Note: This skill is a thin wrapper. Context is loaded by the delegated agent, not this skill.
Trigger Conditions
This skill activates when:
Direct Invocation
- User runs
/convertwith a.pptx/.pptsource and--format beamer|polylux|touying - User requests presentation conversion in conversation
Implicit Invocation (during task implementation)
When an implementing agent encounters any of these patterns:
Plan step language patterns:
- "Convert presentation to Beamer"
- "Extract slides from PowerPoint"
- "Generate Polylux slides"
- "Create Touying presentation"
- "Convert PPTX to LaTeX"
File extension detection:
- Source file has extension:
.pptx,.ppt - Target mentions: "Beamer", "slides", ".tex", "Polylux", "Touying", ".typ"
Task description keywords:
- "presentation conversion"
- "PowerPoint to LaTeX"
- "slide extraction"
- "academic slides"
When NOT to trigger
Do not invoke for:
- Document conversions (use skill-filetypes)
- Spreadsheet conversions (use skill-spreadsheet)
- Simple markdown extraction without slide formatting
Execution
1. Input Validation
Validate required inputs:
source_path- Must be provided and file must existoutput_path- Optional, defaults to source dir with .tex extensionoutput_format- Optional, defaults to "beamer"theme- Optional theme name
# Validate source exists
if [ ! -f "$source_path" ]; then
return error "Source file not found: $source_path"
fi
# Validate source is presentation format
source_ext="${source_path##*.}"
case "$source_ext" in
pptx|ppt|md) ;; # Valid
*) return error "Not a presentation format: .$source_ext" ;;
esac
# Determine output path if not provided
if [ -z "$output_path" ]; then
source_dir=$(dirname "$source_path")
source_base=$(basename "$source_path" | sed 's/\.[^.]*$//')
case "$output_format" in
beamer|latex|tex) output_path="${source_dir}/${source_base}.tex" ;;
polylux|touying|typst|typ) output_path="${source_dir}/${source_base}.typ" ;;
pptx) output_path="${source_dir}/${source_base}_generated.pptx" ;;
*) output_path="${source_dir}/${source_base}.tex" ;;
esac
fi
2. Context Preparation
Prepare delegation context:
{
"source_path": "/absolute/path/to/presentation.pptx",
"output_path": "/absolute/path/to/slides.tex",
"output_format": "beamer",
"theme": "metropolis",
"metadata": {
"session_id": "sess_{timestamp}_{random}",
"delegation_depth": 1,
"delegation_path": ["orchestrator", "convert", "skill-presentation"]
}
}
3. Invoke Agent
CRITICAL: You MUST use the Agent tool to spawn the agent.
Required Tool Invocation:
Tool: Agent (NOT Skill, NOT Plan)
Parameters:
- subagent_type: "presentation-agent"
- prompt: [Include source_path, output_path, output_format, theme, metadata]
- description: "Convert {source_path} to {output_format} slides"
The agent will:
- Detect available tools (python-pptx, pandoc, markitdown)
- Extract presentation content
- Generate formatted slide output
- Extract and preserve speaker notes
- Return standardized JSON result
4. Return Validation
Validate return matches subagent-return.md schema:
- Status is one of: converted, partial, failed
- Summary is non-empty and <100 tokens
- Artifacts array present with output file path
- Metadata contains slide count
5. Return Propagation
Return validated result to caller without modification.
Return Format
Expected successful return:
{
"status": "converted",
"summary": "Successfully converted presentation.pptx to Beamer slides with 15 slides",
"artifacts": [
{
"type": "implementation",
"path": "/absolute/path/to/slides.tex",
"summary": "Beamer presentation with speaker notes"
}
],
"metadata": {
"session_id": "sess_...",
"agent_type": "presentation-agent",
"delegation_depth": 2,
"tool_used": "python-pptx+pandoc",
"slide_count": 15,
"has_speaker_notes": true
},
"next_steps": "Review and compile slides"
}
Error Handling
Input Validation Errors
Return immediately with failed status if source file not found or not a presentation.
Unsupported Format
Return failed status with clear message about supported formats.
Agent Errors
Pass through the agent's error return verbatim.
Tool Not Available
Return failed status with installation instructions.
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @benbrastmckie · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Reference (do not load eagerly): Path: .claude/context/formats/subagent-return.md Purpose: Return validation
This skill activates when:
User runs /convert with a .pptx/.ppt source and --format beamer|polylux|touying User requests presentation conversion in conversation
When an implementing agent encounters any of these patterns: Plan step language patterns: "Convert presentation to Beamer"
Do not invoke for: Document conversions (use skill-filetypes) Spreadsheet conversions (use skill-spreadsheet)
Execution
# Presentation Skill
Thin wrapper that routes presentation operations to the `presentation-agent`.
## Context Pointers
Reference (do not load eagerly):
- Path: `.claude/context/formats/subagent-return.md`
- Purpose: Return validation
- Load at: Subagent execution only
Note: This skill is a thin wrapper. Context is loaded by the delegated agent, not this skill.
## Trigger Conditions
This skill activates when:
### Direct Invocation
- User runs `/convert` with a `.pptx`/`.ppt` source and `--format beamer|polylux|touying`
- User requests presentation conversion in conversation
### Implicit Invocation (during task implementation)
When an implementing agent encounters any of these patterns:
**Plan step language patterns**:
- "Convert presentation to Beamer"
- "Extract slides from PowerPoint"
- "Generate Polylux slides"
- "Create Touying presentation"
- "Convert PPTX to LaTeX"
**File extension detection**:
- Source file has extension: `.pptx`, `.ppt`
- Target mentions: "Beamer", "slides", ".tex", "Polylux", "Touying", ".typ"
**Task description keywords**:
- "presentation conversion"
- "PowerPoint to LaTeX"
- "slide extraction"
- "academic slides"
### When NOT to trigger
Do not invoke for:
- Document conversions (use skill-filetypes)
- Spreadsheet conversions (use skill-spreadsheet)
- Simple markdown extraction without slide formatting
---
## Execution
### 1. Input Validation
Validate required inputs:
- `source_path` - Must be provided and file must exist
- `output_path` - Optional, defaults to source dir with .tex extension
- `output_format` - Optional, defaults to "beamer"
- `theme` - Optional theme name
```bash
# Validate source exists
if [ ! -f "$source_path" ]; then
return error "Source file not found: $source_path"
fi
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Context Pointers → Trigger Conditions → Direct Invocation → Implicit Invocation (during task implementation) → When NOT to trigger → Execution
要点 -> Plan step language patterns · File extension detection · Task description keywords · CRITICAL · Agent · Required Tool Invocation
文件/命令 -> presentation-agent · .claude/context/formats/subagent-return.md · /convert · .pptx · .ppt · --format beamer|polylux|touying · sourcepath · outputpath
内容 SHA-256 -> 4281699d7d30
原文结构
适用与边界
原文中的明确线索
presentation-agent、.claude/context/formats/subagent-return.md、/convert、.pptx、.ppt、--format beamer|polylux|touying、sourcepath、outputpath