pencil-design
БесплатноБез исполняемых скриптовНе проверенDesign UIs in Pencil (.pen files) and generate production code from them. Use when working with .pen files, designing screens or components in Pencil, or…
от chiroro-jr★ 19 звёзд на GitHubОб этом скилле
Pencil Design Skill
Design production-quality UIs in Pencil and generate clean, maintainable code from them. This skill enforces best practices for design system reuse, variable usage, layout correctness, visual verification, and design-to-code workflows.
When to Use This Skill
- Designing screens, pages, or components in a
.penfile - Generating code (React, Next.js, Vue, Svelte, HTML/CSS) from Pencil designs
- Building or extending a design system in Pencil
- Syncing design tokens between Pencil and code (Tailwind v4
@theme, shadcn/ui tokens) - Importing existing code into Pencil designs
- Working with any Pencil MCP tools (
pencil_batch_design,pencil_batch_get, etc.)
Critical Rules
These rules address the most common agent mistakes. Violating them produces designs that are inconsistent, hard to maintain, and generate poor code.
Rule 1: Always Reuse Design System Components
NEVER recreate a component from scratch when one already exists in the design file.
Before inserting any element, you MUST:
- Call
pencil_batch_getwithpatterns: [{ reusable: true }]to list all available reusable components - Search the results for a component that matches what you need (button, card, input, nav, etc.)
- If a match exists, insert it as a
refinstance usingI(parent, { type: "ref", ref: "<componentId>" }) - Customize the instance by updating its descendants with
U(instanceId + "/childId", { ... }) - Only create a new component from scratch if no suitable reusable component exists
See references/design-system-components.md for detailed workflow.
Rule 2: Always Use Variables Instead of Hardcoded Values
NEVER hardcode colors, border radius, spacing, or typography values when variables exist.
Before applying any style value, you MUST:
- Call
pencil_get_variablesto read all defined design tokens - Map your intended values to existing variables (e.g., use
primarynot#3b82f6, useradius-mdnot6) - Apply values using variable references, not raw values
- When generating code, use Tailwind v4 semantic utility classes (e.g.,
bg-primary,text-foreground,rounded-md). NEVER use arbitrary value syntax (bg-[#3b82f6],text-[var(--primary)],rounded-[6px])
See references/variables-and-tokens.md for detailed workflow.
Rule 3: Prevent Text and Content Overflow
NEVER allow text or child elements to overflow their parent or the artboard.
For every text element and container:
- Set appropriate text wrapping and truncation
- Constrain widths to parent bounds, especially on mobile screens (typically 375px wide)
- Use
"fill_container"for width on text elements inside auto-layout frames - After inserting content, call
pencil_snapshot_layoutwithproblemsOnly: trueto detect clipping/overflow - Fix any reported issues before proceeding
See references/layout-and-text-overflow.md for detailed workflow.
Rule 4: Visually Verify Every Section
NEVER skip visual verification after building a section or screen.
After completing each logical section (header, hero, sidebar, form, card grid, etc.):
- Call
pencil_get_screenshoton the section or full screen node - Analyze the screenshot for: alignment issues, spacing inconsistencies, text overflow, visual glitches, missing content
- Call
pencil_snapshot_layoutwithproblemsOnly: trueto catch clipping and overlap - Fix any issues found before moving to the next section
- Take a final full-screen screenshot when the entire design is complete
See references/visual-verification.md for detailed workflow.
Rule 5: Reuse Existing Assets (Logos, Icons, Images)
NEVER generate a new logo or duplicate asset when one already exists in the document.
Before generating any image or logo:
- Call
pencil_batch_getand search for existing image/logo nodes by name pattern (e.g.,patterns: [{ name: "logo|brand|icon" }]) - If a matching asset exists elsewhere in the document (another artboard/screen), copy it using the
C()(Copy) operation - Only use the
G()(Generate) operation for genuinely new images that don't exist anywhere in the document - For logos specifically: always copy from an existing instance, never regenerate
See references/asset-reuse.md for detailed workflow.
Rule 6: Always Load the frontend-design Skill
NEVER design in Pencil or generate code from Pencil without first loading the frontend-design skill.
The frontend-design skill provides the aesthetic direction and design quality standards that prevent generic, cookie-cutter UI. You MUST:
- Load the
frontend-designskill at the start of any Pencil design or code generation task - Follow its design thinking process: understand purpose, commit to a bold aesthetic direction, consider differentiation
Установить pencil-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pencil-design?
Design UIs in Pencil (.pen files) and generate production code from them. Use when working with .pen files, designing screens or components in Pencil, or generating code from Pencil designs. Triggers on tasks involving Pencil, .pen files, design-to-code workflows, or UI design with the Pencil MCP tools.
Как установить скилл pencil-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pencil-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic