From qe-framework
Implements frontend UI code (React, HTML/CSS) from a spec or DESIGN.md. Use to create new components, pages, or dashboards. Supports live preview via --canvas and rapid sketches via --prototype.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:Qfrontend-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill creates distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. It implements real, working code with exceptional attention to aesthetic detail and creative choices.
This skill creates distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. It implements real, working code with exceptional attention to aesthetic detail and creative choices.
Before any design work, gather essential context. Code tells you what was built, not who it's for or what it should feel like.
Check for DESIGN.md in the project root FIRST.
DESIGN.md exists: Use it as the single source of truth for all design tokens, colors, typography, spacing, and component guidelines. Proceed to Step 0-1.DESIGN.md does NOT exist: STOP. Do not proceed with frontend implementation.
⚠️ DESIGN.md가 없습니다.
프론트엔드 작업 전에 /Qdesign을 먼저 실행하세요.
designmd.ai에서 프로젝트에 맞는 디자인 시스템을 찾아볼 수 있습니다.
Run /Qdesign to create a design system specification first.
.impeccable.md exists but no DESIGN.md: still STOP, but note that /Qdesign can migrate .impeccable.md tokens into the canonical DESIGN.md format./Qdesign handles that with full context including designmd.ai references..impeccable.md from project root (if exists) — merge any extra tokens not in DESIGN.mdSee references/stitch-extraction.md for the full Stitch extraction procedure and design-context.md template.
Commit to a bold aesthetic direction:
CRITICAL: Choose a clear conceptual direction and execute it with precision. Both bold maximalism and refined minimalism work — the key is intentionality, not intensity.
Set up tailwind.config before writing any code. Design tokens must be defined upfront to maintain consistency across components.
See references/tailwind-config-example.md for the full config example, checklist, and Stitch integration notes.
Do not build the entire page at once. Break it down into components and complete them one by one.
Process:
Decomposition example:
Landing Page
├── Layout Shell ← Priority 1: overall structure, global styles
├── Header / Navigation ← Priority 2
├── Hero Section ← Priority 3: core content
├── Features Grid ← Priority 4
├── Testimonials ← Priority 5
├── CTA Section ← Priority 6
└── Footer ← Priority 7
Rules:
Repeat the following for each component:
Write code using tokens from the Tailwind config. Minimize custom values ([arbitrary]) — if a value not in the config is needed, add it to the config.
Must pass before outputting each component:
Fonts are a key factor determining design polish.
reference/typography.md
Text overflow, container breakout, and margin collapse are critical failures.
overflow-wrap: break-word or Tailwind break-words not applied = FAILword-break: keep-all (break-keep-all) not applied to CJK content = FAILmin-w-0 not applied to flex/grid children = FAILmax-w-full not applied to images/media = FAILmax-w-* or w-full max-w-[Xpx]) not used = FAILtruncate or line-clamp-* not applied to dynamic content = FAIL
reference/typography.md(Text Overflow),reference/spatial-design.md(Layout Integrity)
Verify the component in the browser. If modifications are needed, proceed to Step 3 (Agentation).
Once verified, return to the next component and repeat Step 2.
When modifying existing UI — Agentation is mandatory.
npx agentation on the target pageWhy mandatory: "Fix the header" is ambiguous. A click on the exact element gives selector, file, line number, and current styles — zero guesswork.
If Agentation is not set up, guide the user through /Qagentation before proceeding.
Exception: Skip when the user provides exact file paths and CSS selectors themselves, or when creating entirely new UI (Step 1-2 flow).
| Reference | When to consult |
|---|---|
design-context.md | Stitch-extracted tokens (colors, fonts, spacing) — use as source of truth when present |
reference/typography.md | Font selection, type scale, overflow defense, multi-script rules |
reference/color-and-contrast.md | Palette design, OKLCH, dark mode, WCAG contrast |
reference/spatial-design.md | Spacing systems, layout integrity, layout grids |
reference/motion-design.md | Timing, easing curves, animation performance |
reference/interaction-design.md | States, focus management, forms, modals |
reference/responsive-design.md | Mobile-first, container queries, input detection |
reference/ux-writing.md | Button labels, error messages, tone, i18n |
When the --canvas flag is present in the invocation (e.g., /Qfrontend-design --canvas "pricing page hero section"), the skill automatically renders the generated UI live and captures a screenshot.
buildPlan(generatedFilePath, projectRoot) from hooks/scripts/lib/canvas-preview.mjs.plan.framework !== 'static' AND plan.framework !== 'none': Inform the user that the dev server at plan.port must be running. Document the expected command (e.g., npm run dev) but do NOT auto-start it.plan.framework === 'static' OR plan.framework === 'none': Proceed directly to MCP invocation.mcp__playwright__browser_navigate(plan.url) → mcp__playwright__browser_wait_for(plan.waitFor) → mcp__playwright__browser_take_screenshot() → return screenshot pathmcp__claude-in-chrome__navigate() → mcp__claude-in-chrome__computer(screenshot) (adapt waitFor semantics to visible indicators)plan.fallback === 'file-path-only')plan object as metadata.Example 1 — Basic Canvas
/Qfrontend-design --canvas "pricing page hero section"
Generates a pricing hero component and automatically captures a live screenshot from the browser.
Example 2 — Explicit File Target
/Qfrontend-design --canvas src/pages/about.tsx
Previews the generated or existing file at src/pages/about.tsx, requiring the dev server to be running for framework-based files.
When the --prototype flag is present in the invocation (e.g., /Qfrontend-design --prototype "Hero section with CTA for landing page"), the skill generates a quick, stakeholder-shareable HTML sketch before committing to production framework code.
Produce a single self-contained .html file with inline <style> and vanilla DOM, skipping framework setup, component decomposition, and styling system integration. Enables rapid design validation with non-engineers and quick feasibility checks.
/Qfrontend-design fans out to deck/code/doc.html file at prototype/<slug>.html (or user-specified path)<style> tag with all CSS (Tailwind CDN allowed for speed; no framework)--canvas — if both flags present, open prototype in browser immediately after generationDESIGN.md exists, apply its color/typography tokens even in prototype mode (consistency)After generation, prompt the user:
Prototype generated at prototype/hero.html
Upgrade to production code? Y/N
/Qfrontend-design <same brief> (without --prototype) to generate framework code, using the prototype HTML as a structural reference<!-- claude: ... --> comments if needed/Qfrontend-design --prototype --canvas "Hero section with CTA for landing page"
→ Generates prototype/hero.html with inline CSS and vanilla JS, opens in browser for live review.
User approves, skill asks: "Upgrade to production code? Y/N"
If Y: /Qfrontend-design --canvas "Hero section with CTA for landing page" (without --prototype) generates framework code.
--canvas flag absent → just output file path and confirm generation; user opens manually<!-- claude: ... --> comments for future iterationsAllow users to annotate source code with <!-- claude: <instruction> --> comments that persist in the file. On the next /Qfrontend-design invocation targeting the same file, the skill automatically extracts these directives and merges them into the design brief, enabling iterative refinements without re-stating previous requests.
Users can embed refinement instructions directly in the code as HTML comments (e.g., <!-- claude: make CTA button larger and more prominent -->). These directives survive code generation because the parser identifies and extracts them before reading, and they are marked for removal after being applied. This creates a conversation history within the file itself, reducing context loss across skill invocations.
Uses extractDirectives(filePath) from hooks/scripts/lib/inline-comment-parser.mjs. The parser:
<!-- claude: <text> --> comments in the file{ directive, targetLine, file }extractDirectives(targetFilePath)Apply these inline edits from the file:
- Line 12: make CTA button larger and more prominent
- Line 45: use primary color instead of secondary
The user's original request takes precedence; directives provide additional context.<!-- claude: ... --> comments from the updated file. These comments have been consumed and should not accumulate.extractDirectives returns empty array; proceed with normal generationSource file src/Hero.tsx (existing from previous iteration):
<!-- claude: make CTA button larger and more prominent -->
<button className="px-4 py-2">Sign up</button>
<h1 className="text-2xl">Welcome</h1>
<!-- claude: add subtle gradient background -->
User invokes: /Qfrontend-design src/Hero.tsx "minor polish"
Skill execution:
extractDirectives("src/Hero.tsx")[{directive: "make CTA button larger and more prominent", targetLine: 2, file: "src/Hero.tsx"}, {directive: "add subtle gradient background", targetLine: 5, file: "src/Hero.tsx"}]<!-- claude: ... --> comments from the output fileResult: Claude applies both "minor polish" and the two inline directives in a single pass. The file is cleaner for the next iteration (no stale comments).
When the design includes flowcharts, architecture diagrams, ERDs, or any visual diagram:
/Qmermaid-diagrams for syntax referencemmdc -i diagram.mmd -o diagram.png -t neutral -b transparent -s 2
mmdc -i diagram.mmd -o diagram.svg -t neutral -b transparent
<img src="diagram.svg" alt="..." />reference/typography.md. Blacklisted fonts prohibited. Dedicated fonts for all scripts + appropriate line-height + fallback chain required.transitionTimingFunction from config. Only animate transform and opacity.[...]) when a config token should exist insteadNo two designs should look the same. Vary themes, fonts, aesthetics across generations.
Would someone immediately recognize this as AI-generated? If yes, rethink. Distinctive design makes people ask "how was this made?" not "which AI made this?"
Match implementation complexity to the aesthetic vision. Maximalist = sophisticated code with extensive animations. Minimalist = restraint, precision, careful spacing and typography.
npx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.