figma-to-code
This skill handles pixel-perfect Figma design conversion to production code (React/Tailwind, SwiftUI, Vue, Kotlin) using Pixelbyte Figma MCP Server. It should be used when a Figma URL or design selection needs to be converted to production-ready code. The skill employs a 5-phase workflow with framework detection and routing to framework-specific agents.
What this skill does
# Figma-to-Code Pixel-Perfect Conversion
## Documentation Index
For detailed references, load via Glob: `**/docs-index.md`
## CRITICAL: Agent Invocation Required
**DO NOT use MCP tools directly.** This skill orchestrates specialized agents via `Task` tool.
```
+-------------------------------------------------------------------+
| YOU MUST USE Task TOOL TO INVOKE AGENTS |
| |
| WRONG: Calling mcp__pixelbyte-figma-mcp__* directly |
| RIGHT: Task(subagent_type="pb-figma:design-validator", ...) |
+-------------------------------------------------------------------+
```
## Agent Pipeline
```
Figma URL
|
v
+-------------------------+
| 1. design-validator | -> Validation Report
+-------------------------+
|
v
+-------------------------+
| 2. design-analyst | -> Implementation Spec
+-------------------------+
|
+---> [PARALLEL] --------+
| |
v v
+-------------------+ +-------------------+
| 3a. asset-manager | | 3b. font-manager | (background, haiku)
| (haiku/opus*) | +-------------------+
+-------------------+
* haiku if no flagged frames, opus if flagged frames exist
|
v
+---------------------------------------------+
| 4. Framework Detection & Routing |
+---------------------------------------------+
| -> React/Next.js -> code-generator-react | โ
| -> SwiftUI -> code-generator-swiftui | โ
| -> Vue/Nuxt -> code-generator-vue | ๐ง Placeholder
| -> Kotlin/Compose -> code-generator-kotlin | ๐ง Placeholder
+---------------------------------------------+
| Fan-Out: >3 components โ parallel batches |
+---------------------------------------------+
|
v
+-------------------------------+
| 5a. compliance-pre-check | -> Static + A11y (haiku)
+-------------------------------+
| (if PASS/WARN)
v
+-------------------------------+
| 5b. compliance-checker | -> Gate 2+3 + Final Report (opus)
+-------------------------------+
```
## Invocation Sequence
```python
# Step 1: Design Validator
Task(subagent_type="pb-figma:design-validator",
prompt="Validate Figma URL: {url}")
# Step 2: Design Analyst (MANDATORY - creates Implementation Spec)
Task(subagent_type="pb-figma:design-analyst",
prompt="Create Implementation Spec from: docs/figma-reports/{file_key}-validation.md")
# Step 3: Asset Manager + Font Manager (PARALLEL)
# Launch BOTH in a single message with multiple Task calls.
#
# ASSET MANAGER MODEL SELECTION:
# Before invoking, read the spec and check for "Flagged for LLM Review" section.
# - If NO flagged frames (section absent or empty) โ use model="haiku" (all tasks are mechanical)
# - If flagged frames exist โ do NOT set model (defaults to opus for LLM Vision analysis)
#
# Check: Grep("## Flagged for LLM Review", path="docs/figma-reports/{file_key}-spec.md")
# Option A: No flagged frames (common case ~80% of designs)
Task(subagent_type="pb-figma:asset-manager",
model="haiku",
prompt="Download assets from spec: docs/figma-reports/{file_key}-spec.md")
# Option B: Flagged frames exist (complex designs with ambiguous elements)
Task(subagent_type="pb-figma:asset-manager",
model="opus",
prompt="Download assets from spec: docs/figma-reports/{file_key}-spec.md")
# Font Manager always runs on haiku (100% mechanical, defined in agent header)
Task(subagent_type="pb-figma:font-manager",
prompt="Detect and setup fonts from spec: docs/figma-reports/{file_key}-spec.md",
run_in_background=True)
# Step 4: Code Generator (after asset-manager completes; font-manager continues in background)
## Component Count Check
# Read the spec's Component Hierarchy to count top-level components.
## Option A: Sequential (โค3 components)
Task(subagent_type="pb-figma:code-generator-{framework}",
prompt="Generate code from spec: docs/figma-reports/{file_key}-spec.md")
## Option B: Fan-Out (>3 components)
### Batching Algorithm (dependency-aware)
# 1. **Parse Component Hierarchy** from spec โ extract parent-child tree
# 2. **Identify leaf components** โ components with no children (e.g., Button, Badge, Icon)
# 3. **Identify composite components** โ components that reference other components as children
# 4. **Group by subtree** โ keep each parent with its direct children in the same batch
# 5. **Distribute leaf components** โ fill remaining batch slots with independent leaf components
# 6. **Target batch size: 4** โ aim for ~4 components per batch, but never split a parent from its children
### Batching Rules
# - A parent and ALL its direct children MUST be in the same batch
# - Leaf components (no children, not referenced by others) can go in any batch
# - If a subtree has >4 components, it gets its own batch (no size limit for subtrees)
# - Shared utility components (used by 2+ parents) go in the FIRST batch
### Example
# Hierarchy:
# PageLayout
# โโโ Header (uses Logo, NavMenu)
# โโโ CardGrid (uses Card, Badge)
# โโโ Footer
#
# Batching:
# Batch 1: [Logo, NavMenu, Header] โ subtree
# Batch 2: [Badge, Card, CardGrid] โ subtree
# Batch 3: [Footer, PageLayout] โ root + leaf
### Execution
for batch in dependency_aware_batches:
Task(subagent_type="pb-figma:code-generator-{framework}",
prompt=f"Generate ONLY these components: {batch}. "
f"Read full spec for context: docs/figma-reports/{file_key}-spec.md")
# > **Important:** Each batch reads the FULL spec for shared context (tokens, assets).
# > Only component generation is scoped to the batch.
# Step 5a: Compliance Pre-Check (runs on haiku - mechanical checks only)
# Static checks (structure, tokens, assets) + Gate 1 (Accessibility)
# All checks are threshold-based, regex-based, or formula-based โ zero quality loss on haiku
Task(subagent_type="pb-figma:compliance-pre-check",
prompt="Run static compliance checks and accessibility gate on: docs/figma-reports/{file_key}-spec.md")
# Step 5b: Full Compliance Checker (runs on opus - visual validation)
# Only invoke if pre-check passed (PRE_CHECK_PASS or PRE_CHECK_WARN)
# Check: Read(".qa/pre-check-results.json") โ if status != "PRE_CHECK_FAIL"
#
# If PRE_CHECK_FAIL โ pipeline stops here, no need for expensive visual validation
# If PRE_CHECK_PASS/WARN โ proceed to Gate 2 (Responsive) + Gate 3 (Visual)
Task(subagent_type="pb-figma:compliance-checker",
prompt="Validate implementation against spec: docs/figma-reports/{file_key}-spec.md. "
"NOTE: Static checks and Gate 1 already passed in pre-check (.qa/pre-check-results.json). "
"Focus on Gate 2 (Responsive) and Gate 3 (Visual Validation).")
```
## Framework Detection
Before dispatching code generator (Step 4):
1. **Swift/Xcode:** `ls *.xcodeproj *.xcworkspace Package.swift` -> `code-generator-swiftui` โ
2. **Android/Kotlin:** Find `build.gradle.kts` with `androidx.compose` -> `code-generator-kotlin` ๐ง (placeholder, use React)
3. **Node.js:** Check `package.json` for react/next -> `code-generator-react` โ
4. **Vue/Nuxt:** Check `package.json` for vue/nuxt -> `code-generator-vue` ๐ง (placeholder, use React)
5. **Default:** `code-generator-react` with warning
> **Note:** Vue and Kotlin generators are planned for future releases. Currently, use React or SwiftUI generators.
## Report Directory
All reports saved to: `docs/figma-reports/`
```
docs/figma-reports/
+-- {file_key}-validation.md # Agent 1 output
+-- {file_key}-spec.md # Agent 2+3 output
+-- {file_key}-final.md # Agent 5 output
```
## Pipeline Resume
To resume a failed pipeline, check checkpoint files before starting:
```python
# Check for existing checkpoints
checkpoints = Glob(".qa/checkpoint-*.json")
if checkpoints:
# Find highest completed phase
highest = max(checkpoint.phase for checkpoint in checkpoints)
# Resume fRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product โ visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".