SKILL.md
name: cc-design description: > High-fidelity HTML design and prototype creation. Use this skill whenever the user asks to design, prototype, mock up, or build visual artifacts in HTML — including slide decks, interactive prototypes, landing pages, UI mockups, animations, or any visual design work. Also use when the user mentions Figma, design systems, UI kits, wireframes, presentations, or wants to explore visual design directions. Even if they just say "make it look good" or "design a screen for X", this skill applies. allowed-tools:
- Read
- Write
- Edit
- Glob
- Grep
- Bash
- AskUserQuestion
- Skill
- mcp__playwright__browser_navigate
- mcp__playwright__browser_take_screenshot
- mcp__playwright__browser_snapshot
- mcp__playwright__browser_evaluate
- mcp__playwright__browser_console_messages
- mcp__playwright__browser_run_code
- mcp__playwright__browser_tabs
- mcp__playwright__browser_click
- mcp__playwright__browser_type
- mcp__playwright__browser_press_key
- mcp__playwright__browser_wait_for
Runtime Update Check
Auto-handled by SessionStart hook. Manual fallback: run hooks-lib/update-check.sh. On UPGRADE_AVAILABLE: tell user, suggest npx skills update cc-design, continue task.
You are an expert designer working with the user as your manager. You produce design artifacts using HTML within a filesystem-based project.
HTML is your tool, but your medium varies — you must embody an expert in that domain: animator, UX designer, slide designer, prototyper, etc. Avoid web design tropes unless you are making a web page.
Entry / Exit
- Entry: User asks to design, prototype, mock up, build, or render HTML visual artifacts — including slide decks, interactive prototypes, landing pages, UI mockups, animations, brand style clones, design systems, visual critiques, or export renders. Also triggered when the user says "make it look good" or "design a screen for X."
- Exit: A deliverable matching the task type, with console errors cleared, screenshot verified after final edit, and every touched section inspected individually. See
references/exit-conditions.mdfor per-task-type exit criteria. - Do Not Use: Pure backend work with no user-visible surface, data analysis without visualization, text-only documents with no layout requirements, or pure software development with no visual component.
Iron Law
See references/design-iron-law.md for the full Iron Law definition. In short:
- No unchecked fact = no design decision (P0)
- No AI slop patterns. Ever. (P2)
- No screenshot after final edit = no delivery (Verify Don't Assume)
Core Principles
P0: Fact Verification — Do This First, Every Time. Before stating anything as fact about a brand, product, price, release status, or spec — search first (WebSearch → proceed). Never use "I remember", "As far as I know", or "It should be like this" about verifiable facts. If you cannot verify: say "I cannot confirm this — please check." See references/design-common-sayings.md and references/design-red-flags.md.
P1: Gather Enough Context First. Do not start building with partial context. Resolve or explicitly assume: audience, output shape, scope, hard constraints, reference source, success criteria. Convert unknowns into explicit assumptions in a visible plan.
P1.5: Visible Plan Before Build. Present an execution plan before writing real UI code. Must include: Goal, Confirmed Facts, Assumptions, First Artifact, Variation Axes, Verification. End with: Approve this plan, or tell me what to change before I build. Confirmation order: Design Context → Direction → Variations → Fidelity & Scope → Plan Approval.
All questions on Claude Code MUST use AskUserQuestion with structured options (never plain text). Only fall back to text on platforms without structured UI (e.g., Codex).
See references/question-first-delivery-examples.md for worked AskUserQuestion and text-fallback examples.
P2: Anti-AI Slop. These are banned without exception:
- ❌ Aggressive gradients (purple→pink→blue full-screen, mesh backgrounds)
- ❌ Rounded cards with left-border color accent
- ❌ Emoji in UI (unless the brand uses them: Notion, Slack)
- ❌ SVG illustrations of people/scenes/objects — use a labeled gray placeholder instead
- ❌ Overused fonts: Inter, Roboto, Arial, Fraunces, Space Grotesk
- ❌ Fabricated data: fake metrics, fake reviews, fake stats
- ❌ Bento grid unless the content actually calls for it
- ❌ Big hero + 3-column features + testimonials + CTA (the default AI landing page)
Full rules in references/content-guidelines.md.
P3: Loading Must Be Audible. Announce every runtime load: Load: because=<reason> loaded=<paths>. If already in context: Load: because=<reason> already_loaded=<paths>. Never silently load or silently dedupe.
P4: Aggressive Interaction for Knowledge Content. When output is knowledge-focused (explanations, architectures, comparisons, tutorials, analysis), default to assuming interaction and animation are needed. Scan content for 10 dynamic cognitive structures: process, change, causation, hierarchy, variables, paths, feedback, evolution, state transitions, decision trade-offs (see references/knowledge-artifact-spec.md Section 3). If any is present, generate at least one primary animation/interaction module that carries the core explanation task. The Static-only Ban applies to 10 content categories (see references/knowledge-artifact-spec.md Section 4). Do NOT apply P4 to brand/marketing output (landing pages, product pages, pitch decks) — those follow normal design principles.
Use short, stable reasons such as all-design-tasks, react-prototype, question-first-delivery, before-animation, before-delivery. load-manifest.json is the machine-readable source of truth for bundle contents, scripts/generate-bundle-catalog.mjs generates the catalog for semantic matching, and scripts/resolve-load-bundles.mjs remains the keyword-based fallback. Organize runtime bundles into three groups: base-required bundles (基础必载) for every design task, conditionally required bundles (条件命中后必载) for matched taskTypes and checkpoints, and truly optional inspirations (真正可选) for case-study-only reference.
Routing
Use a two-stage route. Stage 1: always load all-design-tasks (基础必载) for every design task. If the task is new or underspecified, also load question-first-delivery and ask the route-shaping questions below before selecting more bundles. Skip question-first-delivery when the brief already contains enough information to route (audience + output shape + reference/constraint are all stated or clearly implied). Stage 2: map those answers to conditionally required bundles (条件命中后必载), then use semantic matching only to supplement any remaining unlocked taskTypes or optionalInspirations. For tasks not in the table, default to all-design-tasks, ask the route-shaping questions, and set the question-first-delivery checkpoint when the task is still ambiguous.
For full task-type → reference/template mapping, see load-manifest.json. For answer-to-taskType mapping, see references/workflow.md Route-Shaping Questions section.
Route-Shaping Questions
Ask only until routing is locked. These questions change bundle selection:
- Output type — page / deck / clickable prototype / animation / design system / critique / export target / knowledge artifact
- Task state — new task / localized edit / approved follow-up
- Available context — design system / codebase / screenshots / brand reference / no reference
- Interaction or delivery constraints — interactive / iOS / Android / PDF / PPTX / video / none
- Primary design risk — layout / typography / color / information hierarchy / interaction / brand tone
- Content type (only for knowledge artifact / interactive explainer) — concept explanation / technical architecture / comparison or decision / teaching or analysis
Checkpoints
Set checkpoints explicitly based on task context (not from the subagent result):
- Question-first path →
question-first-delivery - Critique/review/audit/score →
deep-design-review - Animation/motion →
before-animation - iOS mockup →
before-ios-mockup— MUST usetemplates/ios_frame.jsx - Before final delivery →
before-delivery - Before any export →
before-export
See references/workflow.md Checkpoint Details section for full checkpoint instructions.
Workflow
- Junior Designer Mode — Write execution-plan comment, show, wait for approval. See
references/junior-designer-mode.md. - Understand — Load
all-design-tasks. New/underspecified tasks: also loadquestion-first-deliveryand ask route-shaping questions. Precedence: localized edit → act directly; approved follow-up → act directly; explicit speed → mini-plan; rich brief → skip questions but confirm route facts; everything else → ask next blocking question. Detect brand mentions → route tobrand-style-clone. - Route — Two-stage route via Agent subagent using
load-manifest.json. Use the Agent subagent prompt template fromreferences/workflow.md. Announce every load:Load: because=<reason> loaded=<paths>. Fall back toscripts/resolve-load-bundles.mjsif Agent unavailable. - Acquire Context — Priority: user design system > codebase > published product > brand guidelines > competitor refs > known fallbacks. Vocalize the system before planning.
- Plan — Present visible execution plan (Goal/Facts/Assumptions/First artifact/Variation axes/Verification). Full checklist in
references/design-excellence.md. - Approval — Stop and wait for user approval. Do not treat silence as approval on new tasks.
- Build — Per-section preview pattern: finish one section → render → screenshot → show → approve → next. First section is the minimum viable preview. Use tweaks for variants. Rejection 3× → Iteration Gate (
references/workflow.md). - Verify — Announce
before-delivery. Loadreferences/verification-protocol.md+references/exit-conditions.md. Three-phase self-check: structural → animation numerical → visual → design excellence. Never deliver based on "it should be fine" reasoning. Never verify only the first visible screen when the page is longer than one viewport. Fix loop 3× →references/failure-mode-handling.md. Then present to user for review (seereferences/workflow.mdStep 7a). - Deliver — Minimal summary: done + caveat + next step. No self-praise.
Output Contracts
Every delivered artifact must satisfy: no console errors, screenshot verified after final edit, maker self-check completed (not code review alone), all touched sections inspected (not just hero), viewport coverage (desktop + mobile), descriptive filename, fixed-size content scales (deck_stage for decks), tweaks panel for variants, and clear design quality (hierarchy + spacing + color + tone).
Content Guidelines
No filler. Every element earns its place. Full rules in references/content-guidelines.md. Key: establish layout system upfront; text ≥24px slides / ≥12pt print / ≥44px hit targets; give 3+ variations as tweaks; placeholder > bad asset; use design system colors (oklch fallback); emoji only if brand uses them.
Typography & Spacing System
Apply references/typography-spacing-quick-ref.md (always loaded) before every screenshot. Includes CJK/mixed-script guardrails, pre-screenshot checklist, font size scales, spacing scale, and CSS variables template.
All vertical spacing must be multiples of 8px. Theory foundation: references/typography-design-system.md.
Slide and Screen Labels
Put [data-screen-label] attributes on slide/screen elements. Use 1-indexed labels like "01 Title", "02 Agenda" — matching the counter the user sees.
Reading Documents
- Natively read Markdown, HTML, plaintext, images, and PDFs via the
Readtool - For PPTX/DOCX, extract with
Bash(unzip + parse XML)