Communitygithub.com

tmnhutwork/Landingpage-Photo-Retouch

使用 shadcn/ui 组件(基于 Radix UI + Tailwind)、Tailwind CSS 实用优先样式和基于画布的视觉设计,创建美观、可访问的用户界面。适用于构建用户界面、实现设计系统、创建响应式布局、添加可访问组件(对话框、下拉菜单、表单、表格)、自定义主题和颜色、实现暗模式、生成视觉设计和海报,或在整个应用中建立一致的样式模式。

Landingpage-Photo-Retouch 是什么?

该技能是一个全面的 UI 样式设计技能,专注于结合 shadcn/ui 组件、Tailwind CSS 实用优先样式和画布视觉设计系统,帮助开发者快速构建美观、可访问的用户界面。它支持基于 React 的框架(如 Next.js、Vite、Remix、Astro),通过 CLI 工具安装和管理组件,并且采用了 TypeScript 优先的设计理念,确保类型安全。技能包括完整的组件库指南、主题自定义、暗模式实现、响应式设计模式和可访问性模式。此外,它还提供了 Python 自动化脚本(如 shadcn_add.py 和 tailwind_config_gen.py),用于简化组件安装和配置生成。通过遵循实用优先、移动优先和可访问性优先的最佳实践,该技能能够显著提升开发效率,生成博物馆级质量的视觉设计。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/tmnhutwork/Landingpage-Photo-Retouch/tree/HEAD/.agents/skills/ui-styling

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

UI 样式设计技能

结合 shadcn/ui 组件、Tailwind CSS 实用样式和基于画布的视觉设计系统,创建美观、可访问用户界面的综合技能。

参考

何时使用此技能

在以下情况下使用:

  • 使用基于 React 的框架(Next.js、Vite、Remix、Astro)构建 UI
  • 实现可访问组件(对话框、表单、表格、导航)
  • 使用实用优先的 CSS 方法进行样式设计
  • 创建响应式、移动优先的布局
  • 实现暗模式和主题自定义
  • 构建具有一致标记的设计系统
  • 生成视觉设计、海报或品牌素材
  • 快速原型设计,获得即时视觉反馈
  • 添加复杂 UI 模式(数据表格、图表、命令面板)

核心技术栈

组件层:shadcn/ui

  • 通过 Radix UI 原语提供预构建的可访问组件
  • 复制粘贴分发模型(组件位于你的代码库中)
  • TypeScript 优先,完全类型安全
  • 可组合的原语,支持复杂 UI
  • 基于 CLI 的安装和管理

样式层:Tailwind CSS

  • 实用优先的 CSS 框架
  • 构建时处理,零运行时开销
  • 移动优先的响应式设计
  • 一致的设计标记(颜色、间距、排版)
  • 自动死代码消除

视觉设计层:画布

  • 博物馆级视觉构图
  • 哲学驱动的设计方法
  • 精致的视觉传达
  • 最少文本,最大视觉冲击
  • 系统化的模式与精致美学

快速开始

组件 + 样式设置

使用 Tailwind 安装 shadcn/ui:

npx shadcn@latest init

CLI 会提示选择框架、TypeScript、路径和主题偏好。这会同时配置 shadcn/ui 和 Tailwind CSS。

添加组件:

npx shadcn@latest add 按钮 卡片 对话框 表单

使用组件并添加实用样式:

import { Button } from "@/components/ui/button"
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"

export function Dashboard() {
  return (
    <div className="container mx-auto p-6 grid gap-6 md:grid-cols-2 lg:grid-cols-3">
      <Card className="hover:shadow-lg transition-shadow">
        <CardHeader>
          <CardTitle className="text-2xl font-bold">分析</CardTitle>
        </CardHeader>
        <CardContent className="space-y-4">
          <p className="text-muted-foreground">查看你的指标</p>
          <Button variant="default" className="w-full">
            查看详情
          </Button>
        </CardContent>
      </Card>
    </div>
  )
}

替代方案:仅使用 Tailwind 的设置

Vite 项目:

npm install -D tailwindcss @tailwindcss/vite
// vite.config.ts
import tailwindcss from '@tailwindcss/vite'
export default { plugins: [tailwindcss()] }
/* src/index.css */
@import "tailwindcss";

组件库指南

包含使用模式、安装和组合示例的完整组件目录。

见:references/shadcn-components.md

涵盖:

  • 表单及输入组件(按钮、输入框、选择器、复选框、日期选择器、表单验证)
  • 布局与导航(卡片、标签页、手风琴、导航菜单)
  • 覆盖层与对话框(对话框、抽屉、弹出框、提示、命令面板)
  • 反馈与状态(提示、进度、骨架屏)
  • 展示组件(表格、数据表格、头像、徽章)

主题与自定义

主题配置、CSS 变量、暗模式实现及组件自定义。

见:references/shadcn-theming.md

涵盖:

  • 使用 next-themes 设置暗模式
  • CSS 变量系统
  • 颜色自定义及调色板
  • 组件变体自定义
  • 主题切换实现

可访问性模式

ARIA 模式、键盘导航、屏幕阅读器支持及可访问组件使用。

见:references/shadcn-accessibility.md

涵盖:

  • Radix UI 可访问性特性
  • 键盘导航模式
  • 焦点管理
  • 屏幕阅读器声明
  • 表单验证可访问性

Tailwind 实用工具

布局、间距、排版、颜色、边框和阴影的核心实用类。

见:references/tailwind-utilities.md

涵盖:

  • 布局实用工具(Flexbox、Grid、定位)
  • 间距系统(内边距、外边距、间隙)
  • 排版(字体大小、粗细、对齐、行高)
  • 颜色及背景
  • 边框和阴影
  • 自定义样式的任意值

响应式设计

移动优先断点、响应式实用工具及自适应布局。

见:references/tailwind-responsive.md

涵盖:

  • 移动优先方法
  • 断点系统(sm、md、lg、xl、2xl)
  • 响应式实用模式
  • 容器查询
  • 最大宽度查询
  • 自定义断点

Tailwind 自定义

配置文件结构、自定义实用工具、插件及主题扩展。

见:references/tailwind-customization.md

涵盖:

  • @theme 指令用于自定义标记
  • 自定义颜色和字体
  • 间距和断点扩展
  • 自定义实用工具创建
  • 自定义变体
  • 层组织(@layer base、components、utilities)
  • @apply 指令用于组件提取

视觉设计系统

基于画布的设计理念、视觉传达原则及精致构图。

见:references/canvas-design-system.md

涵盖:

  • 设计理念方法
  • 视觉传达优于文本
  • 系统化的模式和构图
  • 颜色、形式和空间设计
  • 最少文本集成
  • 博物馆级执行
  • 多页面设计系统

实用脚本

用于组件安装和配置生成的 Python 自动化工具。

shadcn_add.py

添加 shadcn/ui 组件并处理依赖:

python scripts/shadcn_add.py button card dialog

tailwind_config_gen.py

使用自定义主题生成 tailwind.config.js:

python scripts/tailwind_config_gen.py --colors brand:blue --fonts display:Inter

最佳实践

  1. 组件组合:从简单、可组合的原语构建复杂 UI

  2. 实用优先样式:直接使用 Tailwind 类;仅在真正重复时提取组件

  3. 移动优先响应式:从移动端样式开始,然后叠加响应式变体

  4. 可访问性优先:利用 Radix UI 原语,添加焦点状态,使用语义化 HTML

  5. 设计标记:使用一致的间距规模、颜色调色板、排版系统

  6. 暗模式一致性:对所有主题元素应用暗模式变体

  7. 性能:利用自动 CSS 清除,避免动态类名

  8. TypeScript:使用完整类型安全以获得更好的开发者体验

  9. 视觉层次:让构图引导注意力,有意图地使用间距和颜色

  10. 专家工艺:每个细节都很重要——将 UI 视为一门手艺

参考导航

组件库

  • references/shadcn-components.md - 完整组件目录
  • references/shadcn-theming.md - 主题和自定义
  • references/shadcn-accessibility.md - 可访问性模式

样式系统

  • references/tailwind-utilities.md - 核心实用类
  • references/tailwind-responsive.md - 响应式设计
  • references/tailwind-customization.md - 配置和扩展

视觉设计

  • references/canvas-design-system.md - 设计理念和画布工作流

自动化

  • scripts/shadcn_add.py - 组件安装
  • scripts/tailwind_config_gen.py - 配置生成

常见模式

带验证的表单:

import { useForm } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import * as z from "zod"
import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from "@/components/ui/form"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"

const schema = z.object({
  email: z.string().email(),
  password: z.string().min(8)
})

export function LoginForm() {
  const form = useForm({
    resolver: zodResolver(schema),
    defaultValues: { email: "", password: "" }
  })

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(console.log)} className="space-y-6">
        <FormField control={form.control} name="email" render={({ field }) => (
          <FormItem>
            <FormLabel>邮箱</FormLabel>
            <FormControl>
              <Input type="email" {...field} />
            </FormControl>
            <FormMessage />
          </FormItem>
        )} />
        <Button type="submit" className="w-full">登录</Button>
      </form>
    </Form>
  )
}

带暗模式的响应式布局:

<div className="min-h-screen bg-white dark:bg-gray-900">
  <div className="container mx-auto px-4 py-8">
    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
      <Card className="bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700">
        <CardContent className="p-6">
          <h3 className="text-xl font-semibold text-gray-900 dark:text-white">
            内容
          </h3>
        </CardContent>
      </Card>
    </div>
  </div>
</div>

资源

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

tmnhutwork/Landingpage-Photo-Retouch

Run a WCAG 2.1 AA accessibility audit on a design or page. Trigger with "audit accessibility", "check a11y", "is this accessible?", or when reviewing a design for color contrast, keyboard navigation, touch target size, or screen reader behavior before handoff.

tmnhutwork/Landingpage-Photo-Retouch

Get structured design feedback on usability, hierarchy, and consistency. Trigger with "review this design", "critique this mockup", "what do you think of this screen?", or when sharing a Figma link or screenshot for feedback at any stage from exploration to final polish.

tmnhutwork/Landingpage-Photo-Retouch

Generate developer handoff specs from a design. Use when a design is ready for engineering and needs a spec sheet covering layout, design tokens, component props, interaction states, responsive breakpoints, edge cases, and animation details.

tmnhutwork/Landingpage-Photo-Retouch

Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

tmnhutwork/Landingpage-Photo-Retouch

Synthesize user research into themes, insights, and recommendations. Use when you have interview transcripts, survey results, usability test notes, support tickets, or NPS responses that need to be distilled into patterns, user segments, and prioritized next steps.

tmnhutwork/Landingpage-Photo-Retouch

Plan, conduct, and synthesize user research. Trigger with "user research plan", "interview guide", "usability test", "survey design", "research questions", or when the user needs help with any aspect of understanding their users through research.

tmnhutwork/Landingpage-Photo-Retouch

Write or review UX copy — microcopy, error messages, empty states, CTAs. Trigger with "write copy for", "what should this button say?", "review this error message", or when naming a CTA, wording a confirmation dialog, filling an empty state, or writing onboarding text.

tmnhutwork/Landingpage-Photo-Retouch

Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.

tmnhutwork/Landingpage-Photo-Retouch

Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.

tmnhutwork/Landingpage-Photo-Retouch

Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.

tmnhutwork/Landingpage-Photo-Retouch

Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

tmnhutwork/Landingpage-Photo-Retouch

Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "implement design", "generate code", "implement component", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.

tmnhutwork/Landingpage-Photo-Retouch

Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.

tmnhutwork/Landingpage-Photo-Retouch

Create strategic HTML presentations with Chart.js, design tokens, responsive layouts, copywriting formulas, and contextual slide strategies.

tmnhutwork/Landingpage-Photo-Retouch

UI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation. Searchable local data: 79 searchable styles (50 active), 192 product palettes and reasoning profiles, 74 font pairings, 119 UX guidelines, 105 icons, 17 GSAP presets, 25 chart types, and 22 stacks.

相关技能