Claude-skill-registry hua-ux Framework Usage
Guide for developing Next.js applications using the hua-ux framework
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/hua-ux-framework-usage" ~/.claude/skills/majiayu000-claude-skill-registry-hua-ux-framework-usage && rm -rf "$T"
manifest:
skills/data/hua-ux-framework-usage/SKILL.mdsource content
hua-ux Framework Usage Skill
This skill guides you on how to develop Next.js applications using the hua-ux framework.
🚨 Required Guidelines for Claude Assistants
Required Checks Before Using Framework
IF (creating a new page or component) THEN 1. Use hua-ux framework components first → Wrap page with `HuaUxPage` → Use components from `@hua-labs/ui` first 2. Generate translation files together → `translations/ko/{namespace}.json` → `translations/en/{namespace}.json` 3. Prefer Server Components → Add `'use client'` only when client features are needed END IF
Core Philosophy
"You don't need to know Next.js. Just configure and tell AI what to do."
Framework Structure
Top Layer: Framework & Config
: Framework configurationhua-ux.config.ts
: Automatic Provider setupHuaUxLayout
: Page wrapper (Motion, i18n, SEO automatically applied)HuaUxPage
Bottom Layer: Core Packages
: UI component library@hua-labs/ui
: Motion/animations@hua-labs/motion-core
: Internationalization@hua-labs/i18n-core
: State management@hua-labs/state
Key Patterns
1. Page Creation Pattern
// app/my-page/page.tsx import { HuaUxPage } from '@hua-labs/hua-ux/framework'; import { useTranslation } from '@hua-labs/i18n-core'; export default function MyPage() { const { t } = useTranslation('my-page'); return ( <HuaUxPage title={t('title')} description={t('description')}> <h1>{t('title')}</h1> {/* content */} </HuaUxPage> ); }
Important:
- Wrapping with
automatically applies Motion, i18n, SEOHuaUxPage - Add translation keys to
translations/{language}/my-page.json - Create as Server Component (default)
2. Client Component Creation Pattern
// components/MyComponent.tsx 'use client'; import { Card, Button } from '@hua-labs/ui'; import { useMotion } from '@hua-labs/hua-ux/framework'; import { useTranslation } from '@hua-labs/i18n-core'; export function MyComponent() { const { t } = useTranslation('my-component'); const motion = useMotion(); return ( <Card ref={motion.ref} style={motion.style}> <h2>{t('title')}</h2> <Button>{t('button')}</Button> </Card> ); }
Important:
- Client components require
'use client' - Utilize framework components (
,@hua-labs/ui
)@hua-labs/motion-core
3. Translation File Pattern
// translations/ko/my-page.json { "title": "Title", "description": "Description", "button": "Button" } // translations/en/my-page.json { "title": "Title", "description": "Description", "button": "Button" }
Important:
- Add all translation keys to both Korean and English
- Namespace should match page name
Available Components
@hua-labs/ui
,Button
,Card
,Input
,Modal
,Alert
,Toast
,Table
, etc.Form- See
for detailed listai-context.md
@hua-labs/hua-ux/framework
: Page wrapperHuaUxPage
: LayoutHuaUxLayout
: Provider unificationUnifiedProviders
: Unified motion hookuseMotion
: Client data fetchinguseData
: Server data fetchingfetchData
Configuration File
hua-ux.config.ts
import { defineConfig } from '@hua-labs/hua-ux/framework'; export default defineConfig({ preset: 'product', // 'product' or 'marketing' i18n: { defaultLanguage: 'ko', supportedLanguages: ['ko', 'en'], }, motion: { defaultPreset: 'product', enableAnimations: true, }, });
Preset Selection:
: For product pages (professional, efficient)'product'
: For marketing pages (dramatic, eye-catching)'marketing'
Guidelines for Claude Code Generation
-
When Creating Pages:
- Wrap with
HuaUxPage - Generate translation files together
- Use
hookuseTranslation - Prefer Server Components
- Wrap with
-
When Creating Components:
- Add
directive (for client components)'use client' - Utilize framework components
- Consider applying motion
- Add
-
When Adding Translations:
- Add both Korean and English
- Maintain namespace consistency
-
When Changing Configuration:
- Only modify
hua-ux.config.ts - Prefer Preset (over manual configuration)
- Only modify
References
: Detailed project structure explanationai-context.md
: Cursor IDE rules.cursorrules- Framework docs:
node_modules/@hua-labs/hua-ux/README.md