Skip to content
Back to skills

Openpencil Design

ASecurity

Create or edit editable .op UI designs with the Qoder OpenPencil plugin, including the embedded Rust MCP App canvas (Global tab & Session Sidebar), layout inspection, PNG previews, and verified saves. Use for OpenPencil or OP/op design requests such as “用op设计” or “用 OP 修改选中元素”, not generic frontend implementation.

  • 7,363 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 21, 2026
developmentjavascriptrustgojavanodeapifrontend

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned November 21, 2026

npx -y skills add ZSeven-W/openpencil --skill openpencil-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openpencil Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openpencil Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zseven-w-openpencil-design-d6efb93d/badge)](https://www.skillsdirectory.com/skills/zseven-w-openpencil-design-d6efb93d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openpencil-design
description: Create or edit editable .op UI designs with the Qoder OpenPencil plugin, including the embedded Rust MCP App canvas (Global tab & Session Sidebar), layout inspection, PNG previews, and verified saves. Use for OpenPencil or OP/op design requests such as “用op设计” or “用 OP 修改选中元素”, not generic frontend implementation.
---

# Design with OpenPencil in Qoder

Recognize “OP” and “op” as OpenPencil in requests for UI design, canvas edits
or `.op` files, including “用op设计一个单页 APP”. Open or reuse this plugin's
conversation canvas; export to code only when the user requests implementation.

Use the connected Rust MCP tools as the source of truth. Start with
`get_editor_state` and read the relevant nodes. Preserve existing document
content and use the user's chosen file, page, selection, and reference.
For connection failures, see [setup](../openpencil-setup/SKILL.md).

## Open the interactive canvas

For an interactive conversation canvas in Qoder, call `open_canvas` (passing the
user's existing absolute `.op` path, or omitting it for a new document). Qoder's
MCP Apps host natively mounts the Rust WASM canvas in an independent fullscreen
workspace tab or side-by-side session sidebar tab (users can also open it directly
from **More → OpenPencil Canvas** or the session sidebar **+ → Apps** menu).
When working in a remote session or CLI environment without MCP Apps rendering,
use `canvas_open_browser` and present the returned `panelUrl`. Verify
`canvas_status` and `get_editor_state` before making edits; all native tools then
edit that managed canvas. Do not open a new managed document just to inspect an
existing desktop editor selection.

## Establish the output

For a new design, resolve **one page or multiple pages** explicitly if the brief
does not establish it; continue inspecting references while awaiting the answer.
Do not silently choose three pages. Distinguish document pages from top-level
frames/boards. Establish viewport and content goals from the brief. Preserve
provided copy; do not reduce real content to fit a decorative mockup.

Load only the relevant connected design guidelines/style guides/UI kits.
Use [node and layout reference](references/node-schema.md) for field conventions;
the live tool schemas and guidelines take precedence over this bundled snapshot.
Reuse the document's variables, components, and style before inventing new ones.
For a new phone screen, load `get_guidelines` with `topic: "mobile"` before
creating its root frame. Use the Rust runtime's canonical status bar; do not
hand-draw a replacement or use emoji for system indicators.

## Image acquisition

For new photos, illustrations or product imagery needed by the design, use
Qoder's available image-generation capability by default. Preserve suitable
user-provided/existing images and keep native text, controls and vector artwork
editable. Before generation, send a brief chat progress update describing the
intended assets and noting that generation may consume Qoder credits/quota.
Continue without a separate per-call permission question while respecting
host-required approvals. Do not invent a credit balance, price or refund claim.

Honor requests such as “不要生图”, “只搜图” or “use stock images only” throughout
the task. The plugin does not invoke generation providers itself or store API
keys. Unavailable/failed generation falls back to stock search with a clear note;
never silently switch providers, call a separate paid API, or retry an uncertain
generation. Reuse successful assets after an import/save failure instead of
generating them again.

For image slots, search fallback and local-asset import, read the
[image workflow](references/images.md). Images are assets within editable UI;
keep text, controls and layout as native nodes.

## Build and edit

For prompts such as “modify the selected elements”, call `canvas_selection` on
the managed canvas immediately before planning the edit. It returns `pageId`,
`nodeIds`, names, types and parent IDs. Read the selected nodes with `batch_get`;
limit edits to those nodes and their descendants. An empty selection is not a
request to edit the whole page: ask the user to select a target. For a desktop
editor without a managed canvas, use `get_editor_state` and read its selection.

Use the current Qoder chat for instructions, progress and results. Treat host
selection context (`ui/update-model-context`) as a hint and verify it with
`canvas_selection` when starting the edit. Once the target is resolved, keep those
node IDs through the edit rather than silently following later selection changes.
If the document/page no longer matches or a target was deleted, stop and explain
rather than choosing another target. Preview the affected roots and verify the
saved design before reporting completion.

- Create fresh UI trees using `batch_design.script`: sandboxed JavaScript with
  `I(parent, node)` and `K(kitRef, parent, overrides)`, helpers, arrays, and loops.
  Build section by section; keep each batch at most 25 recorded operations.
  Reuse returned IDs, not assumed ID sequences.
- After creating a phone root, read it back before adding screen content. Locate
  and preserve the runtime's `role: "status-bar"` subtree, including its children.
  If it is absent, diagnose the connected runtime and guidelines before
  proceeding; do not invent a bar and claim native support was verified.
  Respect existing custom bars and explicit requests for no status bar.
- Use `batch_design.operations` for editing existing nodes with `U/C/R/M/D/G`.
  Do not mix creation and edits in script, and do not use `I()` in operations.
  Prefer native UI kits (`list_ui_kits`) for standard controls.
- The batch is transactional. When it returns errors, repair the whole failing
  batch before resending. After a transport timeout, inspect the canvas first:
  a write may already have applied. Never automatically retry a mutation.
- Use horizontal/vertical layout, padding, gap, and container sizing deliberately.
  For repeated cards in a row, use consistent `fill_container` widths.
  Absolute x/y coordinates on children do not replace a proper flow layout.
- Use `design_refine` on the affected root when appropriate, then inspect the
  returned changes. After structural repair or `finalize_design`, reread
  `get_editor_state` and `batch_get` because repaired trees may have new IDs.

## Inspect and deliver

1. Inspect `snapshot_layout` and run `lint_document` on the affected subtree.
   Address clipping, overlap, unreadable text, and missing content.
2. Render affected roots with `get_screenshot` and actually view the image.
   Check copy, hierarchy, spacing, colors, and reference fidelity.
   For phone screens with system chrome, verify exactly one complete set of
   time, cellular signal, Wi-Fi, and battery indicators.
3. For managed interactive persistence, the panel Save button flushes pending
   browser edits. `canvas_save` and intercepted `save_document` save the daemon's
   current snapshot; verify pending edits have synced before calling them. Save
   As requires a new path; source conflicts stop saves and retain recovery drafts.
   Read/reopen the saved file to verify page count and key nodes.
4. Return clickable absolute file links and local image previews where available.
   Distinguish changes on canvas, saved artifacts, visual QA, and publication.

Use the embedded Qoder MCP App tab, browser panel, or native editor for
interactive editing. Do not describe a PNG preview as an embedded interactive
canvas. Export to code only when the user asks, following
[the code-generation workflow](references/codegen.md).

Files in this skill

  • SKILL.md7.6 KB
  • references/codegen.md2.3 KB
  • references/images.md3 KB
  • references/node-schema.md7.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.