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/core/performance-budget.md

View on GitHub
# Performance Budget

## Core Web Vitals Targets

| Metric | Good | Needs Work | Poor | Measures |
|--------|------|------------|------|----------|
| LCP | ≤ 2.5s | ≤ 4.0s | > 4.0s | Hero load time |
| INP | ≤ 200ms | ≤ 500ms | > 500ms | Input responsiveness |
| CLS | ≤ 0.1 | ≤ 0.25 | > 0.25 | Visual stability |

- Every page targets "Good" on all three
- LCP element: identify early, preload it
- INP: never block main thread > 50ms
- CLS: every image/video/embed needs explicit `width`+`height` or `aspect-ratio`

## Bundle Size Budgets

| Resource | Budget (compressed) |
|----------|-------------------|
| Total page weight | <= 500KB first load (LANDING/EXPERIENCE motion media exempt - see FE-MEDIA-BUDGET-01) |
| JavaScript (per route) | ≤ 150KB |
| CSS (total) | ≤ 50KB |
| Hero image | <= 100KB (LANDING/EXPERIENCE motion media exempt - see FE-MEDIA-BUDGET-01) |
| Images (above fold) | <= 200KB (LANDING/EXPERIENCE motion media exempt - see FE-MEDIA-BUDGET-01) |
| Web fonts | ≤ 100KB |

- Measure compressed (gzip/brotli) sizes
- Tree-shake: `import { x } from 'lib'`, never `import lib`
- Dynamic import for below-fold: `lazy(() => import('./Modal'))`
- Bundle analyzer mandatory for builds > 200KB JS

## Motion Media Budget Exemption (FE-MEDIA-BUDGET-01) (DEFAULT)

On LANDING/EXPERIENCE-bucket surfaces (see `motion.md` FE-MOTION-BUCKET-01), motion media
is exempt from byte-cap rows with no byte ceiling: autoplay loop video,
scroll-scrub video, frame sequences, and large hero imagery. Budget freedom is
not correctness freedom: Core Web Vitals field gates remain supreme (LCP <= 2.5s,
INP <= 200ms, CLS <= 0.1).

This exemption applies only when the loading mechanics hold:
- Poster-first LCP; the poster itself counts toward the hero image budget.
- Lazy or Intersection Observer-gated loading outside first paint.
- `prefers-reduced-motion` and `prefers-reduced-data` fallbacks to poster/still.
- Stable layout; no CLS from media swap.
- Poster-first loading; the still is useful before heavy media arrives.
- Explicit skip or pause control for authored playback/choreography.
- Adaptive quality selected from device, network, and reduced-data capability.
- Primary copy and the primary CTA are never blocked on media readiness.
- Measured LCP meets the field gate; do not infer it from asset size.
- Measured interaction cost meets the INP field gate during choreography.

Heavy media still needs a product reason plus the mechanics above. Do not ship
large video, frame sequences, or heavy hero imagery just because the byte cap is
exempt.

## Font Loading

```html
<link rel="preload" href="/fonts/primary.woff2" as="font" type="font/woff2" crossorigin>
```

```css
@font-face {
  font-family: 'Primary';
  src: url('/fonts/primary.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0020-007F, U+AC00-D7AF;
}
```

- `font-display: swap` for body, `optional` for decorative
- Preload only the primary font file
- Subset: Latin + target script only
- Max 2 families, 4 weights total
- Self-host when possible

## Image Optimization

| Format | Use For | Quality |
|--------|---------|---------|
| WebP | Photos, complex | 75-85% |
| AVIF | Photos (modern) | 65-75% |
| SVG | Icons, logos | N/A |
| PNG | Screenshots, transparency | Lossless |

- `<picture>` with AVIF → WebP → fallback for hero
- `loading="lazy"` below-fold, `loading="eager" fetchpriority="high"` for hero
- Max 2x display size for retina
- Responsive `srcset` + `sizes` for content images

## Build-Time Gates

- Lighthouse Performance score is advisory smoke only; CWV field metrics are the gate
- Bundle regression: fail if JS increases > 10KB
- Image audit: flag > 200KB, excluding declared LANDING/EXPERIENCE motion-media assets (frame sequences, posters of IO-gated video)
- Unused CSS: flag > 5KB dead CSS

## Runtime Rules

- No `querySelectorAll` in scroll/resize handlers
- Debounce scroll: 100ms min, `requestAnimationFrame` for visual
- Intersection Observer for lazy loading
- `content-visibility: auto` on below-fold sections

## Pre-flight

- [ ] Hero image <= 100KB, `fetchpriority="high"`, explicit dimensions; LANDING/EXPERIENCE motion media exempt per FE-MEDIA-BUDGET-01 when poster-first/loading mechanics hold
- [ ] Below-fold images have `loading="lazy"`
- [ ] No JS bundle > 150KB compressed
- [ ] `font-display: swap` + `preload` on primary font
- [ ] Every `<img>`/`<video>` has `width`+`height`
- [ ] Lighthouse Performance score is advisory smoke only; CWV field metrics are the gate
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