pencil-renderer by phrazzld/claude-config
npx skills add https://github.com/phrazzld/claude-config --skill pencil-renderer通过 MCP 将美学 DNA 代码转换为 Pencil .pen 帧。
输入:
[布局, 颜色, 排版, 动效, 密度, 背景]hero | card | form | nav | footer | section | button | input输出:
// 检查编辑器是否打开
mcp__pencil__get_editor_state({ include_schema: false })
// 如果没有编辑器,则打开或创建
mcp__pencil__open_document({ filePathOrTemplate: "new" })
// 获取可用的样式指南标签
mcp__pencil__get_style_guide_tags()
// 获取与 DNA 情绪匹配的样式指南
// 将 DNA 映射到相关标签:
// - 深色 → ["dark-mode", "moody"]
// - 浅色 → ["light", "clean"]
// - 宽松密度 → ["airy", "whitespace"]
// 等等。
mcp__pencil__get_style_guide({ tags: [mapped_tags] })
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
参考:references/dna-to-pencil.md
DNA 轴 → Pencil 属性映射是确定性的。例如:centered 布局 → alignItems: "center",对称内边距
参考:references/batch-design-patterns.md
mcp__pencil__batch_design({
filePath: "<path>.pen",
operations: `
frame=I(document, {type: "frame", name: "Hero-Brutalist", ...properties})
heading=I(frame, {type: "text", content: "Headline", ...typography})
// ... 其他操作
`
})
// 截图用于视觉验证
mcp__pencil__get_screenshot({ nodeId: "frameId" })
帧 ID: [id]
DNA: [布局, 颜色, 排版, 动效, 密度, 背景]
加上截图图像。
| 类型 | 结构 |
|---|---|
hero | 容器 + 主标题 + 副标题 + 行动号召按钮 |
card | 容器 + 图片区域 + 内容 + 操作 |
form | 容器 + 标签 + 输入框 + 提交 |
nav | 容器 + 标志 + 链接 + 操作 |
footer | 容器 + 列 + 链接 + 法律信息 |
section | 容器 + 标题 + 内容网格 |
button | 帧 + 文本 + 图标槽位 |
input | 帧 + 标签 + 字段 + 验证 |
| DNA 轴 | 关键 Pencil 属性 |
|---|---|
| 布局: 居中 | alignItems: "center",等距内边距 |
| 布局: 非对称 | 偏移位置,变化的间距 |
| 布局: 便当盒 | 具有不同跨度的网格 |
| 颜色: 深色 | 深色填充,浅色前景 |
| 颜色: 渐变 | fill: {type: "linear", stops: [...]} |
| 排版: 展示-粗重 | 大标题尺寸,高对比度 |
| 排版: 极简 | 克制的比例,单一字体族 |
| 密度: 宽松 | gap: 24-48,充足的内边距 |
| 密度: 紧凑 | gap: 8-16,紧密的内边距 |
| 背景: 纯色 | 单一填充颜色 |
| 背景: 纹理 | G() 用于图案/图像 |
references/dna-to-pencil.md — 完整的轴映射references/batch-design-patterns.md — 常见操作序列aesthetic-system/references/dna-codes.md — DNA 轴定义由以下调用:
design-exploration 编排器(当 Pencil 后端可用时)组合:
aesthetic-system(用于 DNA 解释)每周安装数
111
仓库
GitHub 星标数
5
首次出现
2026年1月26日
安全审计
安装于
opencode98
codex97
gemini-cli91
claude-code89
cursor75
github-copilot72
Translate aesthetic DNA codes into Pencil .pen frames via MCP.
Input:
[layout, color, typography, motion, density, background]hero | card | form | nav | footer | section | button | inputOutput:
// Check if editor open
mcp__pencil__get_editor_state({ include_schema: false })
// If no editor, open or create
mcp__pencil__open_document({ filePathOrTemplate: "new" })
// Get available style guide tags
mcp__pencil__get_style_guide_tags()
// Get style guide matching DNA mood
// Map DNA to relevant tags:
// - dark color → ["dark-mode", "moody"]
// - light color → ["light", "clean"]
// - spacious density → ["airy", "whitespace"]
// etc.
mcp__pencil__get_style_guide({ tags: [mapped_tags] })
Reference: references/dna-to-pencil.md
DNA axis → Pencil property mapping is deterministic. Example: centered layout → alignItems: "center", symmetric padding
Reference: references/batch-design-patterns.md
mcp__pencil__batch_design({
filePath: "<path>.pen",
operations: `
frame=I(document, {type: "frame", name: "Hero-Brutalist", ...properties})
heading=I(frame, {type: "text", content: "Headline", ...typography})
// ... additional operations
`
})
// Screenshot for visual verification
mcp__pencil__get_screenshot({ nodeId: "frameId" })
Frame ID: [id]
DNA: [layout, color, typography, motion, density, background]
Plus screenshot image.
| Type | Structure |
|---|---|
hero | Container + headline + subhead + CTA buttons |
card | Container + image area + content + actions |
form | Container + labels + inputs + submit |
nav | Container + logo + links + actions |
footer | Container + columns + links + legal |
section | Container + heading + content grid |
| DNA Axis | Key Pencil Properties |
|---|---|
| Layout: centered | alignItems: "center", equal padding |
| Layout: asymmetric | Offset positions, varied gaps |
| Layout: bento | Grid with varied spans |
| Color: dark | Dark fill, light foreground |
| Color: gradient | fill: {type: "linear", stops: [...]} |
| Typography: display-heavy | Large heading sizes, high contrast |
| Typography: minimal | Restrained scale, single family |
| Density: spacious | gap: 24-48, generous padding |
| Density: compact | gap: 8-16, tight padding |
| Background: solid | Single fill color |
| Background: textured |
references/dna-to-pencil.md — Complete axis mappingreferences/batch-design-patterns.md — Common operation sequencesaesthetic-system/references/dna-codes.md — DNA axis definitionsCalled by:
design-exploration orchestrator (when Pencil backend available)Composes:
aesthetic-system (for DNA interpretation)Weekly Installs
111
Repository
GitHub Stars
5
First Seen
Jan 26, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode98
codex97
gemini-cli91
claude-code89
cursor75
github-copilot72
shadcn/ui 框架:React 组件库与 UI 设计系统,Tailwind CSS 最佳实践
69,400 周安装
button | Frame + text + icon slot |
input | Frame + label + field + validation |
| G() for patterns/images |