Loading...
Loading...
Compare original and translation side by side
/frontend-dev <request>/frontend-dev <request>frontend-dev/
├── SKILL.md # Core skill (this file)
├── scripts/ # Asset generation scripts
│ ├── minimax_tts.py # Text-to-speech
│ ├── minimax_music.py # Music generation
│ ├── minimax_video.py # Video generation (async)
│ └── minimax_image.py # Image generation
├── references/ # Detailed guides (read as needed)
│ ├── minimax-cli-reference.md # CLI flags quick reference
│ ├── asset-prompt-guide.md # Asset prompt engineering rules
│ ├── minimax-tts-guide.md # TTS usage & voices
│ ├── minimax-music-guide.md # Music prompts & lyrics format
│ ├── minimax-video-guide.md # Camera commands & models
│ ├── minimax-image-guide.md # Ratios & batch generation
│ ├── minimax-voice-catalog.md # All voice IDs
│ ├── motion-recipes.md # Animation code snippets
│ ├── env-setup.md # Environment setup
│ └── troubleshooting.md # Common issues
├── templates/ # Visual art templates
│ ├── viewer.html # p5.js interactive art base
│ └── generator_template.js # p5.js code reference
└── canvas-fonts/ # Static art fonts (TTF + licenses)frontend-dev/
├── SKILL.md # 核心技能(本文档)
├── scripts/ # 资产生成脚本
│ ├── minimax_tts.py # 文本转语音
│ ├── minimax_music.py # 音乐生成
│ ├── minimax_video.py # 视频生成(异步)
│ └── minimax_image.py # 图片生成
├── references/ # 详细指南(按需阅读)
│ ├── minimax-cli-reference.md # CLI 参数快速参考
│ ├── asset-prompt-guide.md # 资产提示词设计规则
│ ├── minimax-tts-guide.md # TTS 使用与音色说明
│ ├── minimax-music-guide.md # 音乐提示词与歌词格式
│ ├── minimax-video-guide.md # 镜头指令与模型说明
│ ├── minimax-image-guide.md # 比例与批量生成规则
│ ├── minimax-voice-catalog.md # 所有音色ID
│ ├── motion-recipes.md # 动画代码片段
│ ├── env-setup.md # 环境配置
│ └── troubleshooting.md # 常见问题
├── templates/ # 视觉艺术模板
│ ├── viewer.html # p5.js 交互式艺术基础模板
│ └── generator_template.js # p5.js 代码参考
└── canvas-fonts/ # 静态艺术字体(TTF 格式及许可证)assets/
├── images/
│ ├── hero-landing-1710xxx.webp
│ ├── icon-feature-01.webp
│ └── bg-pattern.svg
├── videos/
│ ├── hero-bg-1710xxx.mp4
│ └── demo-preview.mp4
└── audio/
├── bgm-ambient-1710xxx.mp3
└── tts-intro-1710xxx.mp3{type}-{descriptor}-{timestamp}.{ext}assets/
├── images/
│ ├── hero-landing-1710xxx.webp
│ ├── icon-feature-01.webp
│ └── bg-pattern.svg
├── videos/
│ ├── hero-bg-1710xxx.mp4
│ └── demo-preview.mp4
└── audio/
├── bgm-ambient-1710xxx.mp3
└── tts-intro-1710xxx.mp3{类型}-{描述}-{时间戳}.{扩展名}| Framework | Asset Location | Component Location |
|---|---|---|
| Pure HTML | | N/A (inline or |
| React/Next.js | | |
| Vue/Nuxt | | |
| Svelte/SvelteKit | | |
| Astro | | |
| 框架 | 资产位置 | 组件位置 |
|---|---|---|
| 纯HTML | | 无(内联或 |
| React/Next.js | | |
| Vue/Nuxt | | |
| Svelte/SvelteKit | | |
| Astro | | |
project/
├── index.html
├── assets/
│ ├── images/
│ ├── videos/
│ └── audio/
├── css/
│ └── styles.css
└── js/
└── main.js # Animations (GSAP/vanilla)project/
├── index.html
├── assets/
│ ├── images/
│ ├── videos/
│ └── audio/
├── css/
│ └── styles.css
└── js/
└── main.js # 动画(GSAP/原生JS)project/
├── public/assets/ # Static assets
├── src/
│ ├── components/
│ │ ├── ui/ # Button, Card, Input
│ │ ├── sections/ # Hero, Features, CTA
│ │ └── motion/ # RevealSection, StaggerGrid
│ ├── lib/
│ ├── styles/
│ └── app/ # Pages
└── package.jsonproject/
├── public/assets/ # 静态资产
├── src/
│ ├── components/
│ │ ├── ui/ # 按钮、卡片、输入框
│ │ ├── sections/ # 首页横幅、功能区、行动召唤区
│ │ └── motion/ # 渐显区块、交错网格
│ ├── lib/
│ ├── styles/
│ └── app/ # 页面文件
└── package.jsonproject/
├── public/assets/
├── src/ # or root for Nuxt
│ ├── components/
│ │ ├── ui/
│ │ ├── sections/
│ │ └── motion/
│ ├── composables/ # Shared logic
│ ├── pages/
│ └── assets/ # Processed assets (optional)
└── package.jsonproject/
├── public/assets/
├── src/ # Nuxt 可置于根目录
│ ├── components/
│ │ ├── ui/
│ │ ├── sections/
│ │ └── motion/
│ ├── composables/ # 共享逻辑
│ ├── pages/
│ └── assets/ # 处理后资产(可选)
└── package.jsonproject/
├── public/assets/
├── src/
│ ├── components/ # .astro, .tsx, .vue, .svelte
│ ├── layouts/
│ ├── pages/
│ └── styles/
└── package.jsonHeroSection.tsxHeroSection.vueHeroSection.astroproject/
├── public/assets/
├── src/
│ ├── components/ # .astro, .tsx, .vue, .svelte 格式
│ ├── layouts/
│ ├── pages/
│ └── styles/
└── package.jsonHeroSection.tsxHeroSection.vueHeroSection.astroscripts/scripts/<img><video><source>background-image<img><video><source>background-image| Dial | Default | Range |
|---|---|---|
| DESIGN_VARIANCE | 8 | 1=Symmetry, 10=Asymmetric |
| MOTION_INTENSITY | 6 | 1=Static, 10=Cinematic |
| VISUAL_DENSITY | 4 | 1=Airy, 10=Packed |
| 调节项 | 默认值 | 范围 |
|---|---|---|
| DESIGN_VARIANCE | 8 | 1=对称布局,10=非对称布局 |
| MOTION_INTENSITY | 6 | 1=静态,10=电影级 |
| VISUAL_DENSITY | 4 | 1=宽松,10=紧凑 |
package.json"use client"package.jsonmin-h-[100dvh]h-screenmax-w-[1400px] mx-automax-w-7xlpackage.json"use client"package.jsonmin-h-[100dvh]h-screenmax-w-[1400px] mx-automax-w-7xl| Rule | Directive |
|---|---|
| Typography | Headlines: |
| Color | Max 1 accent, saturation < 80%. NEVER use AI purple/blue. Stick to one palette. |
| Layout | NEVER use centered heroes when VARIANCE > 4. Force split-screen or asymmetric layouts. |
| Cards | NEVER use generic cards when DENSITY > 7. Use |
| States | ALWAYS implement: Loading (skeleton), Empty, Error, Tactile feedback ( |
| Forms | Label above input. Error below. |
| 规则类别 | 要求 |
|---|---|
| 排版 | 标题: |
| 色彩 | 最多1个强调色,饱和度<80%。严禁使用AI常用的紫色/蓝色。需保持单一调色板。 |
| 布局 | 当VARIANCE>4时,严禁使用居中的首页横幅。必须使用分屏或非对称布局。 |
| 卡片 | 当DENSITY>7时,严禁使用通用卡片样式。需使用 |
| 状态 | 必须实现:加载状态(骨架屏)、空状态、错误状态、触觉反馈( |
| 表单 | 标签置于输入框上方。错误提示置于下方。输入框块使用 |
backdrop-blurborder-white/10shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]useMotionValueuseTransformuseStatelayoutlayoutIdstaggerChildrenanimation-delay: calc(var(--index) * 100ms)backdrop-blurborder-white/10shadow-[inset_0_1px_0_rgba(255,255,255,0.1)]useMotionValueuseTransformuseStatelayoutlayoutIdstaggerChildrenanimation-delay: calc(var(--index) * 100ms)| Category | Banned |
|---|---|
| Visual | Neon glows, pure black (#000), oversaturated accents, gradient text on headers, custom cursors |
| Typography | Inter font, oversized H1s, Serif on dashboards |
| Layout | 3-column equal card rows, floating elements with awkward gaps |
| Components | Default shadcn/ui without customization |
| 类别 | 禁用内容 |
|---|---|
| 视觉效果 | 霓虹发光、纯黑色(#000)、过饱和强调色、标题渐变文字、自定义光标 |
| 排版 | Inter字体、超大H1标题、仪表盘中使用衬线字体 |
| 布局 | 三等分卡片行、间隙不协调的浮动元素 |
| 组件 | 未自定义的默认shadcn/ui组件 |
| Category | Patterns |
|---|---|
| Navigation | Dock magnification, Magnetic button, Gooey menu, Dynamic island, Radial menu, Speed dial, Mega menu |
| Layout | Bento grid, Masonry, Chroma grid, Split-screen scroll, Curtain reveal |
| Cards | Parallax tilt, Spotlight border, Glassmorphism, Holographic foil, Swipe stack, Morphing modal |
| Scroll | Sticky stack, Horizontal hijack, Locomotive sequence, Zoom parallax, Progress path, Liquid swipe |
| Gallery | Dome gallery, Coverflow, Drag-to-pan, Accordion slider, Hover trail, Glitch effect |
| Text | Kinetic marquee, Text mask reveal, Scramble effect, Circular path, Gradient stroke, Kinetic grid |
| Micro | Particle explosion, Pull-to-refresh, Skeleton shimmer, Directional hover, Ripple click, SVG draw, Mesh gradient, Lens blur |
| 类别 | 可用模式 |
|---|---|
| 导航 | 停靠栏放大、磁吸按钮、粘性菜单、动态岛、径向菜单、快速拨号、巨型菜单 |
| 布局 | 便当盒网格、瀑布流、色彩网格、分屏滚动、幕布渐显 |
| 卡片 | 视差倾斜、聚光灯边框、玻璃态、全息箔、滑动堆叠、变形模态框 |
| 滚动 | 粘性堆叠、横向滚动 hijack、Locomotive 序列、缩放视差、进度路径、液态滑动 |
| 画廊 | 穹顶画廊、封面流、拖拽平移、手风琴滑块、悬停轨迹、故障效果 |
| 文字 | 动态跑马灯、文字遮罩渐显、乱码解密、圆形路径、渐变描边、动态网格 |
| 微交互 | 粒子爆炸、下拉刷新、骨架屏闪光、方向感知悬停、点击涟漪、SVG绘制、网格渐变、镜头模糊 |
#f9fafbborder-slate-200/50rounded-[2.5rem]tracking-tightstiffness: 100, damping: 20React.memolayoutId#f9fafbborder-slate-200/50rounded-[2.5rem]tracking-tightstiffness: 100, damping: 20React.memolayoutId#141413#faf9f5#b0aea5#e8e6dc#d97757#6a9bcc#788c5d#141413#faf9f5#b0aea5#e8e6dc#d97757#6a9bcc#788c5d| Need | Tool |
|---|---|
| UI enter/exit/layout | Framer Motion — |
| Scroll storytelling (pin, scrub) | GSAP + ScrollTrigger — frame-accurate control |
| Looping icons | Lottie — lazy-load (~50KB) |
| 3D/WebGL | Three.js / R3F — isolated |
| Hover/focus states | CSS only — zero JS cost |
| Native scroll-driven | CSS — |
| 需求 | 工具 |
|---|---|
| UI 进入/退出/布局动画 | Framer Motion — |
| 滚动叙事(固定、 scrub) | GSAP + ScrollTrigger — 帧级精确控制 |
| 循环图标动画 | Lottie — 懒加载(约50KB) |
| 3D/WebGL | Three.js / R3F — 独立 |
| 悬停/聚焦状态 | 仅CSS — 零JS性能消耗 |
| 原生滚动驱动动画 | CSS — |
| Level | Techniques |
|---|---|
| 1-2 Subtle | CSS transitions only, 150-300ms |
| 3-4 Smooth | CSS keyframes + Framer animate, stagger ≤3 items |
| 5-6 Fluid | |
| 7-8 Cinematic | GSAP ScrollTrigger, pinned sections, horizontal hijack |
| 9-10 Immersive | Full scroll sequences, Three.js particles, WebGL shaders |
| 等级 | 技术方案 |
|---|---|
| 1-2 微妙 | 仅CSS过渡,时长150-300ms |
| 3-4 流畅 | CSS关键帧 + Framer动画,交错元素≤3个 |
| 5-6 丝滑 | |
| 7-8 电影级 | GSAP ScrollTrigger、固定区块、横向滚动 hijack |
| 9-10 沉浸式 | 完整滚动序列、Three.js粒子、WebGL着色器 |
references/motion-recipes.md| Recipe | Tool | Use For |
|---|---|---|
| Scroll Reveal | Framer | Fade+slide on viewport entry |
| Stagger Grid | Framer | Sequential list animations |
| Pinned Timeline | GSAP | Horizontal scroll with pinning |
| Tilt Card | Framer | Mouse-tracking 3D perspective |
| Magnetic Button | Framer | Cursor-attracted buttons |
| Text Scramble | Vanilla | Matrix-style decode effect |
| SVG Path Draw | CSS | Scroll-linked path animation |
| Horizontal Scroll | GSAP | Vertical-to-horizontal hijack |
| Particle Background | R3F | Decorative WebGL particles |
| Layout Morph | Framer | Card-to-modal expansion |
references/motion-recipes.md| 方案 | 工具 | 适用场景 |
|---|---|---|
| 滚动渐显 | Framer | 进入视口时淡入+滑动 |
| 交错网格 | Framer | 列表元素顺序动画 |
| 固定时间线 | GSAP | 横向滚动+固定区块 |
| 倾斜卡片 | Framer | 鼠标跟踪3D透视效果 |
| 磁吸按钮 | Framer | 跟随光标移动的按钮 |
| 文字解密 | 原生JS | 矩阵风格的文字解码效果 |
| SVG路径绘制 | CSS | 滚动关联的路径动画 |
| 横向滚动 | GSAP | 垂直转横向滚动 hijack |
| 粒子背景 | R3F | 装饰性WebGL粒子 |
| 布局变形 | Framer | 卡片转模态框的展开动画 |
transformopacityfilterclip-pathwidthheighttopleftmarginpaddingfont-sizetransform: scale()clip-pathReact.memowill-change: transformcontain: layout style paintprefers-reduced-motionpointer: coarseuseEffectreturn () => ctx.revert()transformopacityfilterclip-pathwidthheighttopleftmarginpaddingfont-sizetransform: scale()clip-pathReact.memowill-change: transformcontain: layout style paintprefers-reduced-motionpointer: coarseuseEffect() => ctx.revert()| Feel | Framer Config |
|---|---|
| Snappy | |
| Smooth | |
| Bouncy | |
| Heavy | |
| CSS Easing | Value |
|---|---|
| Smooth decel | |
| Smooth accel | |
| Elastic | |
| 效果 | Framer 配置 |
|---|---|
| 灵敏 | |
| 流畅 | |
| 弹性 | |
| 厚重 | |
| CSS 缓动 | 值 |
|---|---|
| 平滑减速 | |
| 平滑加速 | |
| 弹性 | |
prefers-reduced-motionoutlinebox-shadowaria-live="polite"prefers-reduced-motionoutlinebox-shadowaria-live="polite"npm install framer-motion # UI (keep at top level)
npm install gsap # Scroll (lazy-load)
npm install lottie-react # Icons (lazy-load)
npm install three @react-three/fiber @react-three/drei # 3D (lazy-load)npm install framer-motion # UI动效(置于顶层依赖)
npm install gsap # 滚动动效(懒加载)
npm install lottie-react # 图标动画(懒加载)
npm install three @react-three/fiber @react-three/drei # 3D效果(懒加载)| Type | Script | Pattern |
|---|---|---|
| TTS | | Sync |
| Music | | Sync |
| Video | | Async (create → poll → download) |
| Image | | Sync |
MINIMAX_API_KEY| 类型 | 脚本 | 执行方式 |
|---|---|---|
| 文本转语音 | | 同步 |
| 音乐生成 | | 同步 |
| 视频生成 | | 异步(创建→轮询→下载) |
| 图片生成 | | 同步 |
MINIMAX_API_KEY<project>/public/assets/{images,videos,audio}/{type}-{descriptor}-{timestamp}.{ext}<project>/public/assets/{images,videos,audio}/{类型}-{描述}-{时间戳}.{扩展名}| Shortcut | Spec |
|---|---|
| 16:9, cinematic, text-safe |
| 1:1, centered subject |
| 1:1, flat, clean background |
| 1:1, portrait, circular crop ready |
| 21:9, OG/social |
| 768P, 6s, |
| 1080P, 6s |
| 30s, no vocals, loopable |
| MiniMax HD, MP3 |
| 快捷指令 | 规格 |
|---|---|
| 16:9比例,电影级风格,无遮挡文字区域 |
| 1:1比例,主体居中 |
| 1:1比例,扁平化,干净背景 |
| 1:1比例,人像,已适配圆形裁剪 |
| 21:9比例,适配社交平台OG图 |
| 768P分辨率,6秒时长, |
| 1080P分辨率,6秒时长 |
| 30秒时长,无 vocals,可循环 |
| MiniMax HD 音质,MP3格式 |
references/minimax-cli-reference.mdreferences/asset-prompt-guide.mdreferences/minimax-voice-catalog.mdreferences/minimax-tts-guide.mdreferences/minimax-music-guide.mdreferences/minimax-video-guide.mdreferences/minimax-image-guide.mdreferences/minimax-cli-reference.mdreferences/asset-prompt-guide.mdreferences/minimax-voice-catalog.mdreferences/minimax-tts-guide.mdreferences/minimax-music-guide.mdreferences/minimax-video-guide.mdreferences/minimax-image-guide.mdATTENTION: Bold headline (promise or pain)
INTEREST: Elaborate problem ("yes, that's me")
DESIRE: Show transformation
ACTION: Clear CTAPROBLEM: State clearly
AGITATE: Make urgent
SOLUTION: Your productFEATURE: What it does
ADVANTAGE: Why it matters
BENEFIT: What customer gainsATTENTION: 醒目标题(承诺或痛点)
INTEREST: 阐述问题("对,这就是我遇到的情况")
DESIRE: 展示转变效果
ACTION: 清晰的行动召唤PROBLEM: 明确陈述问题
AGITATE: 强化紧迫感
SOLUTION: 你的产品FEATURE: 产品功能
ADVANTAGE: 功能带来的优势
BENEFIT: 用户获得的实际价值| Formula | Example |
|---|---|
| Promise | "Double open rates in 30 days" |
| Question | "Still wasting 10 hours/week?" |
| How-To | "How to automate your pipeline" |
| Number | "7 mistakes killing conversions" |
| Negative | "Stop losing leads" |
| Curiosity | "The one change that tripled bookings" |
| Transformation | "From 50 to 500 leads" |
| 公式 | 示例 |
|---|---|
| 承诺型 | "30天内将打开率提升一倍" |
| 疑问型 | "还在每周浪费10小时吗?" |
| 教程型 | "如何自动化你的工作流" |
| 数字型 | "7个毁掉转化率的错误" |
| 否定型 | "别再流失潜在客户" |
| 好奇型 | "让预订量翻三倍的一个改变" |
| 转变型 | "从50个到500个潜在客户" |
| Trigger | Example |
|---|---|
| FOMO | "Only 3 spots left" |
| Fear of loss | "Every day without this, you're losing $X" |
| Status | "Join 10,000+ top agencies" |
| Ease | "Set it up once. Forget forever." |
| Frustration | "Tired of tools that deliver nothing?" |
| Hope | "Yes, you CAN hit $10K MRR" |
| 触发类型 | 示例 |
|---|---|
| 错失恐惧(FOMO) | "仅剩3个名额" |
| 损失恐惧 | "每多一天不用这个工具,你就损失X美元" |
| 身份认同 | "加入10000+顶级代理机构" |
| 便捷性 | "一次设置,终身无忧" |
| 挫败感 | "受够了毫无效果的工具?" |
| 希望感 | "没错,你也能实现月收入1万美元" |
| Objection | Response |
|---|---|
| Too expensive | Show ROI: "Pays for itself in 2 weeks" |
| Won't work for me | Social proof from similar customer |
| No time | "Setup takes 10 minutes" |
| What if it fails | "30-day money-back guarantee" |
| Need to think | Urgency/scarcity |
| 用户异议 | 回应方式 |
|---|---|
| 太贵了 | 展示投资回报率:"2周内即可回本" |
| 对我没用 | 展示同类客户的成功案例 |
| 没时间 | "设置仅需10分钟" |
| 万一失败了怎么办 | "30天无理由退款保证" |
| 我需要考虑一下 | 强调紧迫感/稀缺性 |
| Mode | Output | When |
|---|---|---|
| Static | PDF/PNG | Posters, print, design assets |
| Interactive | HTML (p5.js) | Generative art, explorable variations |
| 模式 | 输出格式 | 适用场景 |
|---|---|---|
| 静态 | PDF/PNG | 海报、印刷品、设计资产 |
| 交互式 | HTML(p5.js) | 生成式艺术、可探索的变体效果 |
canvas-fonts/.pdf.png.mdtemplates/viewer.htmlrandomSeed(seed); noiseSeed(seed);canvas-fonts/.pdf.png.mdtemplates/viewer.htmlrandomSeed(seed); noiseSeed(seed);w-fullpx-4min-h-[100dvh]h-screenuseEffectprefers-reduced-motionReact.memopackage.jsonunsplashpicsumplaceholderplaceholdvia.placeholderlorem.spacedummyimagew-fullpx-4min-h-[100dvh]h-screenuseEffectprefers-reduced-motionReact.memopackage.jsonunsplashpicsumplaceholderplaceholdvia.placeholderlorem.spacedummyimage