moai-workflow-pencil-integration

Executes Pencil MCP batch design operations from pencil-plan.md with layout verification and screenshot archival.

2|Updated May 27, 2026
One-click install
npx skills add https://github.com/yekinya/moai-novel --skill moai-workflow-pencil-integration-yekinya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-workflow-pencil-integration
Source: https://github.com/yekinya/moai-novel/tree/main/moai-novel/.claude/skills/moai-workflow-pencil-integration
Command: npx skills add https://github.com/yekinya/moai-novel --skill moai-workflow-pencil-integration-yekinya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Automating wireframe creation in Pencil requires manually translating design plans into editor operations, verifying layouts, and archiving visual results. This Skill automates that pipeline by parsing a DSL-based plan file and driving the Pencil MCP server through verified batch execution. ## Core Features & Use Cases - DSL Plan Parsing: Parses pencil-plan.md containing I/M/R operations organized into batches, collecting all syntax errors before halting. - Verified Batch Execution: Splits large batches into 25-operation sub-batches, retries failed calls once, and runs snapshot_layout checks after every batch. - Screenshot Archival & Reporting: Saves timestamped PNG screenshots per batch, retains the 5 most recent, and writes a structured run summary report. - Use Case: During the /moai design Phase B2.6 workflow, when .pen files and pencil-plan.md exist in .moai/design/, this Skill executes the full wireframe build and produces an auditable run report before Phase B3 begins. ## Quick Start Run the /moai design workflow with a pencil-plan.md and a .pen file present in .moai/design/ so Phase B2.6 invokes this integration automatically.

Frequently Asked Questions about moai-workflow-pencil-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Pencil wireframe creation from a plan file?

Write batch operations in pencil-plan.md using the I(parentId, props), M(nodeId, parentId, index), and R(nodeId) DSL, grouped under ## Batch N headings. The Skill parses the file, executes each batch via mcp__pencil__batch_design, and verifies layouts automatically.

What preconditions trigger the Pencil MCP integration in the moai design workflow?

Phase B2.6 invokes the integration only when .moai/design/pencil-plan.md exists and at least one .pen file exists in .moai/design/ or the project root. If either condition fails, the phase skips gracefully and proceeds to Phase B3.

Why does Pencil batch execution fail with PENCIL_CONNECTION_FAILED?

This error occurs when mcp__pencil__get_editor_state reports a connection failure or the open document does not match the detected .pen file. Restart Claude Desktop or open the correct .pen file in Pencil, then retry.

How are large pencil-plan.md batches handled?

Batches exceeding 25 operations are split into sub-batches of at most 25 operations while preserving order. Sub-batches execute sequentially, each with its own batch_design call, layout snapshot check, and screenshot archival.

What happens when pencil-plan.md contains syntax errors?

The parser scans the entire file and collects every unrecognized token as {line_number, offending_text} entries rather than halting on the first error. It returns PENCIL_PLAN_SYNTAX_ERROR with the complete list so all issues can be fixed in one pass.