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

css-fundamentalsCSS fundamentals 前端

Agent Skill

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

总安装

445

周安装

18

GitHub Stars

1

下载量

140
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-css --skill css-fundamentals

简介

用于学习 CSS 核心概念,包括选择器、特异性、盒模型和定位机制。

  • 提供类型安全的参数输入和全面验证规则。
  • 覆盖 display 属性与单位换算等基础主题,适合初学者进阶。
  • 安装命令:npx skills add https://github.com/pluginagentmarketplace/custom-plugin-css --skill css-fundamentals
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

CSS Fundamentals Skill

Master core CSS concepts: selectors, specificity, box model, positioning, and units.

Overview

This skill provides atomic, focused guidance on CSS fundamentals with type-safe parameters and comprehensive validation.

Skill Metadata

PropertyValue
CategoryCore CSS
ComplexityBeginner to Intermediate
DependenciesNone
Bonded Agent01-css-fundamentals

Usage

Skill("css-fundamentals")

Parameter Schema

parameters:
  topic:
    type: string
    required: true
    enum: [selectors, specificity, box-model, positioning, units, display]
    description: The CSS fundamental topic to explore

  level:
    type: string
    required: false
    default: beginner
    enum: [beginner, intermediate, advanced]
    description: Depth of explanation

  include_examples:
    type: boolean
    required: false
    default: true
    description: Include code examples

validation:
  - rule: topic_required
    message: "Topic parameter is required"
  - rule: valid_enum
    message: "Topic must be one of: selectors, specificity, box-model, positioning, units, display"

Topics Covered

Selectors

  • Element, class, ID selectors
  • Attribute selectors [attr], [attr=value]
  • Pseudo-classes :hover, :focus, :nth-child()
  • Pseudo-elements ::before, ::after
  • Combinator selectors >, +, ~

Specificity

  • Specificity calculation (0,0,0,0)
  • Cascade order rules
  • !important usage and pitfalls
  • Inheritance patterns

Box Model

  • Content, padding, border, margin
  • box-sizing: border-box vs content-box
  • Margin collapse behavior
  • Inline vs block dimensions

Positioning

  • static, relative, absolute, fixed, sticky
  • Stacking context and z-index
  • Containing block rules
  • Offset properties (top, right, bottom, left)

Units

  • Absolute: px, pt, cm
  • Relative: em, rem, %, vh, vw
  • Newer units: ch, lh, cqi, cqw
  • When to use which unit

Retry Logic

retry_config:
  max_attempts: 3
  backoff_type: exponential
  initial_delay_ms: 1000
  max_delay_ms: 10000
  retryable_errors:
    - TIMEOUT
    - RATE_LIMIT
    - TEMPORARY_FAILURE

Logging & Observability

logging:
  entry_point: skill_invoked
  exit_point: skill_completed
  log_parameters: true
  log_response_size: true
  metrics:
    - invocation_count
    - success_rate
    - avg_response_time

Quick Reference

Specificity Calculator

Inline styles    → 1,0,0,0
ID selectors     → 0,1,0,0
Classes/attrs    → 0,0,1,0
Elements         → 0,0,0,1

Example: div#header .nav a:hover
         0,1,2,2 (ID=1, class+pseudo=2, elements=2)

Box Model Visual

┌─────────────────────────────────┐
│           MARGIN                │
│   ┌─────────────────────────┐   │
│   │        BORDER           │   │
│   │   ┌─────────────────┐   │   │
│   │   │    PADDING      │   │   │
│   │   │   ┌─────────┐   │   │   │
│   │   │   │ CONTENT │   │   │   │
│   │   │   └─────────┘   │   │   │
│   │   └─────────────────┘   │   │
│   └─────────────────────────┘   │
└─────────────────────────────────┘

Unit Recommendations

Use CaseRecommended Unit
Typographyrem
Spacingrem or em
Borderspx
Viewport layoutsvh, vw, %
Container layouts% or fr

Code Examples

Selector Efficiency

/* Efficient: Single class */
.nav-link { }

/* Less efficient: Descendant chain */
nav ul li a { }

/* Prefer attribute selectors */
[data-state="active"] { }

Box Model Reset

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

* {
  margin: 0;
  padding: 0;
}

Test Template

describe('CSS Fundamentals Skill', () => {
  test('validates topic parameter', () => {
    expect(() => skill({ topic: 'invalid' }))
      .toThrow('Topic must be one of: selectors, specificity...');
  });

  test('returns selector examples for selectors topic', () => {
    const result = skill({ topic: 'selectors', level: 'beginner' });
    expect(result).toContain('.class');
    expect(result).toContain('#id');
  });

  test('handles missing optional parameters', () => {
    const result = skill({ topic: 'box-model' });
    expect(result.level).toBe('beginner');
    expect(result.include_examples).toBe(true);
  });
});

Error Handling

Error CodeCauseRecovery
INVALID_TOPICUnknown topicShow valid topics list
LEVEL_MISMATCHLevel too advanced for topicSuggest appropriate level
PARAM_VALIDATIONInvalid parameter typeReturn validation message

Related Skills

  • css-flexbox-grid (layout builds on fundamentals)
  • css-architecture (naming builds on selectors)
  • css-modern (extends selector knowledge)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

github-copilot

31.41%
按下载量换算44

OpenCode

25.11%
按下载量换算35

Claude Code

19.18%
按下载量换算27

windsurf

12.36%
按下载量换算17

trae

7.21%
按下载量换算10

Cursor

3.69%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

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

来源信息

继续浏览同类 Skills