← 返回
内容创作 中文

Pencil Renderer

Render DNA codes to Pencil .pen frames. Does ONE thing well. Input: DNA code + component type (hero, card, form, etc.) Output: .pen frame ID + screenshot Use when: design-exploration or other orchestrators need to render visual proposals using Pencil MCP backend.
将DNA代码渲染为Pencil .pen框架,专注做好一件事。输入DNA代码与组件类型,输出框架ID及截图。适用于设计探索等需通过Pencil MCP后端渲染视觉提案的场景。
jcwen
内容创作 clawhub v0.1.2 1 版本 99883.4 Key: 无需
★ 0
Stars
📥 1,714
下载
💾 123
安装
1
版本
#latest

概述

Pencil Renderer

Translate aesthetic DNA codes into Pencil .pen frames via MCP.

Interface

Input:

  • DNA code: [layout, color, typography, motion, density, background]
  • Component type: hero | card | form | nav | footer | section | button | input
  • Optional: Name, dimensions, parent frame ID

Output:

  • Frame ID in .pen file
  • Screenshot of rendered frame

Workflow

1. Ensure Document Ready

// Check if editor open
mcp__pencil__get_editor_state({ include_schema: false })

// If no editor, open or create
mcp__pencil__open_document({ filePathOrTemplate: "new" })

2. Get Style Foundation

// 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] })

3. Translate DNA to Pencil Properties

Reference: references/dna-to-pencil.md

DNA axis → Pencil property mapping is deterministic.

Example: centered layout → alignItems: "center", symmetric padding

4. Execute Design Operations

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
  `
})

5. Capture Result

// Screenshot for visual verification
mcp__pencil__get_screenshot({ nodeId: "frameId" })

6. Return

Frame ID: [id]
DNA: [layout, color, typography, motion, density, background]

Plus screenshot image.

Component Templates

TypeStructure
-----------------
heroContainer + headline + subhead + CTA buttons
cardContainer + image area + content + actions
formContainer + labels + inputs + submit
navContainer + logo + links + actions
footerContainer + columns + links + legal
sectionContainer + heading + content grid
buttonFrame + text + icon slot
inputFrame + label + field + validation

DNA Translation Quick Reference

DNA AxisKey Pencil Properties
--------------------------------
Layout: centeredalignItems: "center", equal padding
Layout: asymmetricOffset positions, varied gaps
Layout: bentoGrid with varied spans
Color: darkDark fill, light foreground
Color: gradientfill: {type: "linear", stops: [...]}
Typography: display-heavyLarge heading sizes, high contrast
Typography: minimalRestrained scale, single family
Density: spaciousgap: 24-48, generous padding
Density: compactgap: 8-16, tight padding
Background: solidSingle fill color
Background: texturedG() for patterns/images

Constraints

  • Single concern: Render DNA → frame. No interview, no iteration.
  • Pencil MCP required: Fails fast if unavailable
  • Deterministic mapping: Same DNA always produces same structure
  • Composable: Called by orchestrators, not users directly

References

  • references/dna-to-pencil.md — Complete axis mapping
  • references/batch-design-patterns.md — Common operation sequences
  • aesthetic-system/references/dna-codes.md — DNA axis definitions

Integration

Called by:

  • design-exploration orchestrator (when Pencil backend available)

Composes:

  • aesthetic-system (for DNA interpretation)

版本历史

共 1 个版本

  • v0.1.2 当前
    2026-03-28 23:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,995
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,224
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,090