Borrowing it
Nothing to install: this file belongs to Peiiii/nextclaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Peiiii/nextclaw/master/.agents/skills/frontend-style-encapsulation/SKILL.mdgit clone --depth 1 https://github.com/Peiiii/nextclawWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/peiiii/nextclaw/frontend-style-encapsulation)<a href="https://agentmods.dev/skills/peiiii/nextclaw/frontend-style-encapsulation"><img src="https://agentmods.dev/badge/skills/peiiii/nextclaw/frontend-style-encapsulation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/peiiii/nextclaw/frontend-style-encapsulation"><img src="https://agentmods.dev/badge/skills/peiiii/nextclaw/frontend-style-encapsulation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01055 |
| Opus 5 | $0.00027 | $0.00528 |
| Sonnet 5 | $0.00011 | $0.00211 |
| Haiku 4.5 | $0.00005 | $0.00105 |
Grade A, and why
frontend-style-encapsulation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
前端样式内聚
样式是组件合同的一部分。先判断视觉状态属于组件、组件 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 或最贴近链路的构建证据。真实页面阻塞时说明缺口和替代证据。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 44 lines · 54 tokens per session scan A 090494ac6242
frontend-style-encapsulation is a skill published in the GitHub repository Peiiii/nextclaw (256 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 1,055 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…
component-design
Apply a coherent visual system, responsive behavior, interaction states, and accessibility to Kun components.
ui-aesthetic
A set of visual design rules for making web pages and components look consistent and readable. It covers icons, colors, typography, spacing, text, accessibility contrast, layout, and restrained animation.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
响应式布局与无障碍
A guide for building web interfaces that adapt to different screen sizes and remain usable with keyboards, screen readers, and other access needs.
aetox-shadcn
ทำงานกับ shadcn/ui, เพิ่ม ค้น แก้ ดีบัก สไตล์ และประกอบคอมโพเนนต์/ดีไซน์ซิสเทม ผ่าน registry และ CLI พร้อมกฎที่บังคับเสมอ (className สำหรับ layout ไม่ใช่สไตล์, ใช้ gap ไม่ใช่ space-x/y, size- เมื่อกว้างเท่าสูง, semantic colors, cn()) ใช้ตอนโปรเจกต์มี components.json หรือทำงานกับ shadcn/Tailwind/Base UI, "shadcn init"…