Skip to content
Presentations
Skill

/xiaobei-skill-image-to-vba

Use when users want XiaoBei skill / xiaobei-skill / 小北在读研 style academic image-to-VBA reconstruction: convert academic figures, scientific diagrams, slides, screenshots, or other images into VBA, Office drawing code, PowerPoint/Excel/Word shapes, editable shape reconstruction,

BOOST
From plugin
xiaobei-skill
5963 skills
Install
$ npx -y skills add xiao24bei/xiaobei-skill --skill xiaobei-skill-image-to-vba --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/xiaobei-skill-image-to-vba

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when users want XiaoBei skill / xiaobei-skill / 小北在读研 style academic image-to-VBA reconstruction: convert academic figures, scientific diagrams, slides, screenshots, or other images into VBA, Office drawing code, PowerPoint/Excel/Word shapes, editable shape reconstruction,

SKILL.md

xiaobei-skill-image-to-vba.SKILL.md
name: xiaobei-skill-image-to-vba
description: "Use when users want XiaoBei skill / xiaobei-skill / 小北在读研 style academic image-to-VBA reconstruction: convert academic figures, scientific diagrams, slides, screenshots, or other images into VBA, Office drawing code, PowerPoint/Excel/Word shapes, editable shape reconstruction, 1:1 recreation, pixel-like approximation, or hybrid editable Office shape reconstruction."

XiaoBei Image to VBA

小北在读研出品的 academic image-to-vba reconstruction skill. The workflow focuses on editable Office Shapes first, with carefully labeled raster crops only when complex scientific artwork should be preserved.

Output Language

All analysis, manifest tables, self-check reports, run reports, and conversational responses produced by this skill MUST be written in Simplified Chinese (简体中文). This includes:

  • 视觉拆解、元素清单、坐标说明、自检结论、运行报告、给用户的最终回复。
  • VBA 代码内的注释也使用中文(例如 `' 标题区域背景`),便于用户后续维护。

仅以下内容保留英文原样,不要翻译:

  • VBA 关键字、API 名、属性名(`Sub`、`Shapes.AddShape`、`Fill.ForeColor.RGB` 等)。
  • 形状名前缀 `AITVBA_` 与脚本路径、文件名。
  • 颜色十六进制值与 `RGB(...)` 调用本身。

如果用户在对话里明确要求换成英文或其它语言,则按用户指定的语言输出,但 manifest 字段名仍保留英文 key 以便机器解析。

Purpose

Convert a reference image into a complete, runnable Office VBA macro that reconstructs the visual using editable Shapes, TextBoxes, Lines, Freeforms, fills, gradients, transparency, shadows, and ZOrder. When the image contains complex, distinctive graphic elements that would become noisy or low-value if rebuilt as hundreds of shapes, preserve those elements as cropped local image assets and reconstruct the surrounding structure with editable VBA Shapes. The core loop is: image -> environment detection -> visual decomposition -> editable-vs-preserved element plan -> Office coordinate model -> VBA Shapes code and cropped assets -> run or prepare the macro in the available presentation app -> self-check -> iterative correction.

Prefer editable Office Shapes for structure, labels, arrows, boxes, chart scaffolds, and readable text. Preserve complex graphic elements only as local cropped assets when that improves fidelity and keeps the VBA maintainable. Do not embed the full source image as a shortcut unless the user explicitly permits it or chooses the background-image-assisted option for complex photos. A PNG/JPEG/PDF preview is never the final deliverable for this skill; it is only allowed as a diagnostic screenshot after an editable Office reconstruction has been produced or attempted.

Default Deliverable Contract

When the user provides an image and asks for reconstruction, the default target is a presentation deck unless another Office host is explicit. Prefer Microsoft PowerPoint automation when available, but support WPS users and no-local-office users with a truthful fallback path. The agent must produce:

  • A complete VBA macro file or code block that reconstructs the image with editable Office Shapes.
  • Any preserved local image assets needed for hybrid reconstruction, with clear labels showing they are not editable Shapes.
  • A presentation file created from that macro when local automation is available, or a clear statement that local presentation automation was blocked or unsupported.
  • The generated deck opened for the user when local PowerPoint/WPS opening is available.
  • A short run report that says whether the macro was executed, whether the deck opened, and where the generated `.bas` / `.pptx` / `.pptm` files are located.

Do not satisfy an image-to-VBA request by generating only a PNG image, raster preview, static screenshot, or visual mockup. If a preview image is useful, create it only in addition to the editable VBA/PPT deliverables.

Hybrid Preservation Mode

Use hybrid preservation when any of the hard triggers below fire. Do not rely on subjective judgment about whether the result "looks cluttered" — model self-assessment is biased toward editable reconstruction, which causes complex artwork to be redrawn poorly. The goal is to preserve high-complexity artwork while keeping the diagram's editable structure editable.

Hard preservation triggers (hit any one → the element MUST be preserved as a raster crop):

  • The element is a microscopy image, 3D render, real photograph, or photo-realistic illustration.
  • The element contains photo-grade gradients, textures, noise, or organic shading that cannot be matched by a few solid fills or simple gradients.
  • The element is a logo, trademarked mark, or branded artwork.
  • A faithful editable reconstruction would require more than ~15 Shapes for that single element.
  • The element is hand-drawn, painterly, or has stroke-width variation that cannot be matched by simple Line/Freeform.
  • The user explicitly named the element as "keep as image", "保留", "不拆", or equivalent.

If none of the triggers fire, treat the element as editable. If a trigger fires but the user demanded "all editable", explain the fidelity tradeoff first and get permission before redrawing.

Classify every visible element into one of three buckets:

  • Editable Shapes: text, arrows, boxes, connectors, axes, callouts, tables, UI panels, simple icons, repeated markers, and diagram scaffolds.
  • Preserved raster elements: distinctive illustrations, logos, scientific renderings, microscopy/photo crops, 3D objects, complex texture patches, dense molecular/mesh graphics, screenshots inside device frames, and hand-drawn/artistic elements whose shape-by-shape reconstruction would be noisy.
  • Background/base: plain solid/gradient backgrounds should be rebuilt as shapes; full-image background insertion is allowed only when the user explicitly asks for it or the source is photo-like.

Hybrid rules:

  • Preserve only the smallest useful crop around each complex element; do not insert the entire source image just to preserve a small object.
  • Put preserved assets behind or between editable layers according to the original z-order.
  • Recreate nearby labels, arrows, boxes, highlights, and callouts as editable VBA objects even when they overlap
Read more
Ships withxiaobei-skill

大家好,我是小北在读研,研二在读,电子信息专业。目前主要做 AI + 科研、Agent 赋能科研工作流 相关内容。全网10w➕粉丝,感兴趣的朋友也可以关注一下我的抖音:小北在读研 长期分享科研工具、论文阅读、学术绘图、科研 Agent、AI 自动化和研究生提效方法。除了这个开源 skill,我还在维护个人学术网站 xiaobeiai.top 和科研 API 中转站 beiapi.cn。

Get the whole plugin
Stats
597
Stars
23
Forks
Maintained
Maintenance
Python
Language
Apache-2.0
License
1mo ago
Last commit
4mo ago
Created
4h ago
Added

Repo: xiao24bei/xiaobei-skill

Other skills on xiaobei-skill.