pencil-mcp-batch-design
Skill0 starsChanged 10 months agoApache-2.0View on GitHub
Batch execute design changes. The Agent's 'Hands'. Core capability for inserting, updating, moving, or deleting nodes.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- pencil-design-from-stitch-htmlSkill
- pencil-mcp-batch-getSkill
- pencil-mcp-find-empty-space-on-canvasSkill
- pencil-mcp-get-editor-stateSkill
- pencil-mcp-get-guidelinesSkill
- pencil-mcp-get-screenshotSkill
- pencil-mcp-get-style-guideSkill
- pencil-mcp-get-style-guide-tagsSkill
- pencil-mcp-get-variablesSkill
- pencil-mcp-open-documentSkill
- pencil-mcp-replace-all-matching-propertiesSkill
- pencil-mcp-search-all-unique-propertiesSkill
- pencil-mcp-set-variablesSkill
- pencil-mcp-snapshot-layoutSkill
- pencil-skill-creatorSkill
- pencilSkill
- pencil-ui-designerSkill
- pencil-ui-design-spec-generatorSkill
- pencil-ui-design-system-antdSkill
- pencil-ui-design-system-bootstrapSkill
- pencil-ui-design-system-echartsSkill
- pencil-ui-design-system-elementSkill
- pencil-ui-design-system-layuiSkill
- pencil-ui-design-system-uchartsSkill
- pencil-ui-design-system-uviewproSkill
- pencil-ui-design-system-uviewSkill
- pencil-ui-design-system-vantSkill
- pencil-{category}-{scenario}Skill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
If your client namespaces MCP tools, it may appear as mcp__pencil__batch_design.
- Distinctive: line 52
Batch Limit: Keep each call to max 25 operations.
- Distinctive: line 53
Binding Names: Create new binding names for every operation list.
- Very specific: line 55
Use type: "ref" and ref: "ComponentID" to insert instances.
- Very specific: line 56
Use U() with instance path to override properties.
- Distinctive: line 63
Handle Errors: If an operation fails, the batch rolls back.
- Very specific: line 72
Create an Auto-Layout Frame with a child button.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- Is the user explicitly asking to use "Pencil"?
- 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": "..." }
- Insert (
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"andref: "ComponentID"to insert instances. - Use
U()with instance path to override properties.
- Use
How to use this skill
- Plan Operations: specific exactly what needs to change.
- Construct JSON: Build the valid JSON payload matching the
.penschema. - Call Tool: Invoke
batch_design. - 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.
2. Medium: Create Layout Frame
Create an Auto-Layout Frame with a child button. See 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.
Keywords
English keywords: batch design, draw ui, update props, insert node, delete element, move layer, modify canvas
Chinese keywords (中文关键词): 批量设计, 绘制UI, 更新属性, 插入节点, 删除元素, 移动图层, 修改画布
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

