Agent Skills › dataelement/dsh-desktop › generate-image

generate-image

GitHub

用于生成演示文稿和文档所需的图片、插图及背景。需先配置插件,通过识别用途、编写提示词并调用 image_generate 工具生成图像,最后插入文档并确保风格一致与路径复用。

packages/dsh-image-generation/skills/generate-image/SKILL.md dataelement/dsh-desktop

Trigger Scenarios

需要为 PPT 或 Word 生成配图 请求生成演示文稿背景或插图

Install

npx skills add dataelement/dsh-desktop --skill generate-image -g -y
More Options

Non-standard path

npx skills add https://github.com/dataelement/dsh-desktop/tree/main/packages/dsh-image-generation/skills/generate-image -g -y

Use without installing

npx skills use dataelement/dsh-desktop@generate-image

指定 Agent (Claude Code)

npx skills add dataelement/dsh-desktop --skill generate-image -a claude-code -g -y

安装 repo 全部 skill

npx skills add dataelement/dsh-desktop --all -g -y

预览 repo 内 skill

npx skills add dataelement/dsh-desktop --list

SKILL.md

Frontmatter
{
    "name": "generate-image",
    "description": "Generate reusable photos, illustrations and backgrounds for presentations, documents and other image requests."
}

Do not call image_generate until the user has saved an image configuration in Settings → Plugins → Image generation. After that, use it whenever a task needs a generated raster visual. The tool selects the saved provider. Credentials remain on the host. Never ask for an API key in conversation.

  1. Identify the image's purpose and placement. For PPT/Word, inspect the relevant document or template first. Carry its palette, art direction and whitespace needs into style_context, and reuse that style across the document.
  2. Write a complete prompt: subject, composition, setting, lighting, palette and required details. Specify room for titles or captions where the document needs it. Keep readable document text as native text; use native editable objects for charts, tables, flowcharts and simple diagrams.
  3. Choose the target aspect_ratio and purpose. A 16:9 slide does not require a 16:9 image when the illustration occupies only part of the slide. The tool returns actual dimensions; use proportional scaling or an intentional crop, preserving the main subject.
  4. Call image_generate once per needed visual using the saved provider configuration. A presentation or document may call it in parallel for multiple visuals. The Host applies workspace and deployment policy. The conversation displays the resulting PNG with click-to-enlarge preview. If an image-viewing tool is available, inspect the PNG before placing it; report visual findings only after viewing it. Correct specific visible defects if another generation is needed. Reuse an existing suitable image instead of generating duplicates.
  5. Insert the returned workspace_path into the PPT/Word workflow, then inspect the rendered document page. Keep visual assets linked to their purpose and reuse their paths across later edits. Return the document and any requested standalone image.

If the tool reports missing configuration, direct the user to Settings → Plugins → Image generation. Never request an API key in conversation or place one in a document, prompt, sandbox command or source file. Respect tool approval, cancellation and workspace policy. Surface provider errors accurately; use a placeholder only when the user accepts one. Configuration validation checks the connection without submitting an image generation job; successful generation is established by an actual generated image.

For a provider rejection, report the returned HTTP status, error code, parameter and request ID when present. A rejected adapter-owned parameter requires a plugin correction; preserve those diagnostics for the developer. Change a prompt or aspect ratio only when the reported cause points to that input. Describe account access or quota issues when the tool explicitly reports that category. The settings card validates automatically on Save.

Version History

  • a23788a Current 2026-09-22 01:09

Same Skill Collection

packages/ppt-runtime/core/skills/dsh-ppt/SKILL.md

Metadata

Files
0
Version
a23788a
Hash
218b36c8
Indexed
2026-09-22 01:09

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-26 15:35
浙ICP备14020137号-1