pencil-mcp-batch-design

Batch execute insert, update, replace, move, and delete operations on Pencil .pen design nodes via the batch_design MCP tool. Use when the user explicitly mentions Pencil and needs to draw, insert, change, remove, or move elements on the canvas.

261 stars

Best use case

pencil-mcp-batch-design is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Batch execute insert, update, replace, move, and delete operations on Pencil .pen design nodes via the batch_design MCP tool. Use when the user explicitly mentions Pencil and needs to draw, insert, change, remove, or move elements on the canvas.

Batch execute insert, update, replace, move, and delete operations on Pencil .pen design nodes via the batch_design MCP tool. Use when the user explicitly mentions Pencil and needs to draw, insert, change, remove, or move elements on the canvas.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "pencil-mcp-batch-design" skill to help with this workflow task. Context: Batch execute insert, update, replace, move, and delete operations on Pencil .pen design nodes via the batch_design MCP tool. Use when the user explicitly mentions Pencil and needs to draw, insert, change, remove, or move elements on the canvas.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pencil-mcp-batch-design/SKILL.md --create-dirs "https://raw.githubusercontent.com/partme-ai/full-stack-skills/main/skills/pencil-skills/pencil-mcp-batch-design/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pencil-mcp-batch-design/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pencil-mcp-batch-design Compares

Feature / Agentpencil-mcp-batch-designStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Batch execute insert, update, replace, move, and delete operations on Pencil .pen design nodes via the batch_design MCP tool. Use when the user explicitly mentions Pencil and needs to draw, insert, change, remove, or move elements on the canvas.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## Tools

This skill is designed to call the Pencil MCP tool:

*   `batch_design`

If your client namespaces MCP tools, it may appear as `mcp__pencil__batch_design`.

## When to use this skill

### Intent Recognition (CRITICAL)
Even if a trigger phrase matches, you must **verify the user's intent**:
1.  Is the user explicitly asking to use "Pencil"?
2.  Is the current conversation context clearly about "Pencil" design tasks?

**If the answer is NO, do NOT use this skill.** (e.g., if the user just says "Draw a rectangle" in a general context, they might mean Stitch, SVG, or Mermaid).

**CRITICAL PREREQUISITE:**
**You must ONLY use this skill when the user EXPLICITLY mentions "Pencil".**

**ALWAYS use this skill when:**
- You need to **Create**, **Update**, **Delete**, or **Move** elements on the canvas.
- The user asks to "Draw", "Insert", "Change", "Remove" something **using Pencil**.
- You are executing a design plan.

**Trigger phrases include:**
- "Draw a rectangle with Pencil" (用 Pencil 画一个矩形)
- "Pencil update text content" (Pencil 更新文本内容)
- "Insert component using Pencil" (使用 Pencil 插入组件)
- "Pencil move node" (Pencil 移动节点)
- "Delete selection with Pencil" (用 Pencil 删除选区)

## Input Parameters

The `batch_design` tool accepts a JSON structure defining a list of operations.

*   **`operations`** (array, required): A list of operation objects.
    *   **Insert (`I`)**: `{ "type": "insert", "targetId": "...", "node": { ... } }`
    *   **Update (`U`)**: `{ "type": "update", "targetId": "...", "props": { ... } }`
    *   **Replace (`R`)**: `{ "type": "replace", "targetId": "...", "node": { ... } }`
    *   **Delete (`D`)**: `{ "type": "delete", "targetId": "..." }`
    *   **Move (`M`)**: `{ "type": "move", "targetId": "...", "parentId": "..." }`

**Important Notes:**
*   **Batch Limit**: Keep each call to max **25 operations**. Split larger tasks.
*   **Binding Names**: Create new binding names for every operation list. DO NOT reuse.
*   **Component Instances**:
    *   Use `type: "ref"` and `ref: "ComponentID"` to insert instances.
    *   Use `U()` with instance path to override properties.

## How to use this skill

1.  **Plan Operations**: specific exactly what needs to change.
2.  **Construct JSON**: Build the valid JSON payload matching the `.pen` schema.
3.  **Call Tool**: Invoke `batch_design`.
4.  **Handle Errors**: If an operation fails, the batch rolls back. Check the error message and retry with corrections.

## Examples

### 1. Simple: Insert Text
Insert a simple text node into the current context.
See [1-insert-text.json](examples/1-insert-text.json).

### 2. Medium: Create Layout Frame
Create an Auto-Layout Frame with a child button.
See [2-create-layout.json](examples/2-create-layout.json).

### 3. Complex: Component Instance & Overrides
Insert a component instance and override its internal properties (e.g., changing button text) in one go.
See [3-component-instance.json](examples/3-component-instance.json).

## Keywords

**English keywords:**
batch design, draw ui, update props, insert node, delete element, move layer, modify canvas

**Chinese keywords (中文关键词):**
批量设计, 绘制UI, 更新属性, 插入节点, 删除元素, 移动图层, 修改画布

Related Skills

course-designer

261
from partme-ai/full-stack-skills

Design structured courses including syllabi, learning objectives using Bloom's taxonomy, lesson plans, and assessment rubrics. Use when the user asks about course design, needs to create a curriculum, write learning objectives, structure educational modules, or build assessment plans.

stitch-ui-designer

261
from partme-ai/full-stack-skills

Master orchestrator for end-to-end Stitch UI design and generation. Use when the user asks to design, create, or make a UI screen using Stitch. Coordinates design spec generation, framework contract injection, prompt assembly, and MCP execution (create_project, generate_screen_from_text, get_screen) in a single workflow.

stitch-ui-design-variants

261
from partme-ai/full-stack-skills

Generate alternative Stitch design variant prompts for A/B testing and creative exploration. Use when the user wants multiple style, layout, or content options for a Stitch screen. Takes a base Design Spec or prompt and produces 3 distinct variants (layout, style, or content variations).

stitch-ui-design-spec-vant

261
from partme-ai/full-stack-skills

Vant 4 (Vue 3/Mobile) design spec for Stitch screen generation. Use when the user mentions Vant, vant4, or vant-ui in a Stitch design request. Outputs a hard-constraints prefix with Vant tokens (Primary #1989fa, van-button/van-field/van-nav-bar components, mobile-first 375px) or a CONTRACT_SELECTION_JSON_V1 selector.

stitch-ui-design-spec-uviewpro

261
from partme-ai/full-stack-skills

uView Pro (uni-app/Vue 3) design spec for Stitch screen generation. Use when the user mentions uview-pro, uviewpro, or uview 3.0 in a Stitch design request. Outputs a hard-constraints prefix with uView Pro tokens (Primary #3c9cff, rpx units, u-button/u-form/u-navbar components, script setup) or a CONTRACT_SELECTION_JSON_V1 selector.

stitch-ui-design-spec-uview

261
from partme-ai/full-stack-skills

uView 2.0 (uni-app/Vue 2) design spec for Stitch screen generation. Use when the user mentions uview, uview2, or u-view in a Stitch design request. Do NOT use for uView Pro requests. Outputs a hard-constraints prefix with uView 2 tokens (Primary #3c9cff, u-row/u-col/u-button components) or a CONTRACT_SELECTION_JSON_V1 selector.

stitch-ui-design-spec-layui

261
from partme-ai/full-stack-skills

Layui-Vue design spec for Stitch screen generation. Use when the user mentions Layui, layui-vue, or layui admin in a Stitch design request. Outputs a hard-constraints prefix with Layui tokens (Primary #16baaa, Nav-bg #393D49, layui-btn/input/card components) or a CONTRACT_SELECTION_JSON_V1 selector with assembled prompt.

stitch-ui-design-spec-generator

261
from partme-ai/full-stack-skills

Translate user requirements into a structured Stitch Design Spec JSON covering theme, primaryColor, font, roundness, density, designMode, styleKeywords, and deviceType. Use when starting a new Stitch design task to determine visual direction before prompt assembly. Supports one-shot user requests and PRD documents as input.

stitch-ui-design-spec-element-plus

261
from partme-ai/full-stack-skills

Element Plus design spec for Stitch screen generation. Use when the user mentions Element Plus, element-ui, or el-plus in a Stitch design request. Outputs a hard-constraints prefix with Element Plus tokens (colors, typography, radius, el-* components) or a CONTRACT_SELECTION_JSON_V1 selector with assembled prompt.

stitch-ui-design-spec-bootstrap

261
from partme-ai/full-stack-skills

Bootstrap-Vue (Bootstrap 5/Vue) design spec for Stitch screen generation. Use when the user mentions Bootstrap, bootstrap-vue, bs-vue, or bs5 in a Stitch design request. Outputs a hard-constraints prefix with Bootstrap tokens (Primary #0d6efd, b-container/b-row/b-col/b-button components, mobile-first grid) or a CONTRACT_SELECTION_JSON_V1 selector.

stitch-design-md

261
from partme-ai/full-stack-skills

Analyze Stitch projects and synthesize a semantic design system into DESIGN.md. Use when the user wants to extract a style guide, create visual consistency across Stitch screens, or document design tokens (colors, typography, spacing) from existing Stitch designs. Retrieves screens via Stitch MCP and outputs a markdown design system file.

pencil

261
from partme-ai/full-stack-skills

用于通过 Pencil MCP 读取/修改 .pen 设计文件并校验布局。用户提到 pencil/.pen/设计稿编辑、需要列出工具或执行 batch_get/batch_design 时调用。