跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

sn-ppt-workbench

Use when the user asks to open, preview, inspect, or visually edit an existing SenseNova HTML presentation in the PPT Workbench, using an explicit deck_dir or the latest deck in the current workspace.

文档与办公5.7kskills/sn-ppt-workbench/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/opensensenova/sensenova-skills/sn-ppt-workbench/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

sn-ppt-workbench

Start or reuse the AI PPT editing WebUI for an existing HTML slide deck. The helper prefers Hermes/canvas/port-forward URLs when available. Without a forwarded URL, native hosts bind to localhost by default, while Docker/WSL bind to 0.0.0.0 so remote users can reach the WebUI through the host network.

Use Cases

  • The user already generated a deck and asks to open the WebUI/editor/workbench.
  • The user provides a deck_dir containing task_pack.json, slides/slide_NN.html, pages/page_NNN.html, or a root-level HTML deck.
  • The user says to inspect or edit previously generated slides without regenerating them.

Hard Rules

  1. Do not run sn-ppt-entry, sn-ppt-standard, page-html, batch-page-html, or export.
  2. Do not edit slide files directly. The WebUI handles user-visible editing.
  3. If deck_dir is missing, auto-detect only under $(pwd)/ppt_decks. Other roots are considered only when the caller explicitly passes --search-root; never scan home folders by default.
  4. If no usable deck is found, ask the user for the absolute deck_dir.
  5. Workbench startup is best-effort. If it skips or fails, report the reason and do not attempt generation as a fallback.
  6. Prefer a forwarded/canvas URL over localhost when the user may be on SSH, IM, or another remote device.
  7. When launched from the unified PPT flow, use the exact absolute task_pack.deck_dir; opening the Workbench must not create or switch tasks.
  8. Treat task_pack.json as progress/resume state and outline.md as the user-editable Story. Existing runtime builds may expose only part of these artifacts; report compatibility gaps instead of regenerating the deck.

Invocation

Use the helper directly:

python3 $SKILL_DIR/scripts/open_workbench.py --deck-dir "<deck_dir>" --agent-session-id "${HERMES_SESSION_KEY:-}"

On native Windows where python3 is unavailable:

python $SKILL_DIR/scripts/open_workbench.py --deck-dir "<deck_dir>" --agent-session-id "%HERMES_SESSION_KEY%"

If the user did not provide a deck path, let the helper auto-detect:

python3 $SKILL_DIR/scripts/open_workbench.py --agent-session-id "${HERMES_SESSION_KEY:-}"

Pass same-session bridge details when available:

python3 $SKILL_DIR/scripts/open_workbench.py \
  --deck-dir "<deck_dir>" \
  --agent-session-id "${HERMES_SESSION_KEY:-}" \
  --agent-managed 1 \
  --agent-provider hermes \
  --agent-transport gateway \
  --webui-base-url "${HERMES_WEBUI_BASE_URL:-}" \
  --gateway-base-url "${HERMES_GATEWAY_BASE_URL:-}"

--agent-transport may be omitted: the helper auto-selects gateway when the Hermes Gateway endpoint and key resolve (environment or Hermes .env files), then webui / acp / rest when only those details exist. Explicit flags and WORKBENCH_AGENT_TRANSPORT always win. With no resolvable bridge the bottom chat stays read-only by design.

For non-Hermes interactive providers, pass structured bridge details instead of scraping CLI/TUI output:

python3 $SKILL_DIR/scripts/open_workbench.py \
  --deck-dir "<deck_dir>" \
  --agent-managed 1 \
  --agent-provider openclaw \
  --agent-transport rest \
  --agent-base-url "${WORKBENCH_AGENT_BASE_URL:-}" \
  --agent-api-key "${WORKBENCH_AGENT_API_KEY:-}"

python3 $SKILL_DIR/scripts/open_workbench.py \
  --deck-dir "<deck_dir>" \
  --agent-managed 1 \
  --agent-provider codex \
  --agent-transport acp \
  --acp-command "${WORKBENCH_ACP_COMMAND:-codex-acp}"

python3 $SKILL_DIR/scripts/open_workbench.py \
  --deck-dir "<deck_dir>" \
  --agent-managed 1 \
  --agent-provider box-agent \
  --agent-transport acp \
  --acp-command "${WORKBENCH_ACP_COMMAND:-${BOX_AGENT_ACP_COMMAND:-box-agent-acp}}"

When this helper runs inside Box Agent, the exported BOX_AGENT_PYTHON or BOX_AGENT_SKILL_TOOLS_ROOT environment automatically selects box-agent, acp, and the installed box-agent-acp command. Explicit WORKBENCH_AGENT_* flags or environment variables still take precedence.

For WorkBuddy, pass --agent-provider workbuddy only as provider identity. Tell the user clearly that WorkBuddy currently has no supported API or ACP interface for the interactive workbench bridge, so the WebUI can show WorkBuddy status but cannot send bottom-chat modification turns back to WorkBuddy.

CLI Subcommands (direct launch fallback)

When bypassing open_workbench.py and invoking the workbench launcher directly, use subcommands:

node <launcher> start   --deck-dir "<path>" [--port 0] [--agent-managed]
node <launcher> status  --deck-dir "<path>"
node <launcher> stop    --deck-dir "<path>"

The old argument-only form (no subcommand) is deprecated — it will print a usage error.

Restart pitfall: start silently reuses an existing server instance for the same deck-dir (response contains "reused": true). If you updated the workbench code, you MUST run stop first, then start — otherwise the old process keeps serving stale code:

node <launcher> stop  --deck-dir "<path>"
node <launcher> start --deck-dir "<path>" --port 0

Bind Host

The workbench resolves its bind address from --host CLI flag → WORKBENCH_HOST env var → default 127.0.0.1. When the user needs remote/LAN access, set WORKBENCH_HOST=0.0.0.0:

export WORKBENCH_HOST=0.0.0.0
node <launcher> start --deck-dir "<path>" --port 0

The response url field will then show the LAN IP instead of 127.0.0.1.

Output Handling

Parse the single JSON line from stdout.

When status == "ok", echo the returned editor_url, public_url, or workbench.editorUrl for existing-deck editing requests. The helper may also return generation_url; that URL is the generation progress page at /progress, while the editor is /editor.

PPT 编辑工作台已启动:<editor_url>

If workbench.reused == true, say it reused the existing server.

If bind_host is 0.0.0.0, the URL is a Docker/WSL LAN fallback. Tell the user it must be reachable from their device/network; if not, ask them to provide a Hermes/canvas/port-forward URL and rerun with --public-url, or an explicit bind host with --host.

When status == "skipped" or status == "failed", echo the reason field. If reason == "nodejs_missing", ask whether the user wants NodeJS/dependencies installed; if they decline, do not open the WebUI. Ask for a valid deck_dir only if the reason says no deck was found.

Environment

The helper locates the editor launcher in this order:

  1. SENSENOVA_PPT_WORKBENCH_CLI
  2. PPT_WORKBENCH_CLI
  3. The runtime packaged beside this Skill
  4. The nearest src/ppt-editor source checkout or packaged release in the current worktree
  5. Common ~/Repository/ppt-editor fallbacks

The helper does not build the editor during an end-user launch. Packaged Skills must include workbench-runtime; source checkouts must build src/ppt-editor explicitly before using its launcher. The repository-level webui/ directory is a separate product and is not a launcher fallback for this Skill.

Remote URL discovery order:

  1. Explicit --public-url
  2. WORKBENCH_PUBLIC_URL, HERMES_WORKBENCH_PUBLIC_URL
  3. Hermes/canvas/forwarding env vars such as HERMES_CANVAS_URL, HERMES_PORT_FORWARD_URL, CANVAS_URL, PORT_FORWARD_URL, TUNNEL_URL
  4. Codespaces/Gitpod URL patterns
  5. Localhost on native hosts, or LAN fallback from the machine's non-loopback IPv4 address on Docker/WSL

Gateway Auth Setup

For writable interactive agent bridging (chat panel in workbench), Hermes keeps using the existing WebUI/Gateway protocol. OpenClaw should be exposed through a Gateway/REST-compatible HTTP endpoint. Codex, Claude Code, and Box Agent should use ACP JSON-RPC adapters, configured with --acp-command or WORKBENCH_ACP_COMMAND. Box Agent defaults to its installed box-agent-acp entry point. Never parse provider CLI/TUI output for chat synchronization.

For writable Hermes Gateway bridging, the Gateway API server and workbench must authenticate with matching API keys.

Key env vars:

VariableSet ByValue
API_SERVER_KEYGateway (.env)Shared secret
WORKBENCH_GATEWAY_API_KEYWorkbench envSame as API_SERVER_KEY; preferred explicit bridge key
HERMES_GATEWAY_BASE_URLWorkbench envhttp://127.0.0.1:8642
WORKBENCH_AGENT_PROVIDERWorkbench envhermes, openclaw, codex, claude-code, box-agent, or workbuddy
WORKBENCH_AGENT_TRANSPORTWorkbench envwebui, gateway, rest, or acp
WORKBENCH_AGENT_BASE_URLWorkbench envOpenClaw/Gateway REST endpoint
WORKBENCH_AGENT_API_KEYWorkbench envREST provider bearer token
WORKBENCH_ACP_COMMANDWorkbench envACP adapter command, e.g. codex-acp
BOX_AGENT_ACP_COMMANDBox Agent / Workbench envOptional override for the default box-agent-acp adapter command

Quick steps:

  • Gateway: set API_SERVER_KEY in .env, restart gateway
  • Workbench: set WORKBENCH_GATEWAY_API_KEY to same value, set HERMES_GATEWAY_BASE_URL=http://127.0.0.1:8642
  • If no explicit bridge key is set, the Node relay falls back to API_SERVER_KEY, HERMES_GATEWAY_API_KEY, then backend-only AI_GATEWAY_API_KEY (ppt-editor-dev by default). Prefer the explicit bridge key for custom/shared gateways.

Progress Echo

Always send a short progress message before and after the helper:

WhenExample
Before helper正在启动 PPT 预览工作台,不会重新生成幻灯片...
SuccessPPT 编辑工作台已启动:http://127.0.0.1:18087
Generation progress URL available生成进度工作台:http://127.0.0.1:18087/progress
Skip/failurePPT 工作台未启动:<reason>

相似的 Skill

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

文档与办公

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

文档与办公

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

文档与办公

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

文档与办公

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

文档与办公

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

文档与办公