← 返回 Skills 市场
🔌

爱图表PPT

作者 aitubiao · GitHub ↗ · v1.1.5 · MIT-0
cross-platform ⚠ suspicious
235
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install aitubiao-ppt
功能描述
AI PPT/演示文稿生成。根据用户主题或内容自动生成PPT演示文稿项目。当用户想要创建PPT、演示文稿、幻灯片时使用,触发词包括"创建PPT"、"做PPT"、"做个演示文稿"、"生成幻灯片"、"create PPT"、"make slides"、"generate presentation"、"make a P...
使用说明 (SKILL.md)

AI PPT/演示文稿生成

根据用户提供的主题、内容或文件,自动生成PPT演示文稿项目。

强制规则

以下规则必须严格执行,不得跳过、变通或使用替代方案:

  1. 认证优先:在执行任何操作之前,必须先检查凭证状态。认证未通过时,禁止执行任何后续步骤。
  2. 按顺序执行:工作流程的 5 个步骤必须按顺序执行,禁止跳步。
  3. 费用确认前禁止调用生成接口:必须成功查询配额、计算费用、并获得用户明确确认后,才能调用创建接口。
  4. 仅通过 API 创建PPT:禁止使用本地工具(reveal.js、impress.js、Google Slides API、python-pptx、LibreOffice 等)生成PPT。无论 API 因何种原因失败,都绝对禁止使用本地工具,没有任何例外。API 失败时正确做法是停止并告知用户,不是寻找替代方案。
  5. 401/403 立即停止:任何步骤中收到 HTTP 401/403(CLI exit 1),立即停止并引导用户前往 API Key 管理页面 检查或重新创建 API Key。401/403 不是超时,禁止重试。
  6. 超时/500 不自动重试创建接口:创建接口不可重试(可能重复扣费)。告知用户失败原因,由用户决定是否重新发起。

⚠️ 以下想法是错误的,如果你发现自己在这样想,请立即停止:

  • ❌ "API 不可用,我可以用本地工具生成PPT作为替代" → 违反规则 4
  • ❌ "至少让用户看到一些演示文稿效果" → 本技能唯一输出方式是 aitubiao API
  • ❌ "401 可能是暂时性的,重试几次" → 401 是认证失败,重试无意义,按规则 5 处理

认证

在调用任何 API 之前,先检查凭证状态。

检查凭证

bash scripts/aitubiao-cli.sh check-auth
  • Exit 0 → 认证通过
  • Exit 1 → 凭证问题,按 stderr 提示处理:
    • 文件不存在/API_KEY 为空 → 执行下方"配置凭证"流程
    • API_KEY 格式无效 → 告知用户"当前 API Key 已失效,请前往 API Key 管理页面 重新创建一个 API Key"
    • BASE_URL 与当前技能包环境不一致 → 说明凭证中残留了旧环境地址;向用户索要当前仍有效的 API Key,并执行下方"配置凭证"流程重写凭证(通常不需要重新创建 API Key)

配置凭证

  1. 向用户索要 API Key(格式:sk_v1_...)。如果没有,引导用户前往 API Key 管理页面 创建一个新的 API Key,然后将创建好的 Key 粘贴回来。
  2. 保存凭证:
bash scripts/aitubiao-cli.sh auth \x3C用户提供的key>
  1. 验证:再次运行 bash scripts/aitubiao-cli.sh check-auth 确认配置成功。

凭证保存在 ~/.aitubiao/credentials,跨会话持久生效。

Windows / Git Bash 注意事项(仅 Windows 用户需要关注)

在 Windows 上通过 Git Bash 运行本 CLI 时,禁止把含中文等非 ASCII 字符的 JSON 直接写在 heredoc 里——MSYS 会按 Windows 系统代码页(常为 GBK/CP936)转换 argv 字节,传到后端就是乱码。

正确做法:先用 Write 工具把完整 UTF-8 JSON 写到一个临时文件,然后用 --body-file 让 CLI 从文件读取(绕过任何 argv/控制台编码转换):

# 第一步:用 Write 工具把请求体写到 /tmp/aitubiao-payload.json(内容必须是 UTF-8)
# 第二步:用 --body-file 调用 CLI
bash scripts/aitubiao-cli.sh --body-file /tmp/aitubiao-payload.json create-chart

--body-file 可用于所有读取 stdin JSON 的命令:create-chart / create-ppt / create-sankey / create-3d / download-project。CLI 会自动剥离 UTF-8 BOM 和 CRLF。

macOS / Linux 上无需改动,仍然可以使用 heredoc。

支持的输入方式

输入方式 处理方法
主题文本 用户直接输入主题(如"人工智能发展趋势"),直接作为 prompt
粘贴内容 用户粘贴完整文本,作为 prompt
本地文件(TXT/MD/CSV) 用 Read 工具读取文件内容,作为 prompt
Excel 文件(.xlsx/.xls) 使用 xlsx skill 或 Read 工具读取,禁止手动编写 Python 脚本解析

工作流程

每一步必须在前一步完成后才能开始。禁止跳步。

第一步:认证(前置条件:无)

运行检查凭证流程。认证未通过时按"认证"章节流程处理。

认证未通过时,停止。不要读取用户数据,不要做任何分析。

第二步:识别和确认内容(前置条件:第一步认证通过)

获取用户内容后,向用户确认以下信息:

  • 内容/主题是否正确?
  • 需要生成多少页?(默认 6 页,上限由会员等级决定,可通过配额接口获取 pptGeneratePageLimit
  • 主题风格偏好?(浅色 light / 深色 dark,默认浅色)
  • 主题色偏好?(可选:蓝色#004eff、橙色#f16f0b、红色#ee4646、天蓝#2197fc、紫色#8a61ec、绿色#35b13f、动态配色dynamic
  • 有没有特殊要求?(如"简洁风格"、"多用图表"等,作为 requirements

第三步:检查配额并确认费用(前置条件:第二步内容已确认)

在创建PPT前,必须检查用户的 AI贝余额和项目配额,并向用户确认费用后才能继续。

3.1 查询配额

bash scripts/aitubiao-cli.sh quota --skill ppt

3.2 计算总费用

PPT 项目按"页"计费:每生成一页扣 .feature.cost 个 AI贝。

总费用 = .feature.cost × pageCount

pageCount 上限由顶层字段 pptGeneratePageLimit 决定,超过会被拒绝。)

billingModel 计算方式 示例
per-page 总费用 = cost × pageCount 生成6页PPT: 10 × 6 = 60 AI贝

3.3 向用户确认费用

必须在调用生成接口前向用户展示费用确认信息,并等待用户确认后才能继续

本次操作将消耗 {totalCost} 个 AI贝(PPT/图文生成,按页计费:{cost} AI贝/页 × {pageCount} 页)
当前余额: {shellBalance} 个 AI贝
操作后余额: {shellBalance - totalCost} 个 AI贝
项目数: 已用 {projectsUsed}/{projectsLimit}

是否继续?
  • 如果 shellBalance \x3C totalCost:告知用户当前 AI贝余额不足,需前往 aitubiao 网站购买会员或充值后再继续,不要继续
  • 如果 projectsRemaining \x3C= 0:告知用户当前项目数已满,需前往 aitubiao 网站升级会员,或在网站中删除旧项目后再继续,不要继续
  • 如果 pageCount > pptGeneratePageLimit:告知用户请求的页数超过当前会员等级限制(最多 pptGeneratePageLimit 页),请减少页数或升级会员,不要继续

第四步:创建PPT项目(前置条件:第三步用户已确认费用)

只有用户明确确认费用后才能执行此步骤。

API 会在项目创建后立即返回项目地址(不等待所有页面生成完成)。用户可以通过项目地址实时查看生成进度。

bash scripts/aitubiao-cli.sh create-ppt \x3C\x3C'EOF'
{
  "prompt": "\x3C用户的主题或内容>",
  "pageCount": 6,
  "theme": "light",
  "projectName": "\x3C项目名称>"
}
EOF

请求体字段说明

字段 类型 必填 默认值 说明
prompt string - 用户输入的主题或内容文本
pageCount number 6 页数(最小 1,上限由 pptGeneratePageLimit 决定)
theme string "light" "light"(浅色)或 "dark"(深色)
color string - 主题色:#004eff/#f16f0b/#ee4646/#2197fc/#8a61ec/#35b13f/dynamic
projectName string - 项目名称
requirements string - 附加要求(风格偏好、内容侧重等)
title string - 大纲标题

检查 CLI 退出码

  • Exit 0:成功。解析 stdout JSON 获取项目信息。
  • Exit 1:认证失败。引导用户前往 API Key 管理页面
  • Exit 2:业务错误。向用户展示错误详情。
  • Exit 3:网络/超时错误。告知用户稍后重试。

响应字段说明详见下方"响应字段参考"。

第五步:返回结果(前置条件:第四步创建成功)

立即向用户展示项目 URL(从 project.projectUrl 获取)。PPT 页面仍在后台生成中,用户可以在浏览器中打开此链接实时查看生成进度和最终效果。格式示例:

您的 PPT 项目已创建成功!页面正在后台生成中(通常需要 5-10 分钟)。
请点击下方链接实时查看生成进度和编辑 PPT:
https://app.aitubiao.com/workspace/xxxxxxxxx

同时提供以下补充信息:

  • 项目 ID(从 project.id 获取)
  • 总页数
  • 资源消耗:本次消耗 AI贝数、剩余 AI贝、已用项目数/上限

下载已创建项目(可选后续操作)

如果用户在 PPT 项目创建后要求“帮我下载或者导出这个项目”,先提醒用户 PPT 页面仍可能在后台生成。优先让用户通过 projectUrl 确认内容已生成完成,再执行下载。

下载命令:

bash scripts/aitubiao-cli.sh download-project \x3C本地保存路径> \x3C\x3C'EOF'
{
  "projectId": "\x3Cproject.id>",
  "format": "png"
}
EOF

规则:

  • projectId 使用上一步返回的 project.id
  • format 按用户需求填写:PPT 项目可用 ppt/pdf/png,图表/桑基图项目可用 png/jpg/pdf/ppt
  • 格式费用png/jpg/pdf 任何用户均可免费导出;ppt 需要 PPT 导出权限(付费会员);其它特殊格式(svg/gif/mp4/mov/透明 PNG/2x 及以上倍率)也需对应会员权益。如果用户尝试受限格式但权益不足,CLI 会返回 exit 2 并附服务端错误,应告知用户升级会员或改用免费格式
  • 本地保存路径处理
    • 优先使用用户明确指定的路径;如果用户没指定,传绝对路径(如 $HOME/Downloads/\x3Cfilename> 或当前工作目录下的具体文件名),不要省略命令参数
    • 不要把文件写入项目源码目录或不可写目录
    • CLI 会在启动导出任务之前检查目标目录是否可写:如果失败会立即报错(exit 4,stderr 含 not writablecannot be created),此时禁止自动改路径重试——必须先告诉用户当前路径不可写,请用户给一个可写的位置
  • 下载清晰度由服务端按会员权益自动决定:免费用户较低,付费用户更高
  • 仅通过此 API 下载,禁止使用本地工具导出替代文件
  • 禁止对同一 projectId 并发执行 download-project:服务端默认每个项目只允许 1 个 API Key 并发导出任务。需要重试时,等待上一次下载彻底完成(成功或失败)再重新发起
  • 下载完整性:CLI 会先写入 *.partial 临时文件,校验文件大小与已知格式(png/jpg/pdf/ppt/zip)的魔数后再原子重命名为最终路径。如果 CLI 返回 exit 3 且 stderr 含 integrity check failed,说明服务端返回的文件已损坏;不要伪装成功,告知用户重试或联系支持
  • 多页导出会自动打成 zip:当 PPT 项目(或多页项目)以 png/jpg/pdf 格式导出多页时,服务端会把所有页面压缩成一个 ZIP 包返回。CLI 检测到这种情况会自动把保存路径改为 .zip(例如 report.pngreport.zip),并在 stderr 输出 Note: server returned a multi-page ZIP bundle ...返回 JSON 中的 savedPathfileName 是真实落盘路径——告诉用户文件位置时必须使用这两个字段,不要使用最初传入的路径
  • 告知用户文件位置:成功后必须使用 CLI 返回 JSON 中的 savedPath(绝对路径)告诉用户文件保存在哪里

错误处理

CLI Exit Code 含义 处理方式
1 认证失败(HTTP 401/403 或凭证无效) 立即停止,引导用户前往 API Key 管理页面
2 业务错误(code 90001=AI贝不足,40007=项目数已满,40015=创建失败,15009=同一项目已有 API Key 导出任务进行中) 向用户展示详情;遇到 15009 时,提示用户等待上一个导出完成后再重试
3 网络/超时错误 告知用户稍后重试

响应字段参考

字段 类型 说明
success boolean 项目是否创建成功
outlineId string 大纲会话 ID
project.id string 项目 ID
project.title string 项目标题
project.status string 通常为 generating(页面在后台异步生成)
project.projectUrl string? 项目 URL,用户打开可查看生成进度和编辑 PPT
quota object? 配额快照(可能为 null
quota.shellCoinCost number 本次消耗 AI贝
quota.shellBalance number 剩余 AI贝
totalPages number 总页数
completedPages number 已完成页数(API 返回时为 0,页面后台异步生成)
processingTime string API 响应时间(不含页面生成时间)

异步生成行为:API 立即返回,页面在后台生成(5-10 分钟)。projectUrl 必须醒目展示给用户。

安全使用建议
This skill mostly does what it says (uses aitubiao API to generate PPTs), but review before installing: 1) Inspect the included script (scripts/aitubiao-cli.sh) yourself — the provided excerpt appears to contain a truncated function (possible bug) which could break 'create-ppt'. 2) Be cautious when saving an API key: the CLI stores credentials in ~/.aitubiao/credentials and then 'source's that file — if the file is ever modified by an attacker, sourcing can execute arbitrary shell code. Only use API keys you trust, keep that file's permissions restrictive (chmod 600), and consider creating a limited/rotatable API key. 3) The skill will read user files (TXT/MD/CSV/XLSX) if you ask it to include them in the prompt — only provide files you want the service to see. 4) Because there is no install sandboxing, prefer to run the script in a controlled environment or inspect/modify it to avoid unwanted behavior. If you want stronger assurance, ask the skill author for a full, non-truncated script and for clarification about why the credentials file is sourced rather than parsed.
功能分析
Type: OpenClaw Skill Name: aitubiao-ppt Version: 1.1.5 The skill provides a legitimate interface for generating AI-powered presentations via the aitubiao.com API. The included bash script (aitubiao-cli.sh) is a well-structured wrapper for curl and jq, featuring robust error handling, credential management in ~/.aitubiao/credentials, and file integrity checks using magic bytes. The SKILL.md instructions prioritize user consent for API costs and strictly forbid the use of local generation tools, aligning perfectly with the stated purpose without any evidence of malicious intent or data exfiltration.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
Name/description match the actual behavior: the skill uses an aitubiao API to create PPT projects, queries quota, calculates costs, and returns a project URL. Required runtime pieces (bash, curl, jq, network access to api.aitubiao.com) are consistent with the described workflow.
Instruction Scope
SKILL.md instructs the agent to read local files (TXT/MD/CSV/XLSX) and to store and load credentials from ~/.aitubiao/credentials. The CLI 'load_credentials' uses shell 'source' on that credentials file, which will execute any shell content in the file — this is a code-execution risk if the credentials file is tampered with. The skill also enforces a strict policy of using only the remote API (explicitly forbids local fallbacks), which is product-specific but reduces resilient behavior. The SKILL.md itself stays within the PPT-generation scope otherwise.
Install Mechanism
No install spec; this is instruction+script only. That lowers installer risk. The included script appears to be a self-contained CLI (uses mktemp, curl, jq) and does not download arbitrary code from external URLs. However, the provided script excerpt in the bundle appears truncated (see below), which suggests a possible bug in the shipped code.
Credentials
The skill requests only a service API key (via an interactive 'auth' flow) and stores it in ~/.aitubiao/credentials. There are no unrelated required environment variables or external credentials. That is proportionate to the stated purpose. Caveat: because the CLI 'source's the credentials file, any malicious content written to that file (accidentally or by compromise) could be executed when the CLI runs.
Persistence & Privilege
The skill does write to a per-user file (~/.aitubiao/credentials) to persist the API key; it does not request 'always: true' nor modify other skills or system-wide agent settings. This level of persistence is expected for an API-based CLI and is within scope.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install aitubiao-ppt
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /aitubiao-ppt 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.5
Version 1.1.5 introduces CLI integration and updates the workflow for improved reliability and clarity: - Migrated all API调用和认证流程 to a new Bash CLI script (`scripts/aitubiao-cli.sh`); manual curl logic replaced by CLI calls. - Removed direct usage and referencing of previously documented low-level API specs (`ppt-api.md`), as invocation is now via the unified CLI tool. - Enhanced Windows/Git Bash instructions, including handling for proper JSON encoding and file-based CLI inputs. - Updated error handling rules: 401/403 now exit immediately (without retries); creation接口不再自动重试,防止重复扣费;下载任务并发限制和文件完整性核查明确规定。 - Expanded documentation for download操作和输出字段,确保多页导出、导出文件路径和格式处理准确到位。 - Updated compatibility and metadata fields to reflect CLI and dependency requirements.
v1.0.1
- Added detailed workflow and strict execution rules for AI PPT generation, including mandatory authentication and step-by-step process. - Clarified input methods and supported file types for content ingestion. - Defined explicit error handling for common scenarios (authentication errors, quota exhaustion, server issues). - Introduced user interaction checkpoints: content confirmation, cost calculation, and explicit consent before project creation. - Updated output to provide project link and resource usage immediately after creation.
元数据
Slug aitubiao-ppt
版本 1.1.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

爱图表PPT 是什么?

AI PPT/演示文稿生成。根据用户主题或内容自动生成PPT演示文稿项目。当用户想要创建PPT、演示文稿、幻灯片时使用,触发词包括"创建PPT"、"做PPT"、"做个演示文稿"、"生成幻灯片"、"create PPT"、"make slides"、"generate presentation"、"make a P... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 235 次。

如何安装 爱图表PPT?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install aitubiao-ppt」即可一键安装,无需额外配置。

爱图表PPT 是免费的吗?

是的,爱图表PPT 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

爱图表PPT 支持哪些平台?

爱图表PPT 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 爱图表PPT?

由 aitubiao(@aitubiao)开发并维护,当前版本 v1.1.5。

💬 留言讨论