Agent skill

Frontend Style Encapsulation

by Peiiii in Peiiii/nextclaw

当修改前端样式、shared UI、设置界面、响应式/紧凑布局、输入焦点、配色、Tailwind/CSS/container query,或裁决 reusable component 的样式 owner 时使用。

MITAuto-check passedFrontend & Design

Install Frontend Style Encapsulation

skills CLI
$ npx skills add Peiiii/nextclaw --skill frontend-style-encapsulation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Peiiii/nextclaw frontend-style-encapsulation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Peiiii/nextclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/wiki/skills/frontend/frontend-style-encapsulation .claude/skills/frontend-style-encapsulation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
frontend-style-encapsulation
GitHub stars
260
Token cost
~489 tokens
SKILL.md length
114 words
Files
1
Skills in repo
70
Repo updated
First seen
Licence
MIT

At a glance

当修改前端样式、shared UI、设置界面、响应式/紧凑布局、输入焦点、配色、Tailwind/CSS/container query,或裁决 reusable component 的样式 owner 时使用。

  • Frontend & Design work in your project
  • SKILL.md covers Shared UI 边界, 实现合同, 设置界面 and 验证
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Frontend Style Encapsulation is an agent skill from Peiiii/nextclaw. 当修改前端样式、shared UI、设置界面、响应式/紧凑布局、输入焦点、配色、Tailwind/CSS/container query,或裁决 reusable component 的样式 owner 时使用。

Its SKILL.md is about 490 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with Tailwind CSS. The repository describes itself as: A human-centered long-term AI partner—not a task-centered assistant. The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/frontend-style-encapsulation”

What it can do on your machine

Read from SKILL.md and the folder at commit 4d9d500. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Frontend Style Encapsulation loads about 489 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 114 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~489

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Peiiii/nextclaw at commit 4d9d500, republished under its MIT licence (© Peiiii). 114 words, ~489 tokens.

Download SKILL.mdSave it as .claude/skills/frontend-style-encapsulation/SKILL.md (or your agent's skills folder).
name
frontend-style-encapsulation
description
当修改前端样式、shared UI、设置界面、响应式/紧凑布局、输入焦点、配色、Tailwind/CSS/container query,或裁决 reusable component 的样式 owner 时使用。

前端样式内聚

样式是组件合同的一部分。先判断视觉状态属于组件、组件 variant、主题、宿主布局还是一次性页面编排;固有状态和容器响应默认归组件,宿主只负责位置、token 和业务数据。全局 CSS 只承载主题、reset、字体、scrollbar、token 等基础设施。

Shared UI 边界

  • 基础组件纯展示、业务无关,只处理样式、布局、状态、可访问性和通用交互;不读业务 store/query、路由和业务文案,也不理解 marketplace/provider/agent/session。
  • props 使用 variant/size/tone/isActive/isLoading/disabled/label 等 UI 语义;业务实体、业务 action 和状态机留在 feature component。
  • 重复按钮、链接、标签、空态、提示、列表骨架、卡片壳和工具栏动作优先进入 shared UI owner,再由业务层取数、翻译、权限判断和编排。
  • 颜色表达稳定语义:primary、destructive、muted 等;背景与前景成对验收,不以单个低饱和色值证明协调。

实现合同

  • 响应式优先依据真实约束容器,而非 viewport;正常、窄和极窄状态按任务相关子集验证。
  • 紧凑模式依次保留核心动作、收起次要文字、隐藏低频控制;文字收起后仍有图标、aria-label、tooltip 或 popover 表达含义/当前值。
  • 文本输入容器聚焦前后 border width/color、background、shadow 和 ring 完全不变。填充型输入使用 border-0,不以透明边框占位;描边型保持静态描边。
  • 不用宿主全局 selector 反向依赖 reusable component 内部 DOM;局部状态用组件 class、variant、container query 或包内样式入口。
  • 新样式贴近 DOM owner。必须全局化时说明原因,并只依赖稳定语义类/主题层,不依赖临时 DOM 层级。

设置界面

触达设置/配置页时以 docs/designs/2026-07-18-settings-visual-system.design.md 为视觉合同:

  • 统一使用 shared settings primitives 和 SettingsPage 画布,业务页不自拼根级宽度、居中、间距或分栏高度;结构差异用组件 variant。
  • 普通结构是“分区 -> 分组 -> 设置行”,不为每项套 Card。一行一个意图:左侧标题/说明、右侧控件,窄容器转上下。
  • 页面画布无描边;分组用浅背景和圆角,行间最多一条低对比分隔;容器嵌套不超过两层,选中优先填充。
  • 列表—详情页复用 ConfigSplitPage:整体最多一条外边界,列表与详情最多一条分隔,列表项默认无边框。
  • shared primitive 只用 token,保持业务无关;业务标题和说明走 i18n。后端 schema/uiHint 的派生标签不得覆盖前端用户文案,静态 locale 扫描不能替代 DOM 验收。
  • MCP 商品、release notes、警告/错误和代码块可有独立语义表面,但不反向成为普通设置项默认样式。

验证

  • 文本输入:真实 DOM 比较聚焦前后 border/background/shadow;填充型 border width 为 0px。
  • 已有用户认可原型:相同关键视口整页截图对照层级、间距、尺寸、边界、滚动 owner 和交互态;偏差要收敛或明确有意取舍。
  • 主题:真实整页逐一切换,检查 shell、header、navigation、content、文字和控件;先消除固定色与 token 的 owner 冲突。
  • 设置页:覆盖桌面、窄桌面、侧面板后的窄容器和相关移动端,检查边框预算、信息层级与操作可达。
  • 配色:在相关明暗主题记录背景/前景计算值并看实际组合。
  • 用户可见布局不能只靠单测;使用浏览器截图、真实 DOM/CSS 或最贴近链路的构建证据。真实页面阻塞时说明缺口和替代证据。

© Peiiii, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/wiki/skills/frontend/frontend-style-encapsulation of Peiiii/nextclaw.

Open the folder on GitHubat commit 4d9d500

Compare with similar skills

Frontend Style Encapsulation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Frontend Style Encapsulation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Frontend Style Encapsulation this skillPeiiii/nextclaw260—~489Automated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
Tailwindcss Developmentanonaddy/anonaddy4.9k10 repos~865Automated safety check: PassMIT
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
MCP Developmentcoollabsio/coolify63k1 repos~949Automated safety check: PassMIT
Accessibility Reviewmarkmead/hyperui12k1 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed
  • Accessibility Review

    markmead/hyperui

    Run a WCAG 2.1 AA accessibility audit on a design or page. An agent skill from markmead/hyperui.

    12k GitHub starsUsed in 1 repo~1.1k tokens
    Frontend & DesignAuto-check passed
  • Design System

    Ohh-889/skyroc

    Token architecture, component specifications, and slide generation.

    795 GitHub starsUsed in 11 repos~1.7k tokens
    Frontend & DesignAuto-check passed

More from Peiiii/nextclaw

All 70 skills in this repo
  • Nextclaw Skin Studio

    Peiiii/nextclaw

    A skill your agent uses when a user wants to browse, apply, inspect, create, refine, switch, or remove a NextClaw skin; wants a personal skin with arbitrary CSS, JavaScript, images, SVG, DOM…

    260 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • A skill your agent uses when a development task needs visible phase tracing, task-level or phase-level Token measurement, model/effort comparison, or a deterministic usage report or local dashboard…

    260 GitHub stars~802 tokensUpdated yesterday
    Auto-check passed
  • 当 NextClaw 产品更新后需要生成、替换、挑毛病或检查官网、GitHub README、用户文档或社交传播中的真实截图、AI 宣传视觉、整页 HTML 宣传预览、社区二维码等对外视觉资产时使用;也用于“更新截图”“重新截一批图”“做宣传页”“生成 campaign 页面”“视觉审稿”“五星挑刺法”或发布前检查视觉资产。普通站点布局开发或只写文章不触发。

    260 GitHub stars~801 tokensUpdated yesterday
    Auto-check passed
  • UI UX Pro Max

    Peiiii/nextclaw

    A skill your agent uses when the user wants professional UI/UX design guidance, design-system generation, UX review, or stack-specific frontend guidance through a bundled local UI/UX Pro Max dataset…

    260 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Impeccable

    Peiiii/nextclaw

    A skill your agent uses when the user wants distinctive, production-grade frontend design, anti-generic AI aesthetics, UX critique, technical UI audits, or final polish through bundled Impeccable…

    260 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Curate NextClaw skill resources, including OpenClaw and community sources.

    260 GitHub stars~479 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Frontend Style Encapsulation

What does Frontend Style Encapsulation do?

当修改前端样式、shared UI、设置界面、响应式/紧凑布局、输入焦点、配色、Tailwind/CSS/container query,或裁决 reusable component 的样式 owner 时使用。. Frontend Style Encapsulation is an agent skill from Peiiii/nextclaw.

When should I use Frontend Style Encapsulation?

Frontend Style Encapsulation fits situations like: frontend & Design work in your project.

How do I install Frontend Style Encapsulation in Claude Code?

Run `npx skills add Peiiii/nextclaw --skill frontend-style-encapsulation -a claude-code`. Or copy the skill folder (.agents/wiki/skills/frontend/frontend-style-encapsulation in Peiiii/nextclaw) into .claude/skills/frontend-style-encapsulation in your project. Claude Code loads it when a task matches its description.

How do I install Frontend Style Encapsulation in Codex?

Run `npx skills add Peiiii/nextclaw --skill frontend-style-encapsulation -a codex`. Or copy the skill folder (.agents/wiki/skills/frontend/frontend-style-encapsulation in Peiiii/nextclaw) into .agents/skills/frontend-style-encapsulation in your project. Codex loads it when a task matches its description.

Can I use Frontend Style Encapsulation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Peiiii/nextclaw --skill frontend-style-encapsulation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/frontend-style-encapsulation, .gemini/skills/frontend-style-encapsulation, .github/skills/frontend-style-encapsulation and .opencode/skills/frontend-style-encapsulation in your project.

What does Frontend Style Encapsulation need to run?

SKILL.md names no scripts, command-line tools or credentials: Frontend Style Encapsulation is instructions for the agent only.

Does Frontend Style Encapsulation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Frontend Style Encapsulation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Frontend Style Encapsulation use?

Frontend Style Encapsulation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Frontend Style Encapsulation use?

About 489 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Frontend Style Encapsulation?

Skills that share tags, products or a category with Frontend Style Encapsulation: Web Artifacts Builder (anthropics/skills, 180k stars), Tailwindcss Development (anonaddy/anonaddy, 4.9k stars), UI Styling (Ohh-889/skyroc, 795 stars) and MCP Development (coollabsio/coolify, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Frontend Style Encapsulation?

Peiiii (a GitHub user) maintains it in Peiiii/nextclaw, which has 260 GitHub stars. The repository holds 70 skills in this directory. The repository was last updated on October 9, 2026.

Source: Peiiii/nextclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.