Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

styling-react-with-tailwindstyling React with Tailwind CSS 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

474

周安装

19

GitHub Stars

公开资料未说明

下载量

154
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:styling-react-with-tailwind(styling React with Tailwind CSS 前端)
来源仓库:https://github.com/zenobi-us/zenobi-us
仓库路径:skills/styling-react-with-tailwind
安装命令:
npx skills add https://github.com/zenobi-us/zenobi-us --skill styling-react-with-tailwind
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/zenobi-us/zenobi-us --skill styling-react-with-tailwind

简介

辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码。
  • 需结合项目现有设计系统、路由和构建方式使用。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • styling-react-with-tailwind 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

References:

  • Guide - details on token system and patterns

Overview

This codebase uses:

  • Tailwind CSS with semantic design tokens via tw-colors plugin
  • tailwind-variants (tv()) for type-safe variant styling
  • Rose Pine color palette (light: Dawn, dark: Moon)

Token System

Color Token Pattern

{property}-{category}-{semantic}

Text tokens:

  • text-text-base - Primary body text
  • text-text-muted - Secondary/subtle text
  • text-text-link - Interactive link color (iris purple)
  • text-text-strong - Emphasized text

Background tokens:

  • bg-background-base - Page background
  • bg-background-card - Card surfaces
  • bg-background-button - Button backgrounds
  • bg-background-informative - Info callouts

Border tokens:

  • border-border-muted - Subtle borders
  • border-border-input - Form field borders
  • border-border-informative - Info borders

Spacing & Layout

Standard Tailwind spacing scale. Use semantic sizing:

  • p-4, gap-2, m-0 - standard spacing
  • max-w-7xl - content width constraints

Component Patterns

Pattern 1: Slots (Multi-element components)

Use when component has multiple styled children.

import { tv, VariantProps } from 'tailwind-variants';
import { classnames } from '~/core/classnames';

const Styles = tv({
  slots: {
    root: ['flex', 'items-center', 'gap-2'],
    label: ['text-text-base', 'font-medium'],
    icon: ['text-text-muted', 'w-4', 'h-4'],
  },
  variants: {
    size: {
      sm: { root: 'p-2', label: 'text-sm' },
      md: { root: 'p-4', label: 'text-base' },
    },
    intent: {
      primary: { root: 'bg-background-button', label: 'text-text-strong' },
      ghost: { root: 'bg-transparent', label: 'text-text-muted' },
    },
  },
  defaultVariants: {
    size: 'md',
    intent: 'primary',
  },
});

type StyleProps = VariantProps<typeof Styles>;
type Props = StyleProps & {
  className?: string;
  children: React.ReactNode;
};

export function MyComponent(props: Props) {
  const styles = Styles({ size: props.size, intent: props.intent });
  return (
    <div className={classnames(styles.root(), props.className)}>
      <span className={styles.icon()}>*</span>
      <span className={styles.label()}>{props.children}</span>
    </div>
  );
}

Pattern 2: Base (Single-element components)

Use when component is a single styled element.

import { tv, VariantProps } from 'tailwind-variants';
import { classnames } from '~/core/classnames';

const Styles = tv({
  base: [
    'border',
    'border-border-muted',
    'rounded',
    'transition-colors',
  ],
  variants: {
    variant: {
      solid: 'border-2',
      dashed: 'border-dashed',
    },
  },
  defaultVariants: {
    variant: 'solid',
  },
});

type Props = VariantProps<typeof Styles> & {
  className?: string;
};

export function Divider(props: Props) {
  const styles = Styles({ variant: props.variant });
  return <hr className={classnames(styles, props.className)} />;
}

Pattern 3: Compound Variants

For conditional style combinations:

const Styles = tv({
  base: ['rounded', 'px-4', 'py-2'],
  variants: {
    intent: { primary: '', danger: '' },
    disabled: { true: 'opacity-50 cursor-not-allowed' },
  },
  compoundVariants: [
    {
      intent: 'primary',
      disabled: false,
      class: 'bg-background-button hover:bg-background-hover',
    },
    {
      intent: 'danger',
      disabled: false,
      class: 'bg-red-500 hover:bg-red-600',
    },
  ],
});

Key Utilities

classnames()

Always use for merging classes safely:

import { classnames } from '~/core/classnames';

// Merges and deduplicates Tailwind classes
classnames(styles.root(), props.className, isActive && 'ring-2');

Box with asChild

For polymorphic components:

import { Box } from '~/components/ds/box/Box';

<Box asChild className="text-text-link">
  <a href="/path">Link styled as Box</a>
</Box>

Quick Reference

NeedUse
Multiple styled elementstv({slots: {...}})
Single styled elementtv({base: [...]})
Variant typesVariantProps<typeof Styles>
Merge classesclassnames(a, b, c)
Conditional variantscompoundVariants: [...]
Purple accenttext-text-link, text-text-strong
Muted texttext-text-muted
Card backgroundbg-background-card

Common Mistakes

  1. Using raw colors - Always use semantic tokens (text-text-base not text-gray-900)
  2. Forgetting classnames() - Props className won't merge properly without it
  3. Destructuring props - Use props.x not {x} per codebase convention
  4. Missing VariantProps - Always type variants for IDE completion

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.13%
按下载量换算57

Claude

30.51%
按下载量换算47

Cursor

20.4%
按下载量换算31

Gemini CLI

9.22%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills