pencil-skill-creator

$npx mdskill add partme-ai/full-stack-skills/pencil-skill-creator

Creates new Pencil UI design system skills for integrating frameworks like Ant Design or Bootstrap.

  • Helps add support for new design systems to the Pencil ecosystem.
  • Integrates with Pencil MCP tools for setting variables and batch designing.
  • Triggers when users mention Pencil and a specific design system.
  • Outputs a PENCIL_PLAN for the agent to execute without direct action.

SKILL.md

.github/skills/pencil-skill-creatorView on GitHub ↗
---
name: pencil-skill-creator
description: Factory skill for creating new pencil-ui-design-system-* skills. Use when you need to add support for a new design system layui antd bootstrap element uview uviewpro vant ucharts echarts etc. to the Pencil ecosystem.
license: Complete terms in LICENSE.txt
---


# Pencil Skill Creator

This skill guides the creation of new **pencil-ui-design-system-* skills**. Each skill initializes a design system in Pencil (variables + component overview frames) via PENCIL_PLAN.

## Core Philosophy

All design-system skills created by this creator **MUST** adhere to:

1. **Trigger**: The skill triggers when the user explicitly mentions Pencil and the target design system (e.g. "init layui design system with Pencil").
2. **Action-level plan**: Output a PENCIL_PLAN (Step 1: set_variables; Step 2: batch_design component overview). Do not execute; output the plan for the Agent to call Pencil MCP tools.
3. **Self-contained**: The skill encapsulates design tokens (colors, typography, radius) and component categories from the official design system docs.

## Workflow (Progressive Disclosure)

Keep this file concise. Use bundled references when you need full details:

- Workflow: `references/workflows.md`
- Output patterns: `references/output-patterns.md`

## Quick start (Automated Creation)

### Option A: Automated Creation (Recommended)

Use the bundled script to automatically generate the skill structure, `SKILL.md` (with Golden Template), and `references/` placeholders.

```bash
# Usage: ./scripts/init_pencil_design_system_skill.py <name> --path <skills-directory>
./scripts/init_pencil_design_system_skill.py layui --path skills/
```

This will:

1. Create `skills/pencil-ui-design-system-layui`.
2. Populate `SKILL.md` with the required structure (When to use, Step 1 Variables, Step 2 Component overview).
3. Create `references/contract.md`, `references/official.md`, `references/examples.md` placeholders.
4. Copy `LICENSE.txt` from an existing skill.

### Option B: Manual Creation

Follow: `references/workflows.md` -> Manual creation.

### Step 1: Define the design system

Identify the framework and name the skill: `pencil-ui-design-system-<name>` (kebab-case).

- Example: "layui" -> `pencil-ui-design-system-layui`
- Example: "uview pro" -> `pencil-ui-design-system-uviewpro`

### Step 2: Create directory structure

```bash
mkdir -p skills/pencil-ui-design-system-<name>/references
```

### Step 3: Write `SKILL.md` (Golden Template)

You **MUST** use the following template structure for the new skill:

- **Frontmatter**: `name: pencil-ui-design-system-{{name}}`, description containing "初始化 {{design_system}}: design system components".
- **Constraint**: Only use when user explicitly mentions Pencil or design system initialization.
- **When to use**: Trigger keywords (e.g. layui, antd).
- **Step 1: Variables**: Table of variables for `set_variables` (colors, fonts, radius). Follow .pen schema.
- **Step 2: Component overview**: List of frames/categories to create via `batch_design` (component categories and component names per category).
- **Best practices**: Verify tokens against official docs; use `replace: false` unless full reset; use Auto Layout for frames.
- **Keywords**: pencil, design system, init, <framework-name>.

### Step 4: Fill references

- `references/contract.md`: Design tokens and component contracts (prefix, naming).
- `references/official.md`: Link to official documentation.
- `references/examples.md`: Example PENCIL_PLAN or usage.

## Integration with Pencil path

This skill is part of the **Pencil specification flow**:

1. **PRD** -> **pencil-ui-design-spec-generator** outputs PENCIL_PLAN.
2. **pencil-ui-design-system-*** skills output the concrete variables + component structure for a given design system.
3. Agent calls Pencil MCP tools (`open_document`, `set_variables`, `batch_design`, `get_screenshot`) in order.

## Naming validation

Script enforces: `pencil-ui-design-system-[a-z0-9]+(-[a-z0-9]+)*`.

More from partme-ai/full-stack-skills

SkillDescription
adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."