| name | pencil-design-and-develop |
| description | Design, inspect, and troubleshoot Pencil .pen files with MCP tools. Use this skill when an AI coding agent needs one selected mode per request: (1) Design-only editing in Pencil, (2) Design to Code implementation from Pencil files, (3) Code to Design synchronization into Pencil, or (4) Pencil MCP troubleshooting. |
Pencil Design and Develop
Purpose
Use this skill for Pencil work with explicit mode selection.
- Design or edit
.pen files in Pencil.
- Implement code from existing Pencil designs.
- Synchronize code changes into Pencil designs.
- Troubleshoot Pencil MCP and runtime issues.
Mode Selection
Select one mode per request.
Design-only: Create or edit design content in Pencil.
Design->Code: Read .pen files and generate implementation code.
Code->Design: Reflect code-side structure and styles into Pencil.
Troubleshooting: Diagnose MCP, auth, document, and runtime failures.
Run multiple modes only when the user explicitly asks for a multi-step flow.
If runtime context cannot be resolved, use embedded-safe behavior from references/mcp-tool-rules.md.
Start Sequence
- Read
references/mcp-tool-rules.md first.
- Resolve runtime context and tool naming via that file.
- Confirm the selected mode.
- Load only the mode-specific references below.
- If tool behavior or API details are unclear, resolve docs with Context7 first; then consult
references/docs-map.md.
Mode Routing
Design-only
- Read
references/workflow-design.md.
- Apply mutation/tool safety from
references/mcp-tool-rules.md.
- Enforce mode gates from
references/quality-gates.md.
- Run checks from
references/visual-verification.md.
Design->Code
- Read
references/workflow-design-to-code.md and execute only the Design->Code section.
- Apply responsive mapping from
references/responsive-breakpoints.md.
- Use
references/pen-format-cheatsheet.md when .pen structure details are needed.
Code->Design
- Read
references/workflow-design-to-code.md and execute only the Code->Design section.
- Use
references/pen-format-cheatsheet.md for reusable and slot-safe updates.
- Enforce mode gates from
references/quality-gates.md.
- Run checks from
references/visual-verification.md.
Troubleshooting
- Read
references/troubleshooting-playbook.md.
- Reuse runtime and failure handling rules from
references/mcp-tool-rules.md.
- Use
references/docs-map.md for official documentation navigation.
Non-negotiable Safety Rules
- Do not mutate a document before structure is confirmed via host context or
batch_get.
- Keep each
batch_design call to 25 operations or fewer.
- Always use bindings for
I, C, and R operations.
- Do not update
children with U; use R for node replacement.
- Do not update copied descendants by original IDs; use
descendants in C.
- Validate each completed mutation section with screenshot and layout checks.
Output Contract
Every user-facing report must include:
- Selected mode.
- Resolved runtime context (
embedded or external) and whether fallback was used.
- What was changed.
- Which files or node IDs were affected.
- What validations were run (visual and layout).
- Any unresolved risks, assumptions, or constraints.
- Which modes were intentionally not executed.
For runbooks and detailed guardrails, rely on:
references/mcp-tool-rules.md
references/workflow-design.md
references/workflow-design-to-code.md
references/quality-gates.md
references/visual-verification.md
references/troubleshooting-playbook.md
references/docs-map.md