โ† All skills
Tencent SkillHub ยท Developer Tools

Pencil To Code

Export .pen design to React/Tailwind code. Does ONE thing well. Input: .pen frame ID or file path Output: React component code + Tailwind config Use when: design-exploration or user needs implementation code from a finalized Pencil design.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Export .pen design to React/Tailwind code. Does ONE thing well. Input: .pen frame ID or file path Output: React component code + Tailwind config Use when: design-exploration or user needs implementation code from a finalized Pencil design.

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, references/node-mapping.md

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
0.1.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 16 sections Open source page

Pencil to Code

Export Pencil .pen designs to production React/Tailwind code.

Interface

Input: Frame ID to export (or entire document) Target framework: React (default), Vue, HTML Optional: Component name, output path Output: React component(s) with Tailwind classes Tailwind theme configuration (from .pen variables) Optional: Screenshot comparison for validation

1. Read Design Structure

// Get full frame tree mcp__pencil__batch_get({ filePath: "<path>.pen", nodeIds: ["frameId"], readDepth: 10, resolveInstances: true, resolveVariables: true }) // Get design variables/theme mcp__pencil__get_variables({ filePath: "<path>.pen" })

2. Extract Design Tokens

Transform .pen variables โ†’ Tailwind theme: /* From .pen variables */ @theme { --color-primary: [from variables.colors.primary]; --color-background: [from variables.colors.background]; --font-sans: [from variables.fonts.body]; /* ... */ } Reference: references/token-extraction.md

3. Map Nodes to Components

.pen Node TypeReact Outputframe with layout<div className="flex ...">frame with childrenComponent with childrentext<p>, <h1-6>, or <span>ref (instance)Reusable componentrectangle<div> with fillellipse<div className="rounded-full">image<img> or fill: url() Reference: references/node-mapping.md

4. Generate Code

Component structure: // components/[ComponentName].tsx import { cn } from "@/lib/utils" interface [ComponentName]Props { className?: string // Extracted props from design } export function [ComponentName]({ className, ...props }: [ComponentName]Props) { return ( <div className={cn("[tailwind classes]", className)}> {/* Nested structure */} </div> ) } Tailwind mapping: .pen property โ†’ Tailwind class -------------------------------- fill: #000 โ†’ bg-black layout: horizontal โ†’ flex flex-row gap: 16 โ†’ gap-4 padding: [16,24,16,24] โ†’ py-4 px-6 fontSize: 24 โ†’ text-2xl fontWeight: 700 โ†’ font-bold cornerRadius: [8,8,8,8] โ†’ rounded-lg

5. Validate (Optional)

// Screenshot the .pen frame mcp__pencil__get_screenshot({ nodeId: "frameId" }) // Compare visually with rendered React // (Manual step or browser automation)

6. Output

  • ## Generated Components
  • ### [ComponentName]
  • File: `components/[ComponentName].tsx`
  • Props: [list extracted props]
  • ### Theme Configuration
  • File: `app/globals.css` (additions)
  • ## Verification
  • Screenshot comparison: [attached]

Layout System

.pen Tailwind -------------------------------------- layout: "vertical" โ†’ flex flex-col layout: "horizontal" โ†’ flex flex-row layout: "grid" โ†’ grid alignItems: "center" โ†’ items-center justifyContent: "center" โ†’ justify-center gap: 8 โ†’ gap-2 gap: 16 โ†’ gap-4 gap: 24 โ†’ gap-6 width: "fill_container" โ†’ w-full height: "fill_container" โ†’ h-full

Spacing (8-point grid)

.pen padding Tailwind ---------------------------------------- [8,8,8,8] โ†’ p-2 [16,16,16,16] โ†’ p-4 [16,24,16,24] โ†’ py-4 px-6 [24,32,24,32] โ†’ py-6 px-8

Typography

.pen Tailwind ---------------------------------------- fontSize: 12 โ†’ text-xs fontSize: 14 โ†’ text-sm fontSize: 16 โ†’ text-base fontSize: 20 โ†’ text-xl fontSize: 24 โ†’ text-2xl fontSize: 32 โ†’ text-3xl fontSize: 48 โ†’ text-5xl fontWeight: 400 โ†’ font-normal fontWeight: 500 โ†’ font-medium fontWeight: 600 โ†’ font-semibold fontWeight: 700 โ†’ font-bold

Colors

.pen Tailwind ---------------------------------------- fill: "#FFFFFF" โ†’ bg-white fill: "#000000" โ†’ bg-black fill: variable โ†’ bg-[var(--color-name)] textColor: "#6B7280" โ†’ text-gray-500 stroke: "#E5E5E5" โ†’ border-gray-200

Border Radius

.pen cornerRadius Tailwind ---------------------------------------- [0,0,0,0] โ†’ rounded-none [4,4,4,4] โ†’ rounded [8,8,8,8] โ†’ rounded-lg [16,16,16,16] โ†’ rounded-2xl [9999,9999,9999,9999] โ†’ rounded-full

Constraints

Single concern: Export โ†’ code. No design modifications. Tailwind 4 @theme: CSS-first token system React + TypeScript: Default output target Semantic HTML: Choose appropriate elements Accessibility: Include aria attributes where detectable

References

references/node-mapping.md โ€” Complete node โ†’ component mapping references/token-extraction.md โ€” Variable โ†’ theme extraction design-tokens/ โ€” Token system conventions

Integration

Called by: design-exploration orchestrator (after direction selection) Direct user invocation Composes: design-tokens (for theme structure)

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
2 Docs
  • SKILL.md Primary doc
  • references/node-mapping.md Docs