Skip to content

lidge-jun/codexclaw / plugins/codexclaw/skills/dev-frontend

cxc-dev-frontend

Unverified

Use for frontend code and UI fixes. Triggers: CSS, responsive, animation, React, Vue, Svelte, Tailwind, redesign, anti-slop, 프론트엔드, UI 작업, 반응형, 디자인 수정.

FileKindSize
SKILL.mdskill md4.1 KB
agents/openai.yamlconfig169 B
examples/README.mdmarkdown2.6 KB
references/core/a11y-patterns.mdmarkdown5.9 KB
references/core/aesthetics.mdmarkdown16.9 KB
references/core/anti-slop-enforcement.mdmarkdown6.1 KB
references/core/anti-slop.mdmarkdown27.1 KB
references/core/asset-requirements.mdmarkdown24.3 KB
references/core/backend-contracts.mdmarkdown1.9 KB
references/core/brand-asset-sourcing.mdmarkdown4.0 KB
references/core/color-system.mdmarkdown5.7 KB
references/core/consistency-locks.mdmarkdown850 B
references/core/content-surface-pipeline.mdmarkdown7.2 KB
references/core/crud-ui.mdmarkdown2.5 KB
references/core/design-intake.mdmarkdown4.4 KB
references/core/dropdown-layer.mdmarkdown5.8 KB
references/core/i18n-global.mdmarkdown3.1 KB
references/core/implementation.mdmarkdown4.1 KB
references/core/iterative-design.mdmarkdown4.4 KB
references/core/korea-2026.mdmarkdown8.8 KB
references/core/layout-discipline.mdmarkdown10.6 KB
references/core/liquid-glass.mdmarkdown8.5 KB
references/core/logo-sections.mdmarkdown5.5 KB
references/core/mobile-ux.mdmarkdown6.1 KB
references/core/motion.mdmarkdown41.4 KB
references/core/performance-budget.mdmarkdown4.4 KB
references/core/platform-runtime.mdmarkdown5.0 KB
references/core/preflight-full.mdmarkdown4.0 KB
references/core/product-density.mdmarkdown1.9 KB
references/core/prototype-variants.mdmarkdown2.2 KB
references/core/reference-capture.mdmarkdown5.5 KB
references/core/render-grounding.mdmarkdown494 B
references/core/responsive-viewport.mdmarkdown5.4 KB
references/core/role-boundaries.mdmarkdown1.3 KB
references/core/routing-defaults.mdmarkdown943 B
references/core/section-level-sourcing.mdmarkdown8.7 KB
references/core/seo-baseline.mdmarkdown4.4 KB
references/core/soft-3d-asset-gates.mdmarkdown2.1 KB
references/core/theme-switching.mdmarkdown2.1 KB
references/core/token-source-divergence.mdmarkdown5.2 KB
references/core/top-bar.mdmarkdown5.5 KB
references/core/topic-index.mdmarkdown7.6 KB
references/core/typography-wrapping.mdmarkdown9.3 KB
references/core/ux-writing-ko.mdmarkdown2.3 KB
references/core/visual-audit-loop.mdmarkdown5.8 KB
references/core/visual-verification.mdmarkdown7.5 KB
references/core/wcag22-aa.mdmarkdown12.6 KB
references/stack-index.mdmarkdown1.3 KB
references/stacks/astro.mdmarkdown8.1 KB
references/stacks/mobile-native.mdmarkdown10.9 KB
references/stacks/nextjs.mdmarkdown5.7 KB
references/stacks/react.mdmarkdown8.6 KB
references/stacks/svelte.mdmarkdown8.4 KB
references/stacks/vanilla.mdmarkdown5.1 KB
scripts/README.mdmarkdown1.7 KB
scripts/bundle-artifact.shexecutablescript1.5 KB
scripts/init-artifact.shexecutablescript6.8 KB
scripts/shadcn-components.tar.gzbinary19.5 KB

references/stacks/vanilla.md

View on GitHub
# Vanilla Stack — HTML + CSS + JS (No Framework)

Rules for building production-quality frontends without React/Vue/etc.
Read `core/aesthetics.md` + `core/anti-slop.md` first.

---

## Core Principle: Zero Dependencies

Single self-contained HTML files with inline CSS/JS. No npm, no build tools, no bundler.
The file IS the deliverable.

---

## Structure

```html
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Page Title</title>
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap" rel="stylesheet" />
  <style>
    /* === DESIGN TOKENS === */
    :root {
      --color-primary: #0ea5e9;
      --color-surface: #fafafa;
      --color-text: #18181b;
      --color-muted: #71717a;
      --font-display: 'Outfit', sans-serif;
      --font-body: 'Outfit', sans-serif;
      --radius: 0.75rem;
      --max-width: 1200px;
    }

    /* === RESET === */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: var(--font-body); color: var(--color-text); background: var(--color-surface); }

    /* === LAYOUT === */
    /* ... */

    /* === COMPONENTS === */
    /* ... */

    /* === ANIMATIONS === */
    /* ... */

    /* === RESPONSIVE === */
    @media (max-width: 768px) { /* ... */ }

    /* === REDUCED MOTION === */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
      }
    }
  </style>
</head>
<body>
  <!-- Semantic HTML -->
  <script>
    // Minimal JS — progressive enhancement only
  </script>
</body>
</html>
```

---

## Typography

Use fonts from **Google Fonts** or **Fontshare** — never system fonts.

```html
<!-- Fontshare (free, high quality) -->
<link href="https://api.fontshare.com/v2/css?f[]=satoshi@400;500;700&display=swap" rel="stylesheet" />

<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap" rel="stylesheet" />
```

### Fluid Typography (Mandatory)
```css
h1 { font-size: clamp(2rem, 1rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 1rem + 1.4vw, 2.25rem); }
p  { font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem); }
```

**NEVER** use fixed `px` for text. Always `clamp()`.

---

## CSS Animation (Preferred over JS)

### Staggered Reveal on Load
```css
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}
.reveal:nth-child(1) { animation-delay: 0.1s; }
.reveal:nth-child(2) { animation-delay: 0.2s; }
.reveal:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
```

### CSS Custom Property for Stagger Index
```css
.reveal {
  animation-delay: calc(var(--index, 0) * 100ms);
}
```
```html
<div class="reveal" style="--index: 0">First</div>
<div class="reveal" style="--index: 1">Second</div>
```

### Hover Effects
```css
.card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.08);
}
```

---

## Viewport Fitting (Critical for Full-Page Layouts)

```css
.section-full {
  min-height: 100dvh; /* NOT 100vh — iOS Safari breaks */
  display: grid;
  place-items: center;
  overflow: hidden;
}
```

**Content Density Limits per Section:**

| Type         | Maximum                                 |
| ------------ | --------------------------------------- |
| Hero         | 1 heading + 1 subtitle + 1 CTA          |
| Content      | 1 heading + 4-6 bullets OR 2 paragraphs |
| Feature grid | 1 heading + 6 cards max (2×3)           |
| Quote        | 1 quote (max 3 lines) + attribution     |

Content exceeds limits? Split into multiple sections.

---

## Responsive Layout

```css
/* Mobile-first */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
```

**NEVER** use `calc()` flexbox math. Always CSS Grid.

---

## Progressive Enhancement

1. Content readable without JS
2. Layout works without CSS animations
3. JS adds interactivity, not structure
4. Use `<noscript>` for critical JS-dependent features

---

## Semantic HTML (Mandatory)

```html
<header>...</header>
<nav aria-label="Main navigation">...</nav>
<main id="main-content">
  <section aria-labelledby="features-heading">
    <h2 id="features-heading">Features</h2>
  </section>
</main>
<footer>...</footer>
```

Use `<button>` for actions, `<a>` for navigation. Never `<div onclick>`.

---

## File Delivery

Output a single `.html` file. All CSS in `<style>`, all JS in `<script>`.
Every section needs `/* === SECTION NAME === */` comments.
The file should be openable directly in a browser — no build step.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 197kUpdated Claude CodeCodexVerifiedInstall