Communitygithub.com

Penpot 设计技能

通过 MCP 在 Penpot 中设计 UI,遵循组件规范、flex 对齐、由外而内的构建顺序、原型/设计模式,并可基于用户反馈可选地更新技能。适用于 Penpot 原型、高保真设计、Penpot MCP 工作,或在 Penpot 中重构组件/变体。

Penpot 设计技能 是什么?

该技能为 AI 开发代理提供在 Penpot 中通过 MCP 执行 UI 设计的结构化能力。它强制执行一种系统化的方法:在进行任何写入之前,代理必须检查模式(原型或设计)、收集指令并确认平台。核心规则包括组件化(将重复元素转化为组件/实例,使用变体处理不同状态)、基于 flex/grid 的布局(采用 8dp 缩放比例和 Material 设计对齐),以及由外而内的构建顺序(先容器,再子外壳,然后逐层深入)。该技能支持从低保真验证(原型模式)到高保真实现(设计模式,使用设计令牌和状态)的渐进式细化过程。它还与一个完整的工具链集成——引用外部文档(如 `material-alignment.md`、`build-order.md` 和 `penpot-api.md`)——并允许通过用户反馈进行扩展:如果通用规则对项目有益,代理可以建议将其添加到技能中,然后技能可以重新安装以包含新规则。这确保了设计工作流程的一致性,并可在 Cursor、Claude Code 和其他支持 MCP 的平台上重复使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cucoreanu/personal-skills/tree/HEAD/skills/penpot-design

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Penpot 设计

仅限 Penpot MCP — 除非被要求,否则不要并行使用 HTML/CSS。在写入之前,先阅读 high_level_overview 一次;然后检查目标页面(shapeStructure、组件/设计令牌)。

先询问

  1. 模式: mockup(原型)还是 design(设计)?
  2. 指令: 要构建/更改的内容。仅当被问及时才提供多变体替代方案。
  3. 平台: 如果项目规则已设置,则使用项目规则;否则询问。切勿假设为 iOS/Android/Web。

缺少任何一项时停止。

模式

原型 — 低保真验证:结构、层次、流程;简单的填充、真实的间距;除非被要求,否则不进行打磨。

设计 — 更高保真度:设计令牌、排版、状态、界面框架。遵循相同的组件/flex 规则。优先选择分组 → 组件化 → 细化,而不是重建。

规则

组件: 出现两次 → 组件/实例。相同基础,不同状态 → 变体(Active、State、Size……)。在主组件上构建结构;在副本上进行覆盖;仅使用 detach() 进行分支。命名:Toolbar/Button;图层:background、icon、label(在变体间保持一致)。深度 ≤ 4;主组件内不能有主组件。

布局: flex/grid;如果存在子元素,使用 penpotUtils.addFlexLayout。间距:8dp 比例(4 为半步)。控件:请参考 material-alignment.md。激活状态 = 变体/样式,而非布局偏移。Z 顺序:背景 → 内容 → 覆盖层。

构建树: 仅由外而内 — 容器(空 + flex)→ 其直接子元素外壳(按 Z 顺序)→ 递归进入每个子元素的内部元素。切勿包装现有的叶子节点。详情请见 build-order.md。

流程: 库:设计令牌 → 原子组件 → 变体。然后使用构建树组装画面。对于已存在的工作:分组 → createComponent → 用实例替换重复项。使用 export_shape 进行验证。在大型重写之前先进行规划。

API: penpot-api.md。深入:仓库 research/penpot-design-practices.md。

可扩展性

如果反馈可能成为通用的 Penpot 规则(而非项目特定规则),请询问:"我们完成后是否将其添加到 penpot-design 中?"

  • 是: 在任务期间记录措辞;任务完成后编辑 personal-skills/skills/penpot-design/;重新安装:
    npx skills add cucoreanu/personal-skills --skill penpot-design
    
    然后确认更改了什么。
  • 否: 仅限本次会话。除非用户现在要求,否则切勿在任务中途编辑技能。

完成检查

  • 模式、指令、平台(如果需要)已确认
  • 重复项是组件;不同状态是变体
  • Flex/grid + Material 启发式控件对齐
  • 画布由外而内构建(容器 → 子外壳 → 嵌套元素)
  • 原型模式低保真 / 设计模式高保真;已检查导出

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

cucoreanu/personal-skills

Interviews the user one decision at a time about adapting an existing iPhone app to iPhone Duo and writes an adaptation decision record only after they confirm a shared understanding. Use when the user is designing or adapting an app for iPhone Duo, a folding iPhone, outer and inner displays, or side-placed controls.

cucoreanu/personal-skills

Monitor one GitHub PR for new review feedback, implement only meaningful fixes, and answer reviewers with evidence, friendly wit, and pushback on unrealistic or overly defensive comments. Use when the user asks to babysit, watch, or monitor Codex/reviewer comments on a PR.

cucoreanu/personal-skills

Agent-only. After the user asks to create a PR for a new or updated skill under skills/ (never this skill), check project install vs source with scripts/diff-install.mjs; if missing or stale, ask to install locally via relative symlinks. Use when authoring or changing skills in this repo, opening a skill PR, or finishing skill work.

cucoreanu/personal-skills

Plans and builds UI mockups in Penpot with user-centered workflow, fidelity levels, a six-step process, and outside-in canvas assembly. Use when creating mockups, screen mockups, wireframe-to-mockup work, low/high-fidelity UI, platform-specific layouts, or mockup design best practices in Penpot.

cucoreanu/personal-skills

Creates and reschedules macOS Reminders (fast nudges) and private Calendar events (time blocks). Attaches user-provided files to Calendar events the same way Calendar.app does. Default schedule: next free day starting tomorrow unless the user names an exact time. Never shares calendars or invites to anyone. Use when the user says \"remind me\", \"add a reminder\", \"move reminder\", \"reschedule reminder\", \"push that reminder to\", \"put this on my calendar\", \"schedule this\", \"block time\", \"don't let me forget\", or asks to attach an image/file to a reminder event.

cucoreanu/personal-skills

Proofreads messages and teaches reusable writing patterns. Use when the user pastes a work message, Slack draft, status update, or asks for proofreading, tone, clarity, grammar, flow, or constructive feedback on writing they will send at work.

相关技能