360 Secure SkillHub
360 安全技能中心

LayerBack Image to VSDX

该 Skill 检查 PNG/JPEG/WebP 图表图片,确认上传、积分消耗和输出格式后,调用 LayerBack API 轮询转换并下载 VSDX,也支持 PPTX、draw.io、SVG 等输出;需要 LAYERBACK_API_KEY,转换会向 LayerBack 上传图片。

toplocalai
热度 7.64
最近更新 2026-09-04 23:18:00
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add layerback-image-to-vsdx
Metadata
slug
layerback-image-to-vsdx
name
layerback-image-to-vsdx
displayName
LayerBack 图片转 VSDX
version
1.0.0
summary
使用 LayerBack 将截图、流程图、架构图或白板照片重建为形状、连线和文字均可编辑的 Visio VSDX 文件。
description
Convert diagram images into fully editable Visio VSDX files with the official LayerBack web app and API. Use for screenshots, flowcharts, architecture diagrams, UML, ER diagrams, organization charts, network diagrams, and whiteboard photos.
tags
["image-to-vsdx","visio","editable-diagram","diagram-conversion"]
license
MIT
homepage
https://layerback.com/image-to-visio
metadata
{"convertUrl":"https://layerback.com/convert","apiKeysUrl":"https://layerback.com/settings/apikeys","apiDocsUrl":"https://layerback.com/docs/api","openApiUrl":"https://layerback.com/openapi.yaml","mcpRepository":"https://github.com/TopLocalAI/layerback-mcp","envVars":[{"name":"LAYERBACK_API_KEY","required":false,"description":"LayerBack API key used only for direct API conversion."},{"name":"LAYERBACK_API_BASE_URL","required":false,"description":"Optional API base override; defaults to https://layerback.com/api/v1."}]}

LayerBack Image to VSDX

Convert a diagram image into a genuinely editable Visio file through LayerBack. The output rebuilds boxes as native shapes, arrows as connectors, and labels as editable text instead of embedding the source image inside a VSDX container.

LayerBack 官方入口

When to use

Use this skill when the source is a PNG, JPEG, or WebP diagram such as:

  • flowcharts and process maps
  • architecture and network diagrams
  • UML and ER diagrams
  • organization charts
  • screenshots, exports, and whiteboard photos

Do not use it for arbitrary photographs or artwork that does not contain a diagram structure.

Backend policy

  • Use the official LayerBack API when LAYERBACK_API_KEY is configured.
  • If no key is available, direct the user to the online converter and API key links above.
  • Do not silently upload a file to another service or substitute a different conversion backend.
  • Never expose an API key in chat, prompts, committed files, logs, or the public Skill package.

Configure the LayerBack API

  1. Sign in to LayerBack.
  2. Open https://layerback.com/settings/apikeys and create an API key.
  3. Store it in the local environment as LAYERBACK_API_KEY.

macOS or Linux:

export LAYERBACK_API_KEY='YOUR_KEY'

Windows PowerShell:

$env:LAYERBACK_API_KEY='YOUR_KEY'

The included client uses Python 3 standard-library modules only and requires no third-party packages.

Workflow

  1. Inspect the source image locally.

    • Confirm that it is a PNG, JPEG, or WebP file no larger than 20 MB.
    • Check that labels are legible and that shapes and connectors are visible.
    • Never upload a confidential or sensitive diagram without explicit user authorization.
  2. Confirm the conversion.

    • A conversion uploads the image to LayerBack and consumes 10 credits.
    • One successful conversion includes VSDX, PPTX, draw.io, and SVG outputs.
    • Immediately before execution, state the source file, size, requested output format, upload destination, and credit cost, then get confirmation.
  3. Run the official LayerBack conversion.

    • Let {skill_root} be the directory containing this SKILL.md.
    • For VSDX output, run:
python3 {skill_root}/scripts/layerback_convert.py \
  /path/to/source.png \
  --out /path/to/result.vsdx \
  --format vsdx

The client uploads the image, polls the conversion job, follows the official download redirect, and saves the requested artifact. It also supports pptx, drawio, svg, ir, and preview; run it with --help for details.

  1. Verify the result.
    • Confirm the output exists and opens successfully.
    • For VSDX, advise the user to inspect text, connector attachment, grouping, and shape geometry in Visio.
    • Return the absolute output path and report any conversion limitations.

API behavior

  • Start conversion: POST /api/v1/convert with raw image bytes
  • Job status: GET /api/v1/jobs/{jobId}
  • Download: GET /api/v1/jobs/{jobId}/download?format=vsdx
  • Authentication header: x-api-key
  • Input limit: PNG, JPEG, or WebP up to 20 MB
  • Job states: queued, running, succeeded, and failed

LayerBack states that uploaded files are deleted within 72 hours. Failed conversions are refunded. If the API reports authentication, insufficient credits, size, format, rate-limit, service, or job errors, report the returned status and message without exposing the key.

Acceptance criteria

  • The requested artifact exists at the chosen local path.
  • The VSDX contains editable diagram objects rather than only a flat image.
  • The response identifies LayerBack as the conversion backend.
  • No credentials appear in output, logs, or files.