Borrowing it
Nothing to install: this file belongs to bybren-llc/safe-agentic-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bybren-llc/safe-agentic-workflow/main/.gemini/commands/media/sketch-to-code.tomlgit clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/bybren-llc/safe-agentic-workflow/sketch-to-code)<a href="https://agentmods.dev/commands/bybren-llc/safe-agentic-workflow/sketch-to-code"><img src="https://agentmods.dev/badge/commands/bybren-llc/safe-agentic-workflow/sketch-to-code/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/bybren-llc/safe-agentic-workflow/sketch-to-code"><img src="https://agentmods.dev/badge/commands/bybren-llc/safe-agentic-workflow/sketch-to-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00748 |
| Opus 5.5 | $0.00000 | $0.00299 |
| Sonnet 5.5 | $0.00000 | $0.00150 |
| Haiku 4.5 | $0.00000 | $0.00075 |
Grade A, and why
sketch-to-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
2 near-identical copies found in the catalogue:
- sketch-to-code — 100% identical, 0 lines differ
- sketch-to-code — 92% identical, 16 lines differ
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
description = "Generate code from UI sketches, wireframes, or mockups"
prompt = """
Sketch to Code Command
Transform hand-drawn sketches, wireframes, or UI mockups into functional code using Gemini's multimodal vision.
Input: {{args}}
Supported Input Types
- Hand-drawn sketches (paper, whiteboard photos)
- Digital wireframes
- UI mockups (Figma screenshots, etc.)
- Flowcharts and diagrams
- Architecture diagrams
Workflow
1. Analyze the Visual Input
Read and understand the sketch/mockup:
!{ls -la {{args}} 2>/dev/null || echo "File not found"}
Identify:
- UI components (buttons, inputs, cards, navigation)
- Layout structure (grid, flex, sections)
- Visual hierarchy
- Interactive elements
- Data flow (if flowchart)
2. Determine Output Framework
Ask user or detect from project context:
- React (with hooks, TypeScript optional)
- Next.js (App Router)
- Vue (Composition API)
- HTML/CSS (vanilla)
- Tailwind CSS (styling)
- shadcn/ui (component library)
Check project for existing framework:
!{cat package.json 2>/dev/null | grep -E '"react"|"next"|"vue"' | head -3 || echo "No package.json found"}
3. Generate Code
Based on sketch analysis, generate:
Component Structure:
ComponentName/
├── index.tsx # Main component
├── styles.css # Styles (if not Tailwind)
└── types.ts # TypeScript interfaces
Code Output:
- Semantic HTML structure
- Responsive layout (mobile-first)
- Accessibility attributes (ARIA)
- Placeholder content matching sketch
- Interactive states (hover, focus, active)
4. Output Location
Save generated code to appropriate location:
!{ls -d src/components 2>/dev/null || ls -d components 2>/dev/null || echo "./"}
Usage Examples
# From hand-drawn sketch
/media:sketch-to-code ./whiteboard-photo.jpg
# From Figma screenshot
/media:sketch-to-code ~/Downloads/figma-export.png
# From wireframe with framework hint
/media:sketch-to-code ./wireframe.png --react --tailwind
# From architecture diagram
/media:sketch-to-code ./system-diagram.png --mermaid
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 119 lines · 0 tokens per session scan A 96f82602d770
sketch-to-code is a command published in the GitHub repository bybren-llc/safe-agentic-workflow (425 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 748 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
init-brand-tokens
Generate OKLCH design tokens with WCAG validation, shadcn/ui integration, and Tailwind v4 theming via 8 customization questions.
ux-recommend
The v2 flagship. Runs the 5-parallel-search Python engine across 11 data manifests (75+ styles, 170+ palettes, 65+ type pairs, 120+ components, 170+ industries, 110+ UX laws, 50+ motion presets, 120+ anti-patterns, 92 brand specs) and returns a complete recommended design system for your project — with always-on…
color-specialist
Use when colour is failing. Contrast below AA, a palette with no system behind it, dark mode that is only inverted light mode, or semantic colours that carry no meaning.
bolder
Read and follow the instructions in agents/skills/bolder.md. Also read and follow agents/frontend-design/design-all.md and any referenced files in agents/frontend-design/reference/ as needed.
colorize
Introduce or rework color strategy.
extract
Pull repeated patterns into reusable components and design tokens.