# Send Pencil To Code to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
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

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "pencil-to-code",
    "name": "Pencil To Code",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Jcwen/pencil-to-code",
    "canonicalUrl": "https://clawhub.ai/Jcwen/pencil-to-code",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/pencil-to-code",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pencil-to-code",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/node-mapping.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "pencil-to-code",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T00:35:49.662Z",
      "expiresAt": "2026-05-14T00:35:49.662Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pencil-to-code",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=pencil-to-code",
        "contentDisposition": "attachment; filename=\"pencil-to-code-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "pencil-to-code"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/pencil-to-code"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/pencil-to-code",
    "downloadUrl": "https://openagent3.xyz/downloads/pencil-to-code",
    "agentUrl": "https://openagent3.xyz/skills/pencil-to-code/agent",
    "manifestUrl": "https://openagent3.xyz/skills/pencil-to-code/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/pencil-to-code/agent.md"
  }
}
```
## Documentation

### 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)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Jcwen
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T00:35:49.662Z
- Expires at: 2026-05-14T00:35:49.662Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/pencil-to-code)
- [Send to Agent page](https://openagent3.xyz/skills/pencil-to-code/agent)
- [JSON manifest](https://openagent3.xyz/skills/pencil-to-code/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/pencil-to-code/agent.md)
- [Download page](https://openagent3.xyz/downloads/pencil-to-code)