pencil-mcp-replace-all-matching-properties

$npx mdskill add partme-ai/full-stack-skills/pencil-mcp-replace-all-matching-properties

Batch replace style properties like colors and fonts across nodes in Pencil .pen files for global design updates.

  • Helps users globally swap colors, update fonts, migrate brand styles, or adjust spacing in Pencil designs.
  • Integrates with the Pencil MCP tool replace_all_matching_properties, which may be namespaced in some clients.
  • Activates only when the user explicitly mentions Pencil and the context involves design tasks, not code refactoring.
  • Executes via the MCP tool to process and apply changes across specified nodes in the .pen file.

SKILL.md

.github/skills/pencil-mcp-replace-all-matching-propertiesView on GitHub ↗
---
name: pencil-mcp-replace-all-matching-properties
description: "Batch replace matching style properties (colors, fonts, sizes) across nodes in a Pencil .pen file via the replace_all_matching_properties MCP tool. Use when the user explicitly mentions Pencil and needs to globally swap colors, update font families, migrate to a new brand style, or batch-adjust spacing across frames."
license: Complete terms in LICENSE.txt
---


## Tools

This skill is designed to call the Pencil MCP tool:

*   `replace_all_matching_properties`

If your client namespaces MCP tools, it may appear as `mcp__pencil__replace_all_matching_properties`.

## When to use this skill

### Intent Recognition (CRITICAL)
Even if a trigger phrase matches, you must **verify the user's intent**:
1.  Is the user explicitly asking to use "Pencil"?
2.  Is the current conversation context clearly about "Pencil" design tasks?

**If the answer is NO, do NOT use this skill.** (e.g., "Replace properties" might refer to refactoring code).

**CRITICAL PREREQUISITE:**
**You must ONLY use this skill when the user EXPLICITLY mentions "Pencil".**

**ALWAYS use this skill when:**
- You need to make **Global Changes** or **Batch Updates** **in Pencil**.
- The user asks to "Change all X to Y".
- You are refactoring styles (e.g., "Replace hex codes with variables").

**Trigger phrases include:**
- "Replace Pencil properties" (替换 Pencil 属性)
- "Change all colors in Pencil" (修改 Pencil 所有颜色)
- "Batch update Pencil fonts" (批量更新 Pencil 字体)
- "Pencil global style replace" (Pencil 全局样式替换)

## Input Parameters

*   **`filePath`** (string, optional).
*   **`parents`** (array, required): IDs of parent nodes to search within.
*   **`properties`** (array, required): List of replacement rules.
    *   Each rule defines the `property`, `match` (value to find), and `replace` (new value).

## How to use this skill

1.  **Define Rules**: "Find `fills: #FF0000`, Replace with `fills: #0000FF`".
2.  **Call Tool**: `replace_all_matching_properties(...)`.
3.  **Verify**: Call `get_screenshot` to verify the global change.

## Examples

### 1. Simple: Global Color Swap
Replace all instances of Red (#FF0000) with Blue (#0000FF) across the entire document.

```json
{
  "properties": [
    {
      "property": "fills",
      "from": { "color": "#FF0000" },
      "to": { "color": "#0000FF" }
    }
  ]
}
```

### 2. Medium: Local Font Update
Change the font family from "Arial" to "Roboto" only within the Footer section.

```json
{
  "parents": ["frame:footer"],
  "properties": [
    {
      "property": "fontFamily",
      "from": "Arial",
      "to": "Roboto"
    }
  ]
}
```

### 3. Complex: Batch Style Migration
Update multiple properties (color and font) simultaneously across several frames to migrate to a new brand style.

```json
{
  "parents": ["frame:home", "frame:profile"],
  "properties": [
    {
      "property": "fills",
      "from": { "color": "#OLD_COLOR" },
      "to": { "color": "#NEW_COLOR" }
    },
    {
      "property": "fontSize",
      "from": 12,
      "to": 14
    }
  ]
}
```

## Keywords

**English keywords:**
replace properties, batch update, global change, style refactor, bulk edit, theme switch

**Chinese keywords (中文关键词):**
替换属性, 批量更新, 全局修改, 样式重构, 批量编辑, 主题切换

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."