# Sn Ppt Doctor

Use when diagnosing PPT Skill setup or failures involving source parsing, Playwright or...

- Repository: https://github.com/OpenSenseNova/SenseNova-Skills (6002 stars)
- Category: Documents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-ppt-doctor -g -a claude-code -y`
Codex: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-ppt-doctor -g -a codex -y`
Cursor: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-ppt-doctor -g -a cursor -y`
Gemini CLI: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-ppt-doctor -g -a gemini-cli -y`

## Description

Use when diagnosing PPT Skill setup or failures involving source parsing, Playwright or Chromium rendering, HTML-to-PPTX export, Workbench startup, or bundled search and image-tool configuration.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# sn-ppt-doctor

这是按需运行的能力与本地依赖检查，不是 Entry 的强制前置。Doctor 分开报告：

1. 当前 Agent 的普通搜索、图片搜索和图片生成原生工具是否注册、配置或实际验证；
2. PPT 整包自带的 `sn-ppt-tools` 是否存在并已配置。

Doctor 不检查或恢复 `sn_agent_runner.py`，不写 `.env`，也不把可选媒体能力变成硬门槛。

## 持久配置

PPT 内置工具与 Doctor 自动读取：

- Hermes：`~/.hermes/.env`
- OpenClaw：`~/.openclaw/.env`
- 自定义：先设置 `SN_PPT_ENV_FILE=/absolute/path/to/file`

已有进程变量优先于文件值。推荐配置：

```ini
# 搜索和搜图共用；默认请求 google.serper.dev
SN_PPT_SEARCH_API_KEY="<search-api-key>"

# OpenAI/SenseNova 兼容的同步 /images/generations 接口
SN_PPT_IMAGE_GEN_URL="https://your-host/images/generations"
SN_PPT_IMAGE_GEN_API_KEY="<image-generation-api-key>"
SN_PPT_IMAGE_GEN_MODEL="<image-generation-model>"
```

用户只需编辑一次文件，不需要每次启动 Hermes 前执行 `export`。Doctor 输出实际读取的文件、
已采用的变量名和缺失字段，但不得输出 key 值。

## 检查内容

- 当前 workspace 是否可写，`<pwd>/ppt_decks` 是否可用；
- `pypdf`、`python-docx` 是否可用于附件解析；
- Standard HTML 渲染所需的 Python Playwright 是否存在；
- 当前解释器缺少 Playwright 时，先保留 bare Python 的 pip 安装路径，再检查已安装的
  `uv tool` Playwright 是否可作为可选隔离环境；
- Playwright Chromium 是否已经安装并能实际启动（不是只检查脚本文件）；
- Node.js 是否可用于 Workbench 和 Static 默认 HTML -> PPTX 兼容版导出；
- HTML -> PPTX 所需的 npm、`pptxgenjs`、`echarts`、Node Playwright 是否可解析，以及该
  Playwright 的 Chromium 是否能实际启动；
- Standard 渲染脚本、PPTX exporter 和 Workbench runtime 是否存在；
- `python-pptx` 是否可用于 Creative 整页图片打包。
- `sn-ppt-tools` 的四个脚本是否存在；
- 内置普通搜索、图片搜索和图片生成的 URL 是否有效，key/model 是否已配置；
- 实际加载的 `.env` 路径、无效行和缺失字段。

## 原生工具有效性

**工具出现在 Agent 工具列表中不等于可用。** Doctor 必须使用以下状态：

| 状态 | 含义 |
|---|---|
| `absent` | 当前 Agent 没有对应工具 |
| `present_unverified` | 工具已注册，但没有配置检查或成功调用证据 |
| `misconfigured` | 工具或已知配置检查明确报告缺少 URL、key、model 等 |
| `available` | 无费用 config/health 检查通过，或一次真实调用成功 |
| `failed` | 真实调用已经失败 |

运行 Doctor Skill 的 Agent 必须：

1. 检查当前实际工具列表，没有工具时写 `absent`。
2. 有工具时先寻找该工具暴露的 config/health 状态；明确缺配置时写 `misconfigured`。
3. 没有无费用检查时只能写 `present_unverified`，不得因工具名称存在就写 `available`。
4. 用户要求完整检查时，普通搜索和搜图各做一次最小真实调用。
5. 生图真实探测可能收费，必须先获得用户明确同意；未探测前保持
   `present_unverified`，除非已有明确缺配置证据。

The rest: https://github.com/OpenSenseNova/SenseNova-Skills/blob/HEAD/skills/sn-ppt-doctor/SKILL.md
