Token导航 LogoToken导航

Agent Skill · 前端设计

css-styling(CSS styling 前端)

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

css-styling 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 9,031。

总安装 242周安装 10GitHub Stars 公开资料未说明下载 79核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vapvarun/claude-backup --skill css-styling

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

提供现代 CSS 基础规范,包含重置样式、自定义属性和响应式布局最佳实践。适用于从零开始搭建样式系统或重构现有项目的 CSS 架构标准化。输出经过优化的基础样式表,支持深色模式切换和无障碍访问要求。建议作为项目样式入口文件,需配合构建工具处理变量插值和媒体查询合并。

css-styling 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/css-styling

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vapvarun/claude-backup --skill css-styling;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

css-styling 怎么安装?

在终端执行 npx skills add https://github.com/vapvarun/claude-backup --skill css-styling。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

css-styling 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

css-styling 需要什么权限?

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

css-styling 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

css-styling 用的人多吗?

公开数据是累计安装 242 次,近一周安装 10 次,下载 79 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

css-styling 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
css-styling

CSS styling 前端 · 本页

242—只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

CSS Styling Skill

Instructions

When writing CSS:

1. Modern CSS Reset

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

2. CSS Custom Properties (Variables)

:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-secondary: #64748b;
  --color-success: #22c55e;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-text: #f1f5f9;
  }
}

3. Flexbox Layouts

/* Center anything */
.center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Space between */
.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stack vertically */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Wrap items */
.flex-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

4. Grid Layouts

/* Auto-fit responsive grid */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* Fixed columns */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

/* Sidebar layout */
.with-sidebar {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-8);
}

/* Holy grail layout */
.holy-grail {
  display: grid;
  grid-template:
    "header header header" auto
    "nav main aside" 1fr
    "footer footer footer" auto
    / 200px 1fr 200px;
  min-height: 100vh;
}

5. Responsive Design

/* Mobile-first breakpoints */
/* Base: Mobile */

@media (min-width: 640px) {
  /* Tablet */
}

@media (min-width: 1024px) {
  /* Desktop */
}

@media (min-width: 1280px) {
  /* Large desktop */
}

/* Container queries */
.card-container {
  container-type: inline-size;
}

@container (min-width: 400px) {
  .card {
    display: flex;
  }
}

/* Clamp for fluid typography */
h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

6. Common Components

Buttons:

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

Cards:

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-body {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

Forms:

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input:invalid {
  border-color: var(--color-error);
}

7. Animations

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn var(--transition-normal) ease-out;
}

/* Slide up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp var(--transition-normal) ease-out;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

8. Utility Classes

/* Visually hidden (accessible) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

9. Best Practices

  • Use CSS custom properties for theming
  • Mobile-first responsive approach
  • Avoid!important
  • Use logical properties (margin-inline, padding-block)
  • Prefer classes over IDs for styling
  • Use BEM or similar naming convention
  • Minimize nesting depth
  • Group related properties

10. Performance Tips

  • Avoid expensive selectors
  • Use will-change sparingly
  • Prefer transform and opacity for animations
  • Use contain for isolated components
  • Lazy load non-critical CSS

WordPress-Specific CSS

11. Enqueueing Styles Properly

// In functions.php or plugin file
function theme_enqueue_styles() {
    // Main stylesheet
    wp_enqueue_style(
        'theme-style',
        get_stylesheet_uri(),
        array(),
        wp_get_theme()->get('Version')
    );

    // Additional CSS
    wp_enqueue_style(
        'theme-custom',
        get_template_directory_uri() . '/assets/css/custom.css',
        array('theme-style'),
        '1.0.0'
    );
}
add_action('wp_enqueue_scripts', 'theme_enqueue_styles');

// Admin styles
function theme_admin_styles() {
    wp_enqueue_style(
        'theme-admin',
        get_template_directory_uri() . '/assets/css/admin.css',
        array(),
        '1.0.0'
    );
}
add_action('admin_enqueue_scripts', 'theme_admin_styles');

12. RTL Support

// Register RTL stylesheet
wp_enqueue_style('theme-style', get_stylesheet_uri());
wp_style_add_data('theme-style', 'rtl', 'replace');

// Or with suffix
wp_style_add_data('theme-style', 'rtl', get_template_directory_uri() . '/assets/css/style-rtl.css');
/* Use logical properties for automatic RTL */
.element {
    margin-inline-start: 1rem;  /* margin-left in LTR, margin-right in RTL */
    padding-inline-end: 1rem;   /* padding-right in LTR, padding-left in RTL */
    text-align: start;          /* left in LTR, right in RTL */
}

/* Or use [dir] attribute */
[dir="rtl"] .element {
    margin-left: 0;
    margin-right: 1rem;
}

13. Block Editor (Gutenberg) Styles

// Editor styles
function theme_editor_styles() {
    add_theme_support('editor-styles');
    add_editor_style('assets/css/editor-style.css');
}
add_action('after_setup_theme', 'theme_editor_styles');

// Block styles
function theme_block_styles() {
    wp_enqueue_block_style('core/button', array(
        'handle' => 'theme-button-style',
        'src'    => get_template_directory_uri() . '/assets/css/blocks/button.css',
    ));
}
add_action('init', 'theme_block_styles');

14. theme.json Integration

{
    "version": 2,
    "settings": {
        "color": {
            "palette": [
                { "slug": "primary", "color": "#2563eb", "name": "Primary" },
                { "slug": "secondary", "color": "#64748b", "name": "Secondary" }
            ]
        },
        "spacing": {
            "units": ["px", "rem", "%"],
            "spacingScale": { "steps": 7 }
        },
        "typography": {
            "fontFamilies": [
                { "slug": "system", "fontFamily": "system-ui, sans-serif", "name": "System" }
            ]
        }
    }
}
/* Use WordPress CSS variables from theme.json */
.element {
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--system);
    padding: var(--wp--preset--spacing--40);
}

15. WordPress Admin Compatibility

/* Match WordPress admin colors */
.wp-admin .my-plugin-box {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

/* Use admin color scheme variables */
.wp-admin .my-button {
    background: var(--wp-admin-theme-color, #2271b1);
    color: var(--wp-admin-theme-color-darker-10, #135e96);
}

/* Responsive admin */
@media screen and (max-width: 782px) {
    .wp-admin .my-plugin-box {
        padding: 12px;
    }
}

16. WordPress CSS Best Practices

  • Prefix classes with theme/plugin slug to avoid conflicts
  • Use wp_add_inline_style() for dynamic CSS
  • Avoid!important - use specificity instead
  • Support RTL with logical properties or RTL stylesheet
  • Test in Gutenberg editor view
  • Use theme.json for design tokens when possible
  • Minify for production using build tools

平台分布

Claude Code

28.09%
按下载量换算22

OpenCode

23.49%
按下载量换算19

windsurf

19.18%
按下载量换算15

Antigravity

13.23%
按下载量换算10

Codex

8.15%
按下载量换算6

Gemini CLI

3.49%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills