pencil-basics_skill

This skill helps you work with Pencil MCP design files by guiding .pen handling, node layouts, and batch design operations.

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill gyejoon/pencil-plugin --skill pencil-basics

  • SKILL.md5.6 KB

Overview

This skill explains how to work with Pencil MCP design files and tools to read, modify, and generate designs from .pen files. It focuses on safe, recommended workflows using the Pencil MCP API (get_editor_state, batch_get, batch_design, get_screenshot) and on core concepts like node types and the layout system. The guidance emphasizes practical patterns, common operations, and verification steps to avoid corrupting files.

How this skill works

The skill inspects the editor state and reads nodes via batch_get rather than accessing .pen files directly. Changes are applied through batch_design using a small set of operations (I, U, C, R, D, M, G) expressed in a JavaScript-like operations string. After applying changes, use get_screenshot to visually verify results.

When to use it

  • Creating a new screen or page from components in a Pencil file
  • Reading or enumerating nodes and reusable components with batch_get
  • Applying layout, content, or style changes via batch_design operations
  • Inserting or generating images into frames using the G operation
  • Debugging layout issues and validating fixes with get_screenshot

Best practices

  • Call get_editor_state first to confirm active file and selection
  • Never read/write .pen files directly; use the MCP tools only
  • Limit batch_design to small batches (<= 25 operations) and unique bindings
  • Always run get_screenshot after design changes to validate visually
  • Use instance path syntax (instanceId/childId) when updating component internals

Example use cases

  • Create a new screen: get_editor_state -> batch_get components -> batch_design to assemble -> get_screenshot to confirm
  • Update component text: batch_get to locate instance -> batch_design U(instanceId/labelId, {...}) -> get_screenshot
  • Duplicate and customize a component: C(sourceId, parentId, { descendants: { labelId: { content: 'New' } } })
  • Replace a node type or content: R(oldNodeId, { type: 'text', content: 'Replaced' })
  • Apply an AI or stock image into a frame: I(parentId, { type: 'frame', ... }); G(frameId, 'ai'|'stock', 'prompt')

FAQ

No. Do not access .pen files with Read, Grep, or Write. Always use Pencil MCP APIs such as batch_get and batch_design.

How many operations should I include in one batch_design call?

Keep batches small—ideally no more than 25 operations—to reduce risk and make debugging easier.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational