Felo Slides Skill
When to Use
Trigger this skill for requests about creating presentation files:
- - Create/generate slides from a topic or outline
- Turn notes into a PPT deck
- Build a presentation with a page count requirement
- Export presentation content into a shareable slide link
Trigger keywords:
- - Chinese prompts about making slides or presentations
- English: slides, PPT, presentation deck, generate presentation
- Explicit commands:
/felo-slides, "use felo slides"
Do NOT use this skill for:
- - Real-time information lookup (use
felo-search) - Questions about local codebase files
- Pure text tasks that do not require slide generation
Setup
1. Get API key
- 1. Visit felo.ai
- Open Settings -> API Keys
- Create and copy your API key
2. Configure environment variable
Linux/macOS:
CODEBLOCK0
Windows PowerShell:
CODEBLOCK1
How to Execute
Use Bash tool commands and follow this workflow exactly.
Step 1: Precheck API key
CODEBLOCK2
If key is missing, stop and return setup instructions.
Step 2: Run Node Script (create + poll)
Use the bundled script (no jq dependency):
CODEBLOCK3
To apply a specific theme, first list available themes with felo ppt-themes, then pass the theme ID:
CODEBLOCK4
Script behavior:
- - Creates task via INLINECODE4
- Supports optional
--theme <id> to apply a PPT theme (sends ppt_config.ai_theme_id) - Supports optional
--task-id <id> to resume polling an existing task (skips creation) - Polls via INLINECODE8
- Treats
COMPLETED/SUCCESS as success terminal (case-insensitive) - Treats
FAILED/ERROR as failure terminal - Stops polling immediately on terminal status
- Prints
ppt_url on success (fallback: live_doc_url)
Optional debug output:
CODEBLOCK5
This outputs structured JSON including:
- - INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
Step 4: Return structured result
On success, return:
- -
ppt_url immediately (script default output, fallback live_doc_url) - if
--json is used, also include task_id, terminal status, and optional metadata
Output Format
Use this response structure:
CODEBLOCK6
Error format:
CODEBLOCK7
Error Handling
Known API error codes:
- -
INVALID_API_KEY (401): key invalid or revoked - INLINECODE27 (502): create task downstream failed
- INLINECODE28 (502): query task downstream failed
Timeout handling:
- - If timeout reached, return last known status and instruct user to retry later
- Include
task_id so user can query again - IMPORTANT: To resume a timed-out task, use
--task-id instead of --query to avoid creating a duplicate PPT:
CODEBLOCK8
Important Notes
- - Always execute this skill when user intent is slide generation.
- Always return
task_id so follow-up queries can continue from the same task. - Do not claim completion without a terminal status.
- Keep API calls minimal: create once, then poll.
References
Felo 幻灯片技能
使用时机
当用户请求创建演示文稿文件时触发此技能:
- - 根据主题或大纲创建/生成幻灯片
- 将笔记转换为PPT文件
- 构建有页数要求的演示文稿
- 将演示文稿内容导出为可分享的幻灯片链接
触发关键词:
- - 关于制作幻灯片或演示文稿的中文提示
- 英文:slides, PPT, presentation deck, generate presentation
- 明确指令:/felo-slides、使用felo幻灯片
以下情况不要使用此技能:
- - 实时信息查询(使用felo-search)
- 关于本地代码库文件的问题
- 不需要生成幻灯片的纯文本任务
设置
1. 获取API密钥
- 1. 访问 felo.ai
- 打开设置 -> API密钥
- 创建并复制您的API密钥
2. 配置环境变量
Linux/macOS:
bash
export FELOAPIKEY=your-api-key-here
Windows PowerShell:
powershell
$env:FELOAPIKEY=your-api-key-here
执行方法
使用Bash工具命令并严格遵循以下工作流程。
步骤1:预检查API密钥
bash
if [ -z $FELOAPIKEY ]; then
echo 错误:未设置FELOAPIKEY
exit 1
fi
如果密钥缺失,停止并返回设置说明。
步骤2:运行Node脚本(创建+轮询)
使用捆绑脚本(无需jq依赖):
bash
node felo-slides/scripts/runppttask.mjs \
--query 用户提示词 \
--interval 10 \
--max-wait 1800 \
--timeout 60
要应用特定主题,先使用felo ppt-themes列出可用主题,然后传入主题ID:
bash
node felo-slides/scripts/runppttask.mjs \
--query 用户提示词 \
--theme 主题ID \
--interval 10 \
--max-wait 1800 \
--timeout 60
脚本行为:
- - 通过POST https://openapi.felo.ai/v2/ppts创建任务
- 支持可选的--theme 应用PPT主题(发送pptconfig.aithemeid)
- 支持可选的--task-id 恢复轮询现有任务(跳过创建)
- 通过GET https://openapi.felo.ai/v2/tasks/{taskid}/historical轮询
- 将COMPLETED/SUCCESS视为成功终态(不区分大小写)
- 将FAILED/ERROR视为失败终态
- 在终态时立即停止轮询
- 成功时打印ppturl(备选:livedoc_url)
可选调试输出:
bash
node felo-slides/scripts/runppttask.mjs \
--query 用户提示词 \
--interval 10 \
--max-wait 1800 \
--json \
--verbose
输出结构化JSON,包括:
- - taskid
- taskstatus
- ppturl
- livedocurl
- livedocshortid
- pptbusinessid
- errormessage
步骤4:返回结构化结果
成功时,返回:
- - 立即返回ppturl(脚本默认输出,备选livedocurl)
- 如果使用--json,还包括taskid、终态和可选元数据
输出格式
使用以下响应结构:
markdown
PPT生成结果
- - 任务ID:id>
- 状态:
- PPT链接:url>
- 实时文档链接:docurl 或 无>
备注
- - livedocshortid:<值 或 无>
- pptbusinessid:<值 或 无>
错误格式:
markdown
PPT生成失败
- - 错误类型:<错误代码或类别>
- 消息:<可读消息>
- 建议操作:<下一步>
错误处理
已知API错误代码:
- - INVALIDAPIKEY(401):密钥无效或已撤销
- PPTTASKCREATEFAILED(502):创建任务下游失败
- PPTTASKQUERYFAILED(502):查询任务下游失败
超时处理:
- - 如果达到超时,返回最后已知状态并指示用户稍后重试
- 包含task_id以便用户可以再次查询
- 重要:要恢复超时的任务,使用--task-id而不是--query,以避免创建重复的PPT:
bash
node felo-slides/scripts/runppttask.mjs \
--task-id 任务ID \
--interval 10 \
--max-wait 1800
重要说明
- - 当用户意图是生成幻灯片时,始终执行此技能。
- 始终返回task_id,以便后续查询可以从同一任务继续。
- 在没有终态的情况下,不要声称完成。
- 保持API调用最小化:创建一次,然后轮询。
参考